Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions dd-smoke-tests/jersey-2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,24 @@ tasks.named("jar", Jar) {
}
}

// Servlet API conflict resolution:
// Two servlet JARs end up on the test classpath causing a SecurityException (signer mismatch):
// 1. org.eclipse.jetty.orbit:javax.servlet (Servlet 3.0, signed) - from Jetty 9.0.4
// 2. javax.servlet:javax.servlet-api (Servlet 3.1, unsigned) - from the testing module
Copy link
Contributor

Choose a reason for hiding this comment

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

we really need to avoid leaking that out

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed, but this time the issue is a bit different, I tried to do without standard servlet api, but I couldn't make anything work using the jetty signed variant.

// The mock agent server in the test JVM uses repackaged Jetty which requires Servlet 3.1,
// so we exclude the signed Servlet 3.0 and use the unsigned Servlet 3.1 everywhere
// (including in the shadowJar for the smoke test app running in a separate process).
dependencies {
implementation group: 'org.eclipse.jetty', name: 'jetty-server', version:'9.0.4.v20130625'
implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version:'9.0.4.v20130625'
implementation(group: 'org.eclipse.jetty', name: 'jetty-server', version:'9.0.4.v20130625') {
exclude group: 'org.eclipse.jetty.orbit', module: 'javax.servlet'
}
implementation(group: 'org.eclipse.jetty', name: 'jetty-servlet', version:'9.0.4.v20130625') {
exclude group: 'org.eclipse.jetty.orbit', module: 'javax.servlet'
}
implementation group: 'org.glassfish.jersey.containers', name: 'jersey-container-servlet-core', version:'2.0'
implementation group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version:'2.0'
implementation group: 'javax.xml', name: 'jaxb-api', version:'2.1'
implementation group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0'
testImplementation project(':dd-smoke-tests')
testImplementation(testFixtures(project(":dd-smoke-tests:iast-util")))
testImplementation project(':dd-smoke-tests:appsec')
Expand Down
Loading