Update servlet exclusions from javax to jakarta namespace#38
Update servlet exclusions from javax to jakarta namespace#38devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
Co-Authored-By: Wes Convery <2wconvery@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| <groupId>jakarta.servlet</groupId> | ||
| <artifactId>jakarta.servlet-api</artifactId> |
There was a problem hiding this comment.
🔴 Exclusions target non-existent jakarta.servlet artifacts, leaving javax.servlet-api un-excluded
The project uses Dropwizard BOM version ${project.version} which resolves to 1.0.5 (pom.xml:7,16). Dropwizard 1.0.5 and its transitive Jersey dependencies use the old javax.servlet:javax.servlet-api artifact, not the jakarta.servlet:jakarta.servlet-api artifact (the Jakarta namespace was introduced in Jakarta EE 9, well after this Dropwizard version). By changing the exclusion coordinates from javax.servlet:javax.servlet-api to jakarta.servlet:jakarta.servlet-api, the exclusions now target artifacts that don't exist in the dependency tree, meaning javax.servlet:javax.servlet-api is no longer excluded and will be pulled in as a transitive dependency from both jersey-test-framework-provider-inmemory and jersey-test-framework-provider-grizzly2. This can cause servlet API classpath conflicts during testing.
| <groupId>jakarta.servlet</groupId> | |
| <artifactId>jakarta.servlet-api</artifactId> | |
| <groupId>javax.servlet</groupId> | |
| <artifactId>javax.servlet-api</artifactId> |
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Acknowledged — this is a valid observation. Dropwizard 1.0.5 transitively pulls javax.servlet:javax.servlet-api, not the Jakarta namespace variant, so these exclusions will indeed be no-ops on the current dependency tree. However, this change was explicitly requested by the PR author. Deferring to @WesternConcrete on whether to keep or revert.
| <groupId>jakarta.servlet</groupId> | ||
| <artifactId>jakarta.servlet-api</artifactId> |
There was a problem hiding this comment.
🔴 Exclusions target non-existent jakarta.servlet artifacts in grizzly2 provider
Same issue as in the inmemory provider: the exclusion for jersey-test-framework-provider-grizzly2 was changed from javax.servlet:javax.servlet-api to jakarta.servlet:jakarta.servlet-api, but the transitive dependency is javax.servlet:javax.servlet-api (Dropwizard 1.0.5 uses pre-Jakarta EE dependencies). The exclusion is now a no-op, and javax.servlet-api will leak into the test classpath.
| <groupId>jakarta.servlet</groupId> | |
| <artifactId>jakarta.servlet-api</artifactId> | |
| <groupId>javax.servlet</groupId> | |
| <artifactId>javax.servlet-api</artifactId> |
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Same as above — valid point that the grizzly2 provider's transitive deps use javax.servlet, not jakarta.servlet. This change was explicitly requested. Deferring to @WesternConcrete.
Summary
Updates the Maven dependency exclusions in
pom.xmlfor two Jersey test framework providers (jersey-test-framework-provider-inmemoryandjersey-test-framework-provider-grizzly2) fromjavax.servlet:javax.servlet-apitojakarta.servlet:jakarta.servlet-api.The
junitexclusions are unchanged.Review & Testing Checklist for Human
jakarta.servlet— Dropwizard 1.0.5 is quite old and its Jersey dependencies may still pull injavax.servlet, notjakarta.servlet. If so, this exclusion change would be a no-op andjavax.servlet-apiwould leak back into the test classpath. Runmvn dependency:tree -Dscope=testand confirm thatjakarta.servlet:jakarta.servlet-apiappears as a transitive dep of these two providers.mvn clean testto ensure the build and tests still pass with the updated exclusions.Notes
This is a namespace-only change (4 lines across 2 exclusion blocks). No application code or test code is modified.
Link to Devin session: https://app.devin.ai/sessions/830ff652fb77400c9012403165704994
Requested by: @WesternConcrete