Add mvn virtual provides back for the servlet, el, and jsp spec impls

This commit is contained in:
Coty Sutherland 2021-06-05 20:23:34 -04:00
parent 7d7781ca24
commit de863ffa66

View File

@ -192,6 +192,13 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "
# Remove webservices naming resources as it's generally unused
%{__rm} -rf java/org/apache/naming/factory/webservices
# Configure maven files
%mvn_package ":tomcat-el-api" tomcat-el-api
%mvn_alias "org.apache.tomcat:tomcat-el-api" "org.eclipse.jetty.orbit:javax.el"
%mvn_package ":tomcat-jsp-api" tomcat-jsp-api
%mvn_alias "org.apache.tomcat:tomcat-jsp-api" "org.eclipse.jetty.orbit:javax.servlet.jsp"
%mvn_package ":tomcat-servlet-api" tomcat-servlet-api
%build
export OPT_JAR_LIST="xalan-j2-serializer"
@ -229,6 +236,7 @@ export OPT_JAR_LIST="xalan-j2-serializer"
# see https://tomcat.apache.org/tomcat-9.0-doc/security-howto.html
%{__rm} -rf output/build/webapps/examples
%install
# build initial path structure
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir}
@ -331,6 +339,20 @@ pushd ${RPM_BUILD_ROOT}%{homedir}
%{__ln_s} %{workdir} work
popd
# Install the maven metadata for the spec impl artifacts as other projects use them
#%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir}
pushd res/maven
for pom in tomcat-el-api.pom tomcat-jsp-api.pom tomcat-servlet-api.pom; do
# fix-up version in all pom files
sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom
done
popd
# Configure and install maven artifacts
%mvn_artifact res/maven/tomcat-el-api.pom output/build/lib/el-api.jar
%mvn_artifact res/maven/tomcat-jsp-api.pom output/build/lib/jsp-api.jar
%mvn_artifact res/maven/tomcat-servlet-api.pom output/build/lib/servlet-api.jar
%mvn_install
%pre
# add the tomcat user and group
@ -445,9 +467,6 @@ fi
%files docs-webapp
%{appdir}/docs
%files jsp-%{jspspec}-api
%{_javadir}/%{name}-jsp-%{jspspec}*.jar
%files lib
%dir %{libdir}
%{libdir}/*.jar
@ -458,11 +477,14 @@ fi
%exclude %{_javadir}/%{name}-el-%{elspec}-api.jar
%exclude %{_javadir}/%{name}-jsp-%{jspspec}*.jar
%files servlet-%{servletspec}-api
%files jsp-%{jspspec}-api -f .mfiles-tomcat-jsp-api
%{_javadir}/%{name}-jsp-%{jspspec}*.jar
%files servlet-%{servletspec}-api -f .mfiles-tomcat-servlet-api
%doc LICENSE
%{_javadir}/%{name}-servlet-%{servletspec}*.jar
%files el-%{elspec}-api
%files el-%{elspec}-api -f .mfiles-tomcat-el-api
%doc LICENSE
%{_javadir}/%{name}-el-%{elspec}-api.jar
%{libdir}/%{name}-el-%{elspec}-api.jar
@ -472,8 +494,9 @@ fi
%{appdir}/ROOT
%changelog
* Fri Jun 04 2021 Coty Sutherland <csutherl@redhat.com> 1:9.0.45-4
* Sat Jun 05 2021 Coty Sutherland <csutherl@redhat.com> 1:9.0.45-4
- Add back logrotate config file per devel list request
- Add mvn virtual provides back for the servlet, el, and jsp spec impls
* Fri Jun 04 2021 Coty Sutherland <csutherl@redhat.com> 1:9.0.45-3
- Drop geronimo-jaxrpc, which provided the webservices naming factory resources that are generally unused