Disable ancient jaxb1 runtime

Enable OSGi bundle version of the runtime
Spec file clean up
This commit is contained in:
Mat Booth 2019-05-10 00:32:41 +01:00
parent 89dc380985
commit 8517c71115

View File

@ -1,6 +1,6 @@
Name: glassfish-jaxb
Version: 2.2.11
Release: 11%{?dist}
Release: 12%{?dist}
Summary: JAXB Reference Implementation
License: CDDL-1.1 and GPLv2 with exceptions
@ -18,17 +18,15 @@ BuildRequires: mvn(com.sun.xml.dtd-parser:dtd-parser)
BuildRequires: mvn(com.sun.xml.fastinfoset:FastInfoset)
BuildRequires: mvn(com.sun.xsom:xsom)
BuildRequires: mvn(javax.xml.bind:jaxb-api)
BuildRequires: mvn(net.java.dev.msv:msv-core)
BuildRequires: mvn(net.java:jvnet-parent:pom:)
BuildRequires: mvn(org.apache.ant:ant)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.jvnet.staxex:stax-ex)
BuildRequires: mvn(relaxngDatatype:relaxngDatatype)
Requires: glassfish-jaxb1-impl = %{version}-%{release}
Requires: %{name}-bom = %{version}-%{release}
Requires: %{name}-bom-ext = %{version}-%{release}
Requires: %{name}-codemodel = %{version}-%{release}
@ -46,6 +44,8 @@ Requires: %{name}-txwc2 = %{version}-%{release}
Requires: %{name}-txw-parent = %{version}-%{release}
Requires: %{name}-xjc = %{version}-%{release}
Obsoletes: glassfish-jaxb1-impl < 2.2.11-12
BuildArch: noarch
%description
@ -65,12 +65,6 @@ Summary: Codemodel Annotation Compiler
The annotation compiler ant task for the CodeModel java source code
generation library.
%package -n glassfish-jaxb1-impl
Summary: JAXB1 Runtime
%description -n glassfish-jaxb1-impl
Runtime classes for JAXB1 runtime implementation.
%package bom
Summary: JAXB BOM
@ -170,23 +164,43 @@ This package contains the API documentation for %{name}.
%patch0 -p1
%pom_disable_module bundles
# Disable unneeded OSGi bundles
%pom_disable_module xjc bundles
%pom_disable_module jxc bundles
%pom_disable_module ri bundles
%pom_disable_module osgi bundles
%pom_disable_module core bundles
# Fix jar plug-in usage for OSGi bundles
%pom_xpath_replace "pom:useDefaultManifestFile" "
<archive>
<manifestFile>\${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>" bundles/core bundles/runtime
# Disable ancient jaxb1 runtime
%pom_disable_module jaxb1 runtime
%pom_remove_dep com.sun:tools
%pom_add_dep_mgmt com.sun:tools
%pom_remove_dep com.sun:tools jxc
%pom_add_dep com.sun:tools jxc
%pom_remove_dep com.sun.xml.bind:jaxb-release-documentation bundles/ri
%pom_remove_dep com.sun.xml.bind:jaxb-samples bundles/ri
%pom_remove_plugin :gfnexus-maven-plugin
%pom_remove_plugin :maven-site-plugin
# Plug-ins not useful for RPM builds
%pom_remove_plugin :buildnumber-maven-plugin
%pom_remove_plugin :gfnexus-maven-plugin
%pom_remove_plugin :maven-enforcer-plugin
%pom_remove_plugin :maven-site-plugin
%pom_remove_plugin :maven-source-plugin jxc
%pom_remove_plugin :maven-source-plugin xjc
%mvn_alias org.glassfish.jaxb:jaxb-runtime "com.sun.xml.bind:jaxb-impl"
%mvn_alias org.glassfish.jaxb:jaxb-xjc "com.sun.xml.bind:jaxb-xjc"
# Don't install bundles parent pom
%mvn_package com.sun.xml.bind.mvn:jaxb-bundles __noinstall
# Package OSGi version of runtime with the non-OSGi version
%mvn_package com.sun.xml.bind:jaxb-impl jaxb-runtime
%build
%mvn_build -f -s -- -Ddev -DbuildNumber=unknown
@ -194,65 +208,58 @@ This package contains the API documentation for %{name}.
%mvn_install
%files
%doc License.txt licenceheader.txt License.html
%license License.txt licenceheader.txt License.html
%files codemodel -f .mfiles-codemodel
%dir %{_javadir}/%{name}
%doc License.txt licenceheader.txt License.html
%license License.txt licenceheader.txt License.html
%files codemodel-annotation-compiler -f .mfiles-codemodel-annotation-compiler
%dir %{_javadir}/%{name}
%files -n glassfish-jaxb1-impl -f .mfiles-jaxb1-impl
%dir %{_javadir}/%{name}
%files bom -f .mfiles-jaxb-bom
%doc License.txt licenceheader.txt License.html
%license License.txt licenceheader.txt License.html
%files bom-ext -f .mfiles-jaxb-bom-ext
%files codemodel-parent -f .mfiles-jaxb-codemodel-parent
%files core -f .mfiles-jaxb-core
%dir %{_javadir}/%{name}
%doc License.txt licenceheader.txt License.html
%license License.txt licenceheader.txt License.html
%files external-parent -f .mfiles-jaxb-external-parent
%files jxc -f .mfiles-jaxb-jxc
%dir %{_javadir}/%{name}
%doc License.txt licenceheader.txt License.html
%license License.txt licenceheader.txt License.html
%files parent -f .mfiles-jaxb-parent
%files runtime -f .mfiles-jaxb-runtime
%dir %{_javadir}/%{name}
%doc License.txt licenceheader.txt License.html
%license License.txt licenceheader.txt License.html
%files runtime-parent -f .mfiles-jaxb-runtime-parent
%files txw-parent -f .mfiles-jaxb-txw-parent
%files xjc -f .mfiles-jaxb-xjc
%dir %{_javadir}/%{name}
%files rngom -f .mfiles-rngom
%dir %{_javadir}/%{name}
%doc License.txt licenceheader.txt License.html
%license License.txt licenceheader.txt License.html
%files txw2 -f .mfiles-txw2
%dir %{_javadir}/%{name}
%doc License.txt licenceheader.txt License.html
%license License.txt licenceheader.txt License.html
%files txwc2 -f .mfiles-txwc2
%dir %{_javadir}/%{name}
%doc License.txt licenceheader.txt License.html
%license License.txt licenceheader.txt License.html
%files javadoc -f .mfiles-javadoc
%doc License.txt licenceheader.txt License.html
%license License.txt licenceheader.txt License.html
%changelog
* Thu May 09 2019 Mat Booth <mat.booth@redhat.com> - 2.2.11-12
- Disable ancient jaxb1 runtime
- Enable OSGi bundle version of the runtime
- Spec file clean up
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild