Update to version 2.3.5

This commit is contained in:
Didik Supriadi 2021-10-29 16:03:09 +07:00
parent ccec286da0
commit d7ce6c2149
2 changed files with 183 additions and 1718 deletions

File diff suppressed because it is too large Load Diff

286
jaxb.spec
View File

@ -1,42 +1,36 @@
# Conditionally build with a minimal dependency set %global obs_vr 2.3.3-1
%bcond_with jp_minimal
Name: jaxb Name: jaxb
Version: 2.3.3 Version: 2.3.5
Release: 7%{?dist} Release: 1%{?dist}
Summary: JAXB Reference Implementation Summary: JAXB Reference Implementation
# EDL-1.0 license is BSD-3-clause # EDL-1.0 license is BSD-3-clause
License: BSD License: BSD
URL: https://github.com/eclipse-ee4j/jaxb-ri URL: https://github.com/eclipse-ee4j/jaxb-ri
Source0: https://github.com/eclipse-ee4j/jaxb-ri/archive/%{version}-RI.tar.gz BuildArch: noarch
# Avoid hard runtime dep on istack-commons from the main implementation jar Source0: %{url}/archive/%{version}-RI/%{name}-%{version}.tar.gz
Patch0: 0001-Avoid-runtime-dependency-on-istack-commons-from-main.patch
BuildRequires: maven-local BuildRequires: maven-local
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires: mvn(org.apache.ant:ant-junit)
BuildRequires: mvn(com.sun.activation:jakarta.activation) BuildRequires: mvn(com.sun.activation:jakarta.activation)
BuildRequires: mvn(com.sun.istack:istack-commons-runtime)
BuildRequires: mvn(com.sun.xml.fastinfoset:FastInfoset)
BuildRequires: mvn(jakarta.activation:jakarta.activation-api) BuildRequires: mvn(jakarta.activation:jakarta.activation-api)
BuildRequires: mvn(jakarta.xml.bind:jakarta.xml.bind-api) BuildRequires: mvn(jakarta.xml.bind:jakarta.xml.bind-api)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
%if %{without jp_minimal}
BuildRequires: mvn(com.sun.istack:istack-commons-runtime)
BuildRequires: mvn(com.sun.istack:istack-commons-tools)
BuildRequires: mvn(com.sun.xml.dtd-parser:dtd-parser)
BuildRequires: mvn(com.sun.xml.fastinfoset:FastInfoset)
BuildRequires: mvn(junit:junit) BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.apache.ant:ant)
BuildRequires: mvn(org.apache.maven.plugins:maven-failsafe-plugin) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.jvnet.staxex:stax-ex) BuildRequires: mvn(org.jvnet.staxex:stax-ex)
BuildRequires: mvn(xml-resolver:xml-resolver)
BuildRequires: mvn(xmlunit:xmlunit) BuildRequires: mvn(xmlunit:xmlunit)
%endif BuildRequires: mvn(com.sun.xml.dtd-parser:dtd-parser)
BuildRequires: mvn(com.sun.istack:istack-commons-tools)
%global obs_vr 2.3.3-1 BuildRequires: mvn(xml-resolver:xml-resolver)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildArch: noarch BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
%description %description
GlassFish JAXB Reference Implementation. GlassFish JAXB Reference Implementation.
@ -64,26 +58,6 @@ Obsoletes: glassfish-jaxb-parent < %{obs_vr}
Obsoletes: glassfish-jaxb-runtime-parent < %{obs_vr} Obsoletes: glassfish-jaxb-runtime-parent < %{obs_vr}
Obsoletes: glassfish-jaxb-txw-parent < %{obs_vr} Obsoletes: glassfish-jaxb-txw-parent < %{obs_vr}
%if %{with jp_minimal}
# Obsolete packages that are not shipped in the minimal build
Obsoletes: glassfish-jaxb-bom < %{obs_vr}
Obsoletes: glassfish-jaxb-bom-ext < %{obs_vr}
Obsoletes: glassfish-jaxb-codemodel < %{obs_vr}
Obsoletes: glassfish-jaxb-codemodel-annotation-compiler < %{obs_vr}
Obsoletes: glassfish-jaxb-rngom < %{obs_vr}
Obsoletes: glassfish-jaxb-txwc2 < %{obs_vr}
Obsoletes: glassfish-jaxb-xjc < %{obs_vr}
Obsoletes: %{name}-bom < %{obs_vr}
Obsoletes: %{name}-bom-ext < %{obs_vr}
Obsoletes: %{name}-codemodel < %{obs_vr}
Obsoletes: %{name}-codemodel-annotation-compiler < %{obs_vr}
Obsoletes: %{name}-rngom < %{obs_vr}
Obsoletes: %{name}-txwc2 < %{obs_vr}
Obsoletes: %{name}-xjc < %{obs_vr}
Obsoletes: %{name}-xsom < %{obs_vr}
Obsoletes: %{name}-relaxng-datatype < %{obs_vr}
%endif
%description runtime %description runtime
JAXB (JSR 222) Reference Implementation JAXB (JSR 222) Reference Implementation
@ -103,7 +77,6 @@ Summary: Old JAXB Runtime
Old JAXB Runtime module. Contains sources required for runtime processing. Old JAXB Runtime module. Contains sources required for runtime processing.
Standalone bundle suitable for use in OSGi runtimes. Standalone bundle suitable for use in OSGi runtimes.
%if %{without jp_minimal}
%package codemodel %package codemodel
Summary: Codemodel Core Summary: Codemodel Core
# Package renamed from glassfish-jaxb with version 2.3.3-1 in F33 # Package renamed from glassfish-jaxb with version 2.3.3-1 in F33
@ -196,91 +169,195 @@ Obsoletes: relaxngDatatype-javadoc < 2011.1-16
%description relaxng-datatype %description relaxng-datatype
RelaxNG Datatype library. RelaxNG Datatype library.
%endif
%prep %prep
%setup -q -n jaxb-ri-%{version}-RI %autosetup -p1 -n jaxb-ri-%{version}-RI
# Avoid unnecessary runtime dependency on istack commons find -type f '(' -iname '*.jar' -o -iname '*.class' ')' -print -delete
%patch0 -p1
pushd jaxb-ri pushd jaxb-ri
# Remove unnecessary dep on ee4j parent pom (it adds nothing to our downstream builds) # Remove unnecessary dep on ee4j parent pom (it adds nothing to our downstream builds)
%pom_remove_parent boms/bom codemodel external xsom %pom_remove_parent boms/bom external xsom codemodel
# Fix dep on xml resolver
%pom_change_dep -r com.sun.org.apache.xml.internal:resolver xml-resolver:xml-resolver:1.2
sed -i -e 's/com\.sun\.org\.apache\.xml\.internal\.resolver/org.apache.xml.resolver/' xjc/src/main/java/com/sun/tools/xjc/CatalogUtil.java
# Plug-ins not useful for RPM builds # Plug-ins not useful for RPM builds
%pom_remove_plugin -r :buildnumber-maven-plugin %pom_remove_plugin :maven-enforcer-plugin external xsom . codemodel
%pom_remove_plugin -r :maven-enforcer-plugin %pom_remove_plugin :buildnumber-maven-plugin docs/www external xsom . codemodel
# Disable unneeded extra OSGi bundles %pom_xpath_remove 'pom:plugin[pom:artifactId = "maven-compiler-plugin"]/pom:configuration/pom:release' external xsom
%pom_disable_module xjc bundles
%pom_disable_module jxc bundles %pom_xpath_set 'pom:execution[pom:id = "base-compile"]/pom:configuration/pom:release' 8 external xsom
%pom_disable_module ri bundles
%pom_disable_module osgi bundles %pom_xpath_inject 'pom:plugin[pom:artifactId = "maven-compiler-plugin"]/pom:executions' '
<execution>
<id>module-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>9</source>
<target>9</target>
<includes>
<include>module-info.java</include>
</includes>
</configuration>
</execution>' external xsom bundles/runtime
%pom_xpath_set 'pom:execution[pom:id = "base-compile"]/pom:id' default-compile external xsom
%pom_xpath_replace 'pom:execution[pom:id = "default-compile"]/pom:id' '
<id>module-compile</id>
<goals>
<goal>compile</goal>
</goals>' txw/compiler codemodel/codemodel-annotation-compiler xjc bundles/xjc
%pom_xpath_inject 'pom:execution[pom:id = "module-compile"]/pom:configuration' '
<source>9</source>
<target>9</target>
<includes>
<include>module-info.java</include>
</includes>' txw/compiler codemodel/codemodel-annotation-compiler xjc bundles/xjc
%pom_xpath_inject 'pom:plugin[pom:artifactId = "maven-compiler-plugin"]/pom:executions' '
<execution>
<id>default-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>8</source>
<target>8</target>
<release>8</release>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>' txw/compiler codemodel/codemodel-annotation-compiler xjc bundles/xjc
# Fix dep on xml resolver
%pom_change_dep com.sun.org.apache.xml.internal:resolver xml-resolver:xml-resolver:1.2 xjc bundles/xjc
sed -i -e 's/com\.sun\.org\.apache\.xml\.internal\.resolver/org.apache.xml.resolver/' xjc/src/main/java/com/sun/tools/xjc/CatalogUtil.java
# Missing dep in Fedora: org.checkerframework:compiler # Missing dep in Fedora: org.checkerframework:compiler
%pom_disable_module jxc %pom_disable_module jxc
%if %{with jp_minimal} # Disable unneeded extra OSGi bundles
# For minimal build disable all modules with extra deps %pom_disable_module osgi bundles
%pom_disable_module external %pom_disable_module ri bundles
%pom_disable_module compiler txw %pom_disable_module xjc bundles
%pom_disable_module xjc %pom_disable_module jxc bundles
%pom_disable_module xsom
%pom_disable_module codemodel
# Don't run tests for minimal build
%pom_remove_plugin -r :maven-failsafe-plugin
# Remove optional extra marshaller implementations for minimal build
%pom_remove_dep org.jvnet.staxex:stax-ex runtime/impl bundles/runtime
%pom_remove_dep com.sun.xml.fastinfoset:FastInfoset runtime/impl bundles/runtime
rm runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/{FastInfoset,StAXEx}Connector.java
rm runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/output/{FastInfoset,StAXEx}StreamWriterOutput.java
sed -i -e '/org.jvnet.staxex/d' -e '/com.sun.xml.fastinfoset/d' runtime/impl/src/main/java/module-info.java bundles/runtime/src/main/java/module-info.java
%endif
# Fastinfoset and Staxex are optional deps, reflect that in OSGi metadata %pom_add_plugin :maven-antrun-plugin bundles/runtime '
sed -i -e '/<Import-Package>/aorg.jvnet.staxex;resolution:=optional,org.jvnet.fastinfoset.stax;resolution:=optional,com.sun.xml.fastinfoset.stax;resolution:=optional,' bundles/runtime/pom.xml <executions>
<execution>
<id>unzip-jar</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<unzip src="%{_javadir}/jaxb-istack-commons/istack-commons-runtime.jar"
dest="${dep.sources}">
<patternset>
<exclude name="**/module-info.*"/>
<exclude name="**/META-INF/versions/**"/>
<exclude name="**/META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
# Ignore tests that require Internet connections <unzip src="%{_javadir}/jaxb-istack-commons/istack-commons-runtime.jar"
sed -i -e 's/void testParse/void ignoreTestParse/' xsom/src/test/java/XSOMParserTest.java dest="${dep.sources.mr}">
# Ignore tests that require an ancient version of javaparser (version in Fedora is too new) <patternset>
%pom_remove_dep com.google.code.javaparser:javaparser codemodel/codemodel <include name="**/META-INF/versions/9/**"/>
rm codemodel/codemodel/src/test/java/com/sun/codemodel/tests/JDefinedClassInstanceInitTest.java </patternset>
# Ignore tests requiring org.jmockit:jmockit which is not in Fedora </unzip>
%pom_remove_dep -r org.jmockit:jmockit </target>
rm xjc/src/test/java/com/sun/tools/xjc/addon/code_injector/PluginImplTest.java </configuration>
# Missing test dep for OSGi tests </execution>
%pom_remove_plugin org.apache.felix:maven-junit4osgi-plugin bundles/runtime </executions>'
# Compatibility aliases #pom_add_plugin :maven-antrun-plugin bundles/xjc '
%mvn_alias org.glassfish.jaxb:jaxb-xjc "com.sun.xml.bind:jaxb-xjc" # <executions>
# <execution>
# <id>unzip-jar</id>
# <phase>generate-sources</phase>
# <goals>
# <goal>run</goal>
# </goals>
# <configuration>
# <target>
#
# <unzip src="{_javadir}/jaxb-istack-commons/istack-commons-tools.jar"
# dest="${dep.sources}">
# <patternset>
# <exclude name="**/module-info.*"/>
# <exclude name="**/META-INF/versions/**"/>
# <exclude name="**/META-INF/MANIFEST.MF"/>
# </patternset>
# </unzip>
#
# <unzip src="{_javadir}/jaxb-istack-commons/istack-commons-tools.jar"
# dest="${dep.sources.mr}">
# <patternset>
# <include name="**/META-INF/versions/9/**"/>
# </patternset>
# </unzip>
#
# <unzip src="{_javadir}/xml-resolver.jar"
# dest="${dep.sources}">
# <patternset>
# <exclude name="**/module-info.*"/>
# <exclude name="**/META-INF/versions/**"/>
# <exclude name="**/META-INF/MANIFEST.MF"/>
# </patternset>
# </unzip>
#
# <unzip src="{_javadir}/xml-resolver.jar"
# dest="${dep.sources.mr}">
# <patternset>
# <include name="**/META-INF/versions/9/**"/>
# </patternset>
# </unzip>
#
# <unzip src="{_javadir}/jaxb-dtd-parser/dtd-parser.jar"
# dest="${dep.sources}">
# <patternset>
# <exclude name="**/module-info.*"/>
# <exclude name="**/META-INF/versions/**"/>
# <exclude name="**/META-INF/MANIFEST.MF"/>
# </patternset>
# </unzip>
#
# <unzip src="{_javadir}/jaxb-dtd-parser/dtd-parser.jar"
# dest="${dep.sources.mr}">
# <patternset>
# <include name="**/META-INF/versions/9/**"/>
# </patternset>
# </unzip>
#
# </target>
# </configuration>
# </execution>
# </executions>'
%pom_disable_module docs
%pom_disable_module tools/osgi_tests
# Compatibility
%mvn_alias org.glassfish.jaxb:jaxb-xjc com.sun.xml.bind:jaxb-xjc
%mvn_alias org.glassfish.jaxb:jaxb-runtime org.glassfish.jaxb:jaxb-core %mvn_alias org.glassfish.jaxb:jaxb-runtime org.glassfish.jaxb:jaxb-core
%mvn_alias org.glassfish.jaxb:xsom com.sun.xsom:xsom %mvn_alias org.glassfish.jaxb:xsom com.sun.xsom:xsom
%mvn_alias com.sun.xml.bind.external:relaxng-datatype com.github.relaxng:relaxngDatatype relaxngDatatype:relaxngDatatype %mvn_alias com.sun.xml.bind.external:relaxng-datatype com.github.relaxng:relaxngDatatype relaxngDatatype:relaxngDatatype
# Don't install aggregator and parent poms # Don't install aggregator and parent poms
%mvn_package com.sun.xml.bind.mvn: __noinstall %mvn_package com.sun.xml.bind.mvn: __noinstall
%mvn_package :::sources __noinstall
%if %{with jp_minimal}
# Don't install aggregator poms or boms for minimal build
%mvn_package :jaxb-bom* __noinstall
%endif
popd popd
%build %build
pushd jaxb-ri pushd jaxb-ri
%if %{with jp_minimal} %mvn_build -s -j -f -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
# Don't run tests for minimal build
%mvn_build -j -s -f -- -Ddev -DbuildNumber=unknown -Drelaxng.version=%{version}
%else
%mvn_build -j -s -- -Ddev -DbuildNumber=unknown -Drelaxng.version=%{version}
%endif
popd popd
%install %install
@ -297,7 +374,6 @@ popd
%files impl -f jaxb-ri/.mfiles-jaxb-impl %files impl -f jaxb-ri/.mfiles-jaxb-impl
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
%if %{without jp_minimal}
%files codemodel -f jaxb-ri/.mfiles-codemodel %files codemodel -f jaxb-ri/.mfiles-codemodel
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
@ -319,9 +395,13 @@ popd
%files xsom -f jaxb-ri/.mfiles-xsom %files xsom -f jaxb-ri/.mfiles-xsom
%files relaxng-datatype -f jaxb-ri/.mfiles-relaxng-datatype %files relaxng-datatype -f jaxb-ri/.mfiles-relaxng-datatype
%endif
%changelog %changelog
* Tue Oct 26 2021 Didik Supriadi <didiksupriadi41@fedoraproject.org> - 2.3.5-1
- Update to version 2.3.5
- Remove jp_minimal
- Disable tests
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-7 * Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild