Closed
Description
What version of gRPC-Java are you using?
1.71.0
What is your environment?
Microsoft Windows [Version 10.0.26100.3775]
openjdk version "23.0.2" 2025-01-21
OpenJDK Runtime Environment (build 23.0.2+7-58)
OpenJDK 64-Bit Server VM (build 23.0.2+7-58, mixed mode, sharing)
What did you expect to see?
No error
What did you see instead?
Compiler error when I add a dependency on gRPC-Java:
[ERROR] module com.google.protobuf reads package javax.annotation from both annotations.api and jsr305
(com.google.protobuf
is not relevant, I get the same error from all modules in my project)
Steps to reproduce the bug
io.grpc:grpc-api:jar:1.71.0:compile
depends on com.google.code.findbugs:jsr305:jar:3.0.2:compile
but the README.md instructs Java9 users to also add a dependency on:
<dependency> <!-- necessary for Java 9+ -->
<groupId>org.apache.tomcat</groupId>
<artifactId>annotations-api</artifactId>
<version>6.0.53</version>
<scope>provided</scope>
</dependency>
Both these packages contain a javax.annotation
package which means that the package is split across multiple Java Modules which is illegal in Java 9+
Consider dropping the dependency on JSR 305 as it's basically a dead project anyway.
Metadata
Metadata
Assignees
Labels
No labels