diff --git a/external/third_party/jcommander.BUILD b/external/third_party/jcommander.BUILD new file mode 100644 index 000000000..2335f6b1d --- /dev/null +++ b/external/third_party/jcommander.BUILD @@ -0,0 +1,14 @@ +package( + default_visibility = ["//visibility:public"], +) +JAVACOPTS = [ + "-Xlint:unchecked", + "-Werror:-unchecked,-rawtypes", + "-Xep:CollectionIncompatibleType:OFF", +] + +java_library( + name = "jcommander", + srcs = glob(["**/src/main/**/*.java"]), + javacopts = JAVACOPTS, +) diff --git a/repositories.bzl b/repositories.bzl index 8bec34b9e..4779186d2 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -152,3 +152,14 @@ def copybara_repositories(): "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.19.1/bazel-gazelle-v0.19.1.tar.gz", ], ) + + # LICENSE: The Apache Software License, Version 2.0 + maybe( + http_archive, + name = "JCommander", + sha256 = "e7ed3cf09f43d0d0a083f1b3243c6d1b45139a84a61c6356504f9b7aa14554fc", + urls = [ + "https://github.com/cbeust/jcommander/archive/05254453c0a824f719bd72dac66fa686525752a5.zip", + ], + build_file = "third_party/jcommander.BUILD" + ) diff --git a/repositories.maven.bzl b/repositories.maven.bzl index abb4907b2..f76a4183a 100644 --- a/repositories.maven.bzl +++ b/repositories.maven.bzl @@ -20,7 +20,6 @@ def copybara_maven_repositories(): maven_install, name = DEFAULT_REPOSITORY_NAME, artifacts = [ - "com.beust:jcommander:1.48", "com.google.auto.value:auto-value-annotations:1.9", "com.google.auto.value:auto-value:1.9", "com.google.auto:auto-common:1.2.1", diff --git a/third_party/BUILD b/third_party/BUILD index 31b6f5068..65d971531 100644 --- a/third_party/BUILD +++ b/third_party/BUILD @@ -59,7 +59,7 @@ java_library( java_library( name = "jcommander", exports = [ - "@maven//:com_beust_jcommander", + "@JCommander//:jcommander", ], )