Skip to content

Update servlet exclusions from javax to jakarta namespace#38

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1776966608-update-jersey-servlet-exclusions
Open

Update servlet exclusions from javax to jakarta namespace#38
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1776966608-update-jersey-servlet-exclusions

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Summary

Updates the Maven dependency exclusions in pom.xml for two Jersey test framework providers (jersey-test-framework-provider-inmemory and jersey-test-framework-provider-grizzly2) from javax.servlet:javax.servlet-api to jakarta.servlet:jakarta.servlet-api.

The junit exclusions are unchanged.

Review & Testing Checklist for Human

  • Verify the Jersey/Dropwizard version actually transitively depends on jakarta.servlet — Dropwizard 1.0.5 is quite old and its Jersey dependencies may still pull in javax.servlet, not jakarta.servlet. If so, this exclusion change would be a no-op and javax.servlet-api would leak back into the test classpath. Run mvn dependency:tree -Dscope=test and confirm that jakarta.servlet:jakarta.servlet-api appears as a transitive dep of these two providers.
  • Run mvn clean test to 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

Co-Authored-By: Wes Convery <2wconvery@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

View 1 additional finding in Devin Review.

Open in Devin Review

Comment thread pom.xml
Comment on lines +80 to +81
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Suggested change
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pom.xml
Comment on lines +95 to +96
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Suggested change
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant