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

quarkus-resteasy-common depends on groupId com.sun.activation but rest-assured depends on groupId jakarta.activation #9834

Closed
ge0ffrey opened this issue Jun 5, 2020 · 3 comments · Fixed by #19422
Labels
kind/bug Something isn't working
Milestone

Comments

@ge0ffrey
Copy link
Contributor

ge0ffrey commented Jun 5, 2020

I am seeing this in my mvn dependency:tree:

58-[INFO] |     +- io.quarkus:quarkus-resteasy-common:jar:1.5.0.Final:compile
59-[INFO] |     |  +- ...
63:[INFO] |     |  \- com.sun.activation:jakarta.activation:jar:1.2.1:compile
181-[INFO] |  \- io.rest-assured:xml-path:jar:4.3.0:test
182-[INFO] |     +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.2:test
183:[INFO] |     |  \- jakarta.activation:jakarta.activation-api:jar:1.2.1:test

This leads to:

16:01:54 [WARNING] Rule 0: org.apache.maven.plugins.enforcer.BanDuplicateClasses failed with message:
16:01:54 Duplicate classes found:
16:01:54 
16:01:54   Found in:
16:01:54     jakarta.activation:jakarta.activation-api:jar:1.2.1:test
16:01:54     com.sun.activation:jakarta.activation:jar:1.2.1:compile
16:01:54   Duplicate classes:
16:01:54     javax/activation/MailcapCommandMap$1.class
16:01:54     javax/activation/CommandInfo$Beans$1.class
16:01:54     javax/activation/CommandInfo$Beans.class
16:01:54     javax/activation/MimetypesFileTypeMap$1.class

Suggestion on how to fix: Add enforcer rule <banDuplicateClasses> and see what breaks.
https://www.mojohaus.org/extra-enforcer-rules/banDuplicateClasses.html

Relates to #9839
Relates to rest-assured/rest-assured#1332 (= separate issue) and rest-assured/rest-assured#1333

@ge0ffrey ge0ffrey added the kind/bug Something isn't working label Jun 5, 2020
@ge0ffrey ge0ffrey changed the title quarkus-resteasy-common depends on com.sun.activation but rest-assured depends on jakarta.activation:jakarta quarkus-resteasy-common depends on groupId com.sun.activation but rest-assured depends on groupId jakarta.activation Jun 5, 2020
@sebthom
Copy link
Contributor

sebthom commented Aug 13, 2021

Just hit this issue too, it is still present in the latest Quarkus release.

image

We have the banDuplicateClasses enforcer rule globally activated.

@gsmet
Copy link
Member

gsmet commented Aug 16, 2021

Yeah, it's not so easy to use banDuplicateClasses in our case as there are a ton of issues that are not fixable by us directly. Typically like the REST Assured issue.

That being said, I'll have a look at what @sebthom is showing as I wouldn't expect it to break on our own dependencies.

gsmet added a commit to gsmet/quarkus that referenced this issue Aug 16, 2021
The implementation has the good idea to also embark the API so we cannot
have both the implementation and the API artifacts around.

Fixes quarkusio#9834
@gsmet
Copy link
Member

gsmet commented Aug 16, 2021

I pushed a PR that should this one issue: #19422 .

@quarkus-bot quarkus-bot bot added this to the 2.2 - main milestone Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants