Revert "Related: rhbz#1594139 Remove unused maven artifacts"

This reverts commit 10e8d18d0e.
This commit is contained in:
Fraser Tweedale 2018-08-03 18:53:35 +10:00
parent 63ef8375bb
commit 8cc30cfbf2

View File

@ -88,6 +88,7 @@ BuildRequires: ant
BuildRequires: findutils
BuildRequires: java-devel >= 1:1.8.0
BuildRequires: jpackage-utils >= 0:1.7.0
BuildRequires: maven-local
BuildRequires: systemd-units
Requires: ant
@ -246,7 +247,8 @@ pushd ${RPM_BUILD_ROOT}%{libdir}
%{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar .
%{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar .
%{__ln_s} ../../tomcat/bin/tomcat-juli.jar .
# Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap)
%{__cp} -a ${RPM_BUILD_ROOT}%{bindir}/tomcat-juli.jar ./
popd
# symlink to the FHS locations where we've installed things
@ -259,6 +261,79 @@ pushd ${RPM_BUILD_ROOT}%{homedir}
%{__ln_s} %{workdir} work
popd
# Install the maven metadata
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir}
pushd output/dist/src/res/maven
for pom in *.pom; do
# fix-up version in all pom files
sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom
done
# we won't install dbcp, juli-adapters and juli-extras pom files
for libname in annotations-api catalina jasper-el jasper catalina-ha; do
%{__cp} -a tomcat-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-$libname.pom
%add_maven_depmap JPP.tomcat-$libname.pom tomcat/$libname.jar
done
# tomcat-util-scan
%{__cp} -a tomcat-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-util-scan.pom
%add_maven_depmap JPP.tomcat-util-scan.pom tomcat/tomcat-util-scan.jar
# tomcat-jni
%{__cp} -a tomcat-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jni.pom
%add_maven_depmap JPP.tomcat-jni.pom tomcat/tomcat-jni.jar
# servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere
%{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom
%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -a "org.eclipse.jetty.orbit:javax.servlet.jsp"
%{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom
%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -a "org.eclipse.jetty.orbit:javax.el"
%{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom
# Generate a depmap fragment javax.servlet:servlet-api pointing to
# tomcat-servlet-3.0-api for backwards compatibility
# also provide jetty depmap (originally in jetty package, but it's cleaner to have it here
%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api"
# replace temporary copy with link
%{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/
# two special pom where jar files have different names
%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom
%add_maven_depmap JPP.tomcat-catalina-tribes.pom tomcat/catalina-tribes.jar
%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom
%add_maven_depmap JPP.tomcat-tomcat-coyote.pom tomcat/tomcat-coyote.jar
%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom
%add_maven_depmap JPP.tomcat-tomcat-juli.pom tomcat/tomcat-juli.jar
%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom
%add_maven_depmap JPP.tomcat-tomcat-api.pom tomcat/tomcat-api.jar
%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom
%add_maven_depmap JPP.tomcat-tomcat-util.pom tomcat/tomcat-util.jar
%{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom
%add_maven_depmap JPP.tomcat-tomcat-jdbc.pom tomcat/tomcat-jdbc.jar
# tomcat-websocket-api
%{__cp} -a tomcat-websocket-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-websocket-api.pom
%add_maven_depmap JPP.tomcat-websocket-api.pom tomcat/websocket-api.jar
# tomcat-tomcat-websocket
%{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom
%add_maven_depmap JPP.tomcat-tomcat-websocket.pom tomcat/tomcat-websocket.jar
# tomcat-jaspic-api
%{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom
%add_maven_depmap JPP.tomcat-jaspic-api.pom tomcat/jaspic-api.jar
# Manually change the metadata filenames
%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat.xml
%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}-tomcat-servlet-api.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat-servlet-api.xml
%pre
# add the tomcat user and group
%{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || :
@ -351,12 +426,33 @@ fi
%{libdir}/*.jar
%{_javadir}/*.jar
%{bindir}/tomcat-juli.jar
%{_mavenpomdir}/JPP.tomcat-annotations-api.pom
%{_mavenpomdir}/JPP.tomcat-catalina-ha.pom
%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom
%{_mavenpomdir}/JPP.tomcat-catalina.pom
%{_mavenpomdir}/JPP.tomcat-jasper-el.pom
%{_mavenpomdir}/JPP.tomcat-jasper.pom
%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom
%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom
%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom
%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom
%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom
%{_mavenpomdir}/JPP.tomcat-websocket-api.pom
%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom
%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom
%{_mavenpomdir}/JPP.tomcat-jni.pom
%{_mavenpomdir}/JPP.tomcat-util-scan.pom
%{_mavenpomdir}/JPP-tomcat-jsp-api.pom
%{_mavenpomdir}/JPP-tomcat-el-api.pom
%{_datadir}/maven-metadata/tomcat.xml
%exclude %{_javadir}/tomcat-servlet-%{servletspec}*.jar
%files -n pki-servlet-%{servletspec}-api
%defattr(-,root,root,-)
%doc LICENSE
%{_javadir}/tomcat-servlet-%{servletspec}*.jar
%{_datadir}/maven-metadata/tomcat-servlet-api.xml
%{_mavenpomdir}/JPP-tomcat-servlet-api.pom
%changelog
* Fri Jul 20 2018 Jean-Frederic Clere <jclere@redhat.com> - 1:9.0.7-12