Skip to content

Improve management of protobuf-java dependency #132

@julianleonard123

Description

@julianleonard123
  1. When using this library with maven you can't compile your code until you include the com.google.protobuf:protobuf-java dependency in your application pom, since this library only includes it as a runtime dependency. It will be easier to use this library is this dependency was included with compile scope.

  2. Similarly, related to the com.google.protobuf:protobuf-java dependency, currently at version 4.30.2 at time of writing this issue. This conflicts with a version of the library pulled in transitively via the io.grpc:grpc-protobuf dependency (which pulls in version 3.25.5). This is observed when using the enforcer maven plugin to DependencyConvergence. Suggestion to improve this: update the build.gradle file to exclude the 3.25.5 version so that consumers will only get the specified version 4.30.2 included in their builds - for more predictable builds.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (no-duplicate-declared-dependencies) on project java-app: 
[ERROR] Rule 0: org.apache.maven.enforcer.rules.dependency.DependencyConvergence failed with message:
[ERROR] Failed while enforcing releasability.
[ERROR] 
[ERROR] Dependency convergence error for com.google.protobuf:protobuf-java:jar:3.25.5 paths to dependency are:
[ERROR] +-com.authzed:java-app:jar:1.0-SNAPSHOT
[ERROR]   +-com.authzed.api:authzed:jar:1.3.0:compile
[ERROR]     +-io.grpc:grpc-protobuf:jar:1.71.0:runtime
[ERROR]       +-com.google.protobuf:protobuf-java:jar:3.25.5:runtime
[ERROR] and
[ERROR] +-com.authzed:java-app:jar:1.0-SNAPSHOT
[ERROR]   +-com.authzed.api:authzed:jar:1.3.0:compile
[ERROR]     +-io.grpc:grpc-protobuf:jar:1.71.0:runtime
[ERROR]       +-com.google.api.grpc:proto-google-common-protos:jar:2.51.0:runtime
[ERROR]         +-com.google.protobuf:protobuf-java:jar:3.25.5:runtime
[ERROR] and
[ERROR] +-com.authzed:java-app:jar:1.0-SNAPSHOT
[ERROR]   +-com.authzed.api:authzed:jar:1.3.0:compile
[ERROR]     +-com.google.protobuf:protobuf-java:jar:4.30.2:runtime

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions