diff --git a/maven-jaxb2-plugin-0.13.0-remove-encoding-option.patch b/maven-jaxb2-plugin-0.13.0-remove-encoding-option.patch new file mode 100644 index 0000000..71c6065 --- /dev/null +++ b/maven-jaxb2-plugin-0.13.0-remove-encoding-option.patch @@ -0,0 +1,84 @@ +diff -Nru maven-jaxb2-plugin-0.13.0/plugin/src/main/java/org/jvnet/mjiip/v_2/OptionsFactory.java maven-jaxb2-plugin-0.13.0.enconding/plugin/src/main/java/org/jvnet/mjiip/v_2/OptionsFactory.java +--- maven-jaxb2-plugin-0.13.0/plugin/src/main/java/org/jvnet/mjiip/v_2/OptionsFactory.java 2015-08-30 11:39:57.000000000 +0200 ++++ maven-jaxb2-plugin-0.13.0.enconding/plugin/src/main/java/org/jvnet/mjiip/v_2/OptionsFactory.java 2015-10-26 07:13:24.427916727 +0100 +@@ -33,12 +33,6 @@ + options.target = createSpecVersion(optionsConfiguration + .getSpecVersion()); + +- final String encoding = optionsConfiguration.getEncoding(); +- +- if (encoding != null) { +- options.encoding = createEncoding(encoding); +- } +- + options.setSchemaLanguage(createLanguage(optionsConfiguration + .getSchemaLanguage())); + +@@ -105,26 +99,6 @@ + } + + } +- +- private String createEncoding(String encoding) +- throws MojoExecutionException { +- if (encoding == null) { +- return null; +- } +- try { +- if (!Charset.isSupported(encoding)) { +- throw new MojoExecutionException( +- +- MessageFormat.format("Unsupported encoding [{0}].", encoding)); +- } +- return encoding; +- } catch (IllegalCharsetNameException icne) { +- throw new MojoExecutionException( +- +- MessageFormat.format("Unsupported encoding [{0}].", encoding)); +- } +- +- } + + private Language createLanguage(String schemaLanguage) + throws MojoExecutionException { +diff -Nru maven-jaxb2-plugin-0.13.0/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/OptionsFactory.java maven-jaxb2-plugin-0.13.0.enconding/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/OptionsFactory.java +--- maven-jaxb2-plugin-0.13.0/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/OptionsFactory.java 2015-08-30 11:39:57.000000000 +0200 ++++ maven-jaxb2-plugin-0.13.0.enconding/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/OptionsFactory.java 2015-10-26 07:13:24.428916678 +0100 +@@ -32,12 +32,6 @@ + + options.target = SpecVersion.V2_2; + +- final String encoding = optionsConfiguration.getEncoding(); +- +- if (encoding != null) { +- options.encoding = createEncoding(encoding); +- } +- + options.setSchemaLanguage(createLanguage(optionsConfiguration + .getSchemaLanguage())); + +@@ -94,24 +88,6 @@ + return options; + } + +- private String createEncoding(String encoding) +- throws MojoExecutionException { +- if (encoding == null) { +- return null; +- } +- try { +- if (!Charset.isSupported(encoding)) { +- throw new MojoExecutionException(MessageFormat.format( +- "Unsupported encoding [{0}].", encoding)); +- } +- return encoding; +- } catch (IllegalCharsetNameException icne) { +- throw new MojoExecutionException(MessageFormat.format( +- "Unsupported encoding [{0}].", encoding)); +- } +- +- } +- + private Language createLanguage(String schemaLanguage) + throws MojoExecutionException { + if (StringUtils.isEmpty(schemaLanguage)) { diff --git a/maven-jaxb2-plugin-0.13.0-remove-enconding-option.patch b/maven-jaxb2-plugin-0.13.0-remove-enconding-option.patch deleted file mode 100644 index 71c6065..0000000 --- a/maven-jaxb2-plugin-0.13.0-remove-enconding-option.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -Nru maven-jaxb2-plugin-0.13.0/plugin/src/main/java/org/jvnet/mjiip/v_2/OptionsFactory.java maven-jaxb2-plugin-0.13.0.enconding/plugin/src/main/java/org/jvnet/mjiip/v_2/OptionsFactory.java ---- maven-jaxb2-plugin-0.13.0/plugin/src/main/java/org/jvnet/mjiip/v_2/OptionsFactory.java 2015-08-30 11:39:57.000000000 +0200 -+++ maven-jaxb2-plugin-0.13.0.enconding/plugin/src/main/java/org/jvnet/mjiip/v_2/OptionsFactory.java 2015-10-26 07:13:24.427916727 +0100 -@@ -33,12 +33,6 @@ - options.target = createSpecVersion(optionsConfiguration - .getSpecVersion()); - -- final String encoding = optionsConfiguration.getEncoding(); -- -- if (encoding != null) { -- options.encoding = createEncoding(encoding); -- } -- - options.setSchemaLanguage(createLanguage(optionsConfiguration - .getSchemaLanguage())); - -@@ -105,26 +99,6 @@ - } - - } -- -- private String createEncoding(String encoding) -- throws MojoExecutionException { -- if (encoding == null) { -- return null; -- } -- try { -- if (!Charset.isSupported(encoding)) { -- throw new MojoExecutionException( -- -- MessageFormat.format("Unsupported encoding [{0}].", encoding)); -- } -- return encoding; -- } catch (IllegalCharsetNameException icne) { -- throw new MojoExecutionException( -- -- MessageFormat.format("Unsupported encoding [{0}].", encoding)); -- } -- -- } - - private Language createLanguage(String schemaLanguage) - throws MojoExecutionException { -diff -Nru maven-jaxb2-plugin-0.13.0/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/OptionsFactory.java maven-jaxb2-plugin-0.13.0.enconding/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/OptionsFactory.java ---- maven-jaxb2-plugin-0.13.0/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/OptionsFactory.java 2015-08-30 11:39:57.000000000 +0200 -+++ maven-jaxb2-plugin-0.13.0.enconding/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/OptionsFactory.java 2015-10-26 07:13:24.428916678 +0100 -@@ -32,12 +32,6 @@ - - options.target = SpecVersion.V2_2; - -- final String encoding = optionsConfiguration.getEncoding(); -- -- if (encoding != null) { -- options.encoding = createEncoding(encoding); -- } -- - options.setSchemaLanguage(createLanguage(optionsConfiguration - .getSchemaLanguage())); - -@@ -94,24 +88,6 @@ - return options; - } - -- private String createEncoding(String encoding) -- throws MojoExecutionException { -- if (encoding == null) { -- return null; -- } -- try { -- if (!Charset.isSupported(encoding)) { -- throw new MojoExecutionException(MessageFormat.format( -- "Unsupported encoding [{0}].", encoding)); -- } -- return encoding; -- } catch (IllegalCharsetNameException icne) { -- throw new MojoExecutionException(MessageFormat.format( -- "Unsupported encoding [{0}].", encoding)); -- } -- -- } -- - private Language createLanguage(String schemaLanguage) - throws MojoExecutionException { - if (StringUtils.isEmpty(schemaLanguage)) { diff --git a/maven-jaxb2-plugin.spec b/maven-jaxb2-plugin.spec index 946173e..e9bcd7d 100644 --- a/maven-jaxb2-plugin.spec +++ b/maven-jaxb2-plugin.spec @@ -12,9 +12,9 @@ Source0: https://github.com/highsource/maven-jaxb2-plugin/archive/%{versio Patch0: %{name}-0.13.0-dont-use-internal-resolver.patch # Adapt for Maven 3: Patch1: %{name}-0.13.0-adapt-for-maven-3.patch -# Remove the enconding option as the version of the XJC compiler that we build +# Remove the encoding option as the version of the XJC compiler that we build # in Fedora doesn't have it: -Patch2: %{name}-0.13.0-remove-enconding-option.patch +Patch2: %{name}-0.13.0-remove-encoding-option.patch BuildArch: noarch BuildRequires: java-headless @@ -33,7 +33,6 @@ BuildRequires: mvn(org.codehaus.plexus:plexus-utils) BuildRequires: mvn(org.glassfish.jaxb:jaxb-runtime) BuildRequires: mvn(org.glassfish.jaxb:jaxb-xjc) BuildRequires: mvn(org.slf4j:slf4j-api) -BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) BuildRequires: mvn(org.sonatype.plexus:plexus-build-api) BuildRequires: mvn(xml-resolver:xml-resolver) @@ -41,6 +40,8 @@ BuildRequires: mvn(xml-resolver:xml-resolver) This Maven 2 plugin wraps the JAXB 2.x XJC compiler and provides the capability to generate Java sources from XML Schemas. +Also see the jaxb2-maven-plugin package. + %package javadoc Summary: API documentation for %{name} @@ -50,6 +51,10 @@ The API documentation of %{name}. %prep %autosetup -p1 + +# Remove parent +%pom_remove_parent + # use glassfish-jaxb = 2.0.5 %pom_disable_module plugin-2.0 # use glassfish-jaxb = 2.1.13 @@ -60,13 +65,13 @@ The API documentation of %{name}. %pom_add_dep com.sun.codemodel:codemodel:2.6 plugin %pom_add_dep com.sun.codemodel:codemodel:2.6 plugin-2.2 -%build - # rename java files with everything commented out, helpmojo can't handle those: -(cd plugin-core/src/main/java/org/jvnet/jaxb2/maven2/resolver/tools/; - mv DelegatingReaderWrapper.java DelegatingReaderWrapper.java_ - mv DelegatingInputStreamWrapper.java DelegatingInputStreamWrapper.java_ -) +cd plugin-core/src/main/java/org/jvnet/jaxb2/maven2/resolver/tools/ +mv DelegatingReaderWrapper.java DelegatingReaderWrapper.java_ +mv DelegatingInputStreamWrapper.java DelegatingInputStreamWrapper.java_ + + +%build %mvn_build %install @@ -80,6 +85,13 @@ The API documentation of %{name}. %license LICENSE %changelog +* Sat May 23 2020 Ankur Sinha - 0.13.3-1 +- Update as per review comments +- Correct typo in patch +- Remove deprecated parent pom +- Remove subshell +- Add note about related package + * Sun May 17 2020 Ankur Sinha - 0.13.3-1 - Unretire - Update to latest release