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

Dependencies with duplicate files detected. The dependencies [org.jboss.logging:jboss-logging::jar:3.4.1.Final(compile), org.jboss.logging:jboss-logging-spi::jar:2.1.2.GA(compile)] contain duplicate files, e.g. org/jboss/logging/MDC.class #14819

Closed
angelo-chan opened this issue Feb 4, 2021 · 6 comments · Fixed by #14922
Labels
area/logging kind/bug Something isn't working
Milestone

Comments

@angelo-chan
Copy link

angelo-chan commented Feb 4, 2021

Describe the bug
Dependencies with duplicate files detected. The dependencies [org.jboss.logging:jboss-logging::jar:3.4.1.Final(compile), org.jboss.logging:jboss-logging-spi::jar:2.1.2.GA(compile)] contain duplicate files, e.g. org/jboss/logging/MDC.class while building the uber jar while include commons-logging and jdk log adaptors in the application:

To Reproduce

Steps to reproduce the behavior:

  1. add below log adaptors to project
<dependency>
    <groupId>org.jboss.logging</groupId>
    <artifactId>commons-logging-jboss-logging</artifactId>
</dependency>
<dependency>
    <groupId>org.jboss.logging</groupId>
    <artifactId>jboss-logging-jdk</artifactId>
</dependency>
  1. build the uber jar:

./mvnw clean package -Dquarkus.package.type=uber-jar

Additional context
common-logging-jboss-logging depends on org.jboss.logging:jboss-logging::jar:3.4.1.Final but
jboss-logging-jdk depends on org.jboss.logging:jboss-logging-spi::jar:2.1.2.GA those 2 have duplicate class e.g. org/jboss/logging/MDC.class

@angelo-chan angelo-chan added the kind/bug Something isn't working label Feb 4, 2021
@ghost ghost added the triage/needs-triage label Feb 4, 2021
@gsmet
Copy link
Member

gsmet commented Feb 4, 2021

/cc @jamezp

@jamezp
Copy link
Contributor

jamezp commented Feb 4, 2021

Where do the jboss-logging-jdk and jboss-logging-spi dependencies come from? I'm not seeing either under the jboss-logging organization https://github.com/jboss-logging.

@jamezp
Copy link
Contributor

jamezp commented Feb 4, 2021

It looks like that came in via 441742e. I'm not sure that is right. That is a very old dependency released over 10 years ago now. I only see a reference to that org.jboss.logging:jboss-logging-jdk in the bom/application/pom.xml and a reference in the documentation. I think it should be removed as a dependency.

@angelo-chan
Copy link
Author

angelo-chan commented Feb 7, 2021

this also comes from the quarkus logging guide https://quarkus.io/guides/logging:

image

@jamezp
Copy link
Contributor

jamezp commented Feb 8, 2021

Yes. I'm not really sure why that was added. I don't think that dependency should be used at all, but we may want to ask @dmlloyd if there was a reason this dependency was added. Maybe it was mistaken for another logging dependency because we have several :)

@dmlloyd
Copy link
Member

dmlloyd commented Feb 8, 2021

Yeah that's definitely a documentation error. That dependency should never be added to a Quarkus application!

stuartwdouglas added a commit to stuartwdouglas/quarkus that referenced this issue Feb 9, 2021
@ghost ghost added this to the 1.12 - master milestone Feb 9, 2021
@gsmet gsmet modified the milestones: 1.12.0.CR1, 1.11.3.Final Feb 10, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Feb 10, 2021
Fixes quarkusio#14819

(cherry picked from commit d7b50d3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants