Also ship the API in the old javax namespace to aid transition

This commit is contained in:
Mat Booth 2020-08-19 10:37:03 +01:00
parent 40af0f0dc5
commit a5e2fb655c

View File

@ -2,7 +2,7 @@
Name: jakarta-servlet
Version: 5.0.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Server-side API for handling HTTP requests and responses
# most of the project is EPL-2.0 or GPLv2 w/exceptions,
# but some files still have Apache-2.0 license headers:
@ -47,6 +47,13 @@ This package contains the API documentation for %{name}.
# do not build specification documentation
%pom_disable_module spec
# Copy to old package name
# TODO: Remove when all dependencies are migrated from javax.servlet to jakarta.servlet
cp -pr api/src/main/java/jakarta api/src/main/java/javax
sed -i -e 's/jakarta\./javax./g' $(find api/src/main/java/javax -name *.java)
%pom_xpath_replace pom:instructions/pom:Export-Package \
'<Export-Package>jakarta.servlet.*,javax.servlet.*;version="4.0.0"</Export-Package>' api
# do not install useless parent POM
%mvn_package jakarta.servlet:servlet-parent __noinstall
@ -80,6 +87,9 @@ This package contains the API documentation for %{name}.
%changelog
* Wed Aug 19 2020 Mat Booth <mat.booth@redhat.com> - 5.0.0-2
- Also ship the API in the old javax namespace to aid transition
* Thu Aug 13 2020 Fabio Valentini <decathorpe@gmail.com> - 5.0.0-1
- Initial package renamed from glassfish-servlet-api.