snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Duplicate javax.annotation.Priority in dependencies #421

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

Describe the bug

Since the update to Quarkus 2.2.1.Final (from 1.13.7.Final), we recognized a problem while building our backends. Message was something about Lombok, but we could track it down to this line of code void onStart(@Observes @Priority(Interceptor.Priority.APPLICATION) StartupEvent startup). We found out that there are 2 Versions of the class javax.annotation.Priority in the dependencies. One is applicable to target PARAMETER and one isn't.

Expected behavior

There should only be 1 version of this class in the dependencies, so the build will work again.

Actual behavior

The wrong one comes from this dependency:

[INFO] | +- io.quarkus:quarkus-jaeger:jar:2.2.1.Final:compile [INFO] | | +- io.jaegertracing:jaeger-core:jar:1.6.0:compile [INFO] | | - io.jaegertracing:jaeger-thrift:jar:1.6.0:compile [INFO] | | +- org.apache.thrift:libthrift:jar:0.14.1:compile [INFO] | | | - org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.46:compile [INFO] | | | - org.apache.tomcat:tomcat-annotations-api:jar:8.5.46:compile

The right one from that:

[INFO] +- io.quarkus:quarkus-smallrye-openapi:jar:2.2.1.Final:compile [INFO] | +- io.smallrye:smallrye-open-api-core:jar:2.1.10:compile [INFO] | | +- org.eclipse.microprofile.openapi:microprofile-openapi-api:jar:2.0.1-RC1:compile [INFO] | | +- org.eclipse.microprofile.config:microprofile-config-api:jar:2.0:compile [INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.12.4:compile [INFO] | | | - org.yaml:snakeyaml:jar:1.29:compile [INFO] | | +- org.jboss:jandex:jar:2.3.1.Final:compile [INFO] | | - org.jboss.logging:jboss-logging:jar:3.4.2.Final:compile [INFO] | +- io.quarkus:quarkus-core:jar:2.2.1.Final:compile [INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile

I think it's pretty random, which class is loaded, so the error might not show up in every case.

How to Reproduce?

Steps to reproduce:

  1. Use sample project
  2. Add Jaeger-dependency
  3. Add a class with void onStart(@Observes @Priority(Interceptor.Priority.APPLICATION) StartupEvent startup)

But as I said before, it seems to be pretty random, which class is loaded first, it is not absolutely sure that this will reproduce the error.

Output of uname -a or ver

Microsoft Windows [Version 10.0.17763.1879]

Output of java -version

OpenJDK Runtime Environment Corretto-11.0.9.12.1 (build 11.0.9.1+12-LTS)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.2.1.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)

Additional information

No response


https://github.com/quarkusio/quarkus/issues/20125


$upstream:20125$