SOLR-17069: Don't include jetty-jakarta-servlet-api JAR (EE9)#3838
SOLR-17069: Don't include jetty-jakarta-servlet-api JAR (EE9)#3838dsmiley merged 7 commits intoapache:mainfrom
Conversation
Our Jetty 12 migration should not have incorporated org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api. This commit removes that completely.
|
I checked and see the "toolchain" JAR I'm removing was present in Solr 9.x... so looking at this PR as part of the Jetty 12 upgrade is not entirely accurate. Sunjay understandably merely bumped the version. But the Jetty upgrade enabled this to be possible, whereas it wasn't possible in 9.x. Perhaps the best JIRA here is SOLR-17503, the umbrella issue for Jakarta namespace. Shrug; whatever; I'll ensure the commit message reflects both. |
… response interfaces.
|
I was just curious what's the javax stuff inside the toolchain jar. All of them are schema files no code classes, I believe to support old web xml files. |
|
I don't see much difference between |
|
(embarassed); I should have looked closer at precisely what the javax stuff was in that JAR; thanks Sanjay. Still... it seems wrong and likely problematic to include this JAR from EE 9 when we already have Servlet v6 JAR in the build, which is aligned with EE 10. |
|
Yes toolchain is not even active anymore and no support for EE10 actually. So +1 to the change. And with this everything Jakarta related is EE10 now. |
|
May be we should change the title of this PR. |
| === Upgrade to Jetty 12.x and Jakarta namespace | ||
|
|
||
| Solr upgraded to Jetty 12.x from 10.x as Jetty 10 and 11 have reached end-of-life support. Jetty 12.x requires Java 17 or newer and is fully compatible with Solr's new minimum requirement of Java 21. This upgrade brings support for modern HTTP protocols and adopts the Jakarta EE 10 namespace. For more details, see https://webtide.com/jetty-12-has-arrived/. | ||
| This migration marks the point at which Solr no longer includes _any_ JAR with "javax" in it -- the Jakarta migration is complete. |
There was a problem hiding this comment.
This may not be valid anymore.
There was a problem hiding this comment.
The one-liner command in the PR description validates this. And the adjacent PR #3839 improves the smoketester to validate it.
…E9) (#3838) We should not have this JAR org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api as it is for Jakarta EE 9, and it contains javax XSD definitions. It also contains servlet classes for v5 that compete with jakarta servlet-api v6 that we already depend on in some places. * Use mocking instead of implementing the entire HttpServletRequest and response interfaces. * toml: remove unused jetty lib references * NOTICE: the servlet references were obsolete. The servlet JAR has it's own license file, and isn't CDDL either. (cherry picked from commit 50808cd)
…E9) (#3838) We should not have this JAR org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api as it is for Jakarta EE 9, and it contains javax XSD definitions. It also contains servlet classes for v5 that compete with jakarta servlet-api v6 that we already depend on in some places. * Use mocking instead of implementing the entire HttpServletRequest and response interfaces. * toml: remove unused jetty lib references * NOTICE: the servlet references were obsolete. The servlet JAR has it's own license file, and isn't CDDL either. (cherry picked from commit 50808cd)
https://issues.apache.org/jira/browse/SOLR-17069
Our Jetty 12 migration should not have incorporated
org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api. This commit removes that completely. The removal of this marks a milestone -- there is no JAR that Solr ships that includes "javax" stuff.find . -type f -name "*.jar" -ls -exec sh -c 'unzip -l "$1" 2>/dev/null | grep -q "javax/" && echo "$1"' _ {} \;