Open cowwoc opened 2 hours ago
Describe the bug This library is incompatible with Java Modules. If you run mvn dependency:tree you will see:
mvn dependency:tree
[INFO] +- io.kubernetes:client-java-api:jar:21.0.1:compile [INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile [INFO] | +- jakarta.annotation:jakarta.annotation-api:jar:3.0.0:compile [INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
javax.annotation
jakarta.annotation
jsr305
Anyone who tries declaring this library as a dependency will get this error:
module X reads package javax.annotation from both jsr305 and java.annotation
Client Version 21.0.1
Java Version 23
To Reproduce Create an application that contains a module-info.java that contains the following lines:
module-info.java
requires io.kubernetes.client.java; requires io.kubernetes.client.java.api;
Expected behavior Ability to use from Java Modules. You'll need to replace all uses of javax.annotation by jakarta.annotation and ideally please find a replacement for JSR 305. See https://nipafx.dev/jsr-305-java-9/ for what a mess it is on Java 9+.
This issue is related to https://github.com/kubernetes-client/java/issues/2606
Describe the bug This library is incompatible with Java Modules. If you run
mvn dependency:tree
you will see:javax.annotation
andjakarta.annotation
. I believe the latter is meant to replace the former.javax.annotation
andjsr305
export the same package.Anyone who tries declaring this library as a dependency will get this error:
module X reads package javax.annotation from both jsr305 and java.annotation
Client Version 21.0.1
Java Version 23
To Reproduce Create an application that contains a
module-info.java
that contains the following lines:Expected behavior Ability to use from Java Modules. You'll need to replace all uses of
javax.annotation
byjakarta.annotation
and ideally please find a replacement for JSR 305. See https://nipafx.dev/jsr-305-java-9/ for what a mess it is on Java 9+.