When using generate_workspace transitive dependencies are not always included in the exports parameter of java_library. This does not always happen (one guess would be that this happens when two artifacts share some common dependencies).
Example
bazel run //src/tools/generate_workspace -- --artifact=com.twitter:twitter-server_2.11:1.25.0
Migrated from issue #2310 in main repository.
Description
When using
generate_workspace
transitive dependencies are not always included in theexports
parameter ofjava_library
. This does not always happen (one guess would be that this happens when two artifacts share some common dependencies).Example
Output:
Output (transitive dependencies are missing):
Potential causes may be found here: https://github.com/bazelbuild/bazel/blob/master/src/tools/generate_workspace/src/main/java/com/google/devtools/build/workspace/maven/Resolver.java#L166
New instance of Rule is created and transitive dependencies are resolved and added only in the case that the dependency is new. If the dependency already exists the dependencies will never be populated and https://github.com/bazelbuild/bazel/blob/master/src/tools/generate_workspace/src/main/java/com/google/devtools/build/workspace/maven/Resolver.java#L185 will have no effect.