Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jetty / servlet-api dependency clash #592

Open
omarkilani opened this issue Dec 10, 2020 · 0 comments
Open

jetty / servlet-api dependency clash #592

omarkilani opened this issue Dec 10, 2020 · 0 comments

Comments

@omarkilani
Copy link
Contributor

omarkilani commented Dec 10, 2020

I included unfiltered-scalatest in a project as a build dependency, which generated the following dependencyTree:

[info]     +-com.squareup.okhttp3:okhttp:4.9.0
[info]     | +-com.squareup.okio:okio:2.8.0
[info]     | | +-org.jetbrains.kotlin:kotlin-stdlib-common:1.4.0 (evicted by: 1.4.10)
[info]     | | +-org.jetbrains.kotlin:kotlin-stdlib-common:1.4.10
[info]     | | +-org.jetbrains.kotlin:kotlin-stdlib:1.4.0 (evicted by: 1.4.10)
[info]     | | +-org.jetbrains.kotlin:kotlin-stdlib:1.4.10
[info]     | |   +-org.jetbrains.kotlin:kotlin-stdlib-common:1.4.10
[info]     | |   +-org.jetbrains:annotations:13.0
[info]     | |  
[info]     | +-org.jetbrains.kotlin:kotlin-stdlib:1.4.10
[info]     |   +-org.jetbrains.kotlin:kotlin-stdlib-common:1.4.10
[info]     |   +-org.jetbrains:annotations:13.0
[info]     |  
[info]     +-org.scalatest:scalatest-core_2.13:3.2.3 [S]
[info]     | +-org.scala-lang.modules:scala-xml_2.13:1.2.0 (evicted by: 1.3.0)
[info]     | +-org.scala-lang.modules:scala-xml_2.13:1.3.0 [S]
[info]     | +-org.scala-lang:scala-reflect:2.13.4 [S]
[info]     | +-org.scalactic:scalactic_2.13:3.2.3 [S]
[info]     | | +-org.scala-lang:scala-reflect:2.13.4 [S]
[info]     | |
[info]     | +-org.scalatest:scalatest-compatible:3.2.3
[info]     |
[info]     +-ws.unfiltered:unfiltered-filter_2.13:0.12.0-SNAPSHOT [S]
[info]     | +-jakarta.servlet:jakarta.servlet-api:5.0.0 <-------------
[info]     | +-ws.unfiltered:unfiltered_2.13:0.12.0-SNAPSHOT [S]
[info]     |   +-commons-codec:commons-codec:1.15
[info]     |   +-org.scala-lang.modules:scala-xml_2.13:1.3.0 [S]
[info]     |   +-ws.unfiltered:unfiltered-util_2.13:0.12.0-SNAPSHOT [S]
[info]     |
[info]     +-ws.unfiltered:unfiltered-jetty_2.13:0.12.0-SNAPSHOT
[info]     | +-org.eclipse.jetty:jetty-webapp:11.0.0
[info]     | | +-org.eclipse.jetty:jetty-servlet:11.0.0
[info]     | | | +-org.eclipse.jetty:jetty-security:11.0.0
[info]     | | | | +-org.eclipse.jetty:jetty-server:11.0.0
[info]     | | | | | +-org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api:5.0.1 <-------------

For whatever reason, org.eclipse.jetty:jetty-server depends on org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api instead of jakarta.servlet:jakarta.servlet-api, which causes sbt-assembly to fail with:

build	10-Dec-2020 16:57:48	[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/jakarta/servlet/jakarta.servlet-api/5.0.0/jakarta.servlet-api-5.0.0.jar:jakarta/servlet/AsyncContext.class
build	10-Dec-2020 16:57:48	[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/eclipse/jetty/toolchain/jetty-jakarta-servlet-api/5.0.1/jetty-jakarta-servlet-api-5.0.1.jar:jakarta/servlet/AsyncContext.class
build	10-Dec-2020 16:57:48	[error] deduplicate: different file contents found in the following:
build	10-Dec-2020 16:57:48	[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/jakarta/servlet/jakarta.servlet-api/5.0.0/jakarta.servlet-api-5.0.0.jar:jakarta/servlet/AsyncEvent.class
build	10-Dec-2020 16:57:48	[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/eclipse/jetty/toolchain/jetty-jakarta-servlet-api/5.0.1/jetty-jakarta-servlet-api-5.0.1.jar:jakarta/servlet/AsyncEvent.class
build	10-Dec-2020 16:57:48	[error] deduplicate: different file contents found in the following:
build	10-Dec-2020 16:57:48	[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/jakarta/servlet/jakarta.servlet-api/5.0.0/jakarta.servlet-api-5.0.0.jar:jakarta/servlet/AsyncListener.class
build	10-Dec-2020 16:57:48	[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/eclipse/jetty/toolchain/jetty-jakarta-servlet-api/5.0.1/jetty-jakarta-servlet-api-5.0.1.jar:jakarta/servlet/AsyncListener.class
build	10-Dec-2020 16:57:48	[error] deduplicate: different file contents found in the following:
build	10-Dec-2020 16:57:48	[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/jakarta/servlet/jakarta.servlet-api/5.0.0/jakarta.servlet-api-5.0.0.jar:jakarta/servlet/DispatcherType.class
build	10-Dec-2020 16:57:48	[error] /root/.cache/coursier/v1/https/repo1.maven.org/maven2/org/eclipse/jetty/toolchain/jetty-jakarta-servlet-api/5.0.1/jetty-jakarta-servlet-api-5.0.1.jar:jakarta/servlet/DispatcherType.class

Etc, etc.

I'm not sure how to solve this problem unless we change our dependency in Dependencies.scala to use org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api instead.

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

No branches or pull requests

1 participant