Closed kamalmarhubi closed 7 years ago
As you know, the bazel workspace naming convention is to convert the maven_jar coordinate name to the underscore version, dropping the version number, as in com.google.guava:guava:20.0
-> com_google_guava_guava
.
I suppose we could introduce an option to instead include the maven version in the workspace name, such as com_google_guava_guava_20_0
.
This has the advantage of isolating different versions of jars into their own workspace, with the disadvantage of facilitating a mechanism by which developers could easily end up with multiple guava versions for a semi-complex project unless they are paying attention. I can see why Google internally discourages this.
I'm not sure I know the right answer, but I think it's reasonable to add an option to include the version in the workspace_name to allow this.
Kamal I've merged #5 and implemented experimental_disambiguate_maven_jar_workspace_names
. I think a more granular approach (specify which artifacts should include the version string) would be better, but interested to hear your thoughts.
Should be resolved (some time ago) with the experimental_disambiguate_maven_jar_workspace_names
option. Feel free to re-open if needed.
I'm trying to use
org_pubref_rules_protobuf
in a project that already loadscom.google.protobuf:protobuf-java:jar:2.6.1
(rules_protobuf
wants 3.1.0) andcom.google.guava:guava:20.0
(rules_protobuf
wants 19.0). This results in conflicts like:If
rules_maven
allowed multiple versions of an artifact, perhaps named asbazelified_artifact_name_bazelified_version
that would give some flexibility to work around issues like that.I'm also open to other suggestions on how to deal with this!
I tried the
force
attribute being added in #5, but it does not help in this case. gradle can't make the dependencies work: