bazeltools / bazel-deps

Generate bazel dependencies for maven artifacts
MIT License
250 stars 122 forks source link

Consider using java_import_external #240

Open mjduijn opened 5 years ago

mjduijn commented 5 years ago

By using java_import_external or jvm_maven_import_external it is possible to correctly import dependencies from maven without needing a set of generated BUILD files (please correct me if I'm wrong in this).

If bazel-deps generated a .bzl file with either of the above instead of a custom repository_rule users can get a complete set of dependencies by specifying @org_mockito_mockito_core instead of //third_party/jvm/org/mockito:mockito_core for example.

One more thing: java_import_external makes the //jar suffix optional on imported jars. Some libraries (grpc-java for one) might consider skipping this suffix when using a dependency.