Macros and Functions
maven.repository
Generates the data map for a Maven repository specifier given the available information.
If both a user and password are given as arguments, it will include the access credentials in the repository spec. If one or both are missing, it will just generate the repository url.
Example usage (generated)
load("@rules_jvm_external//:specs.bzl", "maven")
maven.repository(
# A string containing the repository url (ex: "https://maven.google.com/").
url = None,
)
url
A string containing the repository url (ex: "https://maven.google.com/").
user
A username for this Maven repository, if it requires authentication (ex: "johndoe").
password
A password for this Maven repository, if it requires authentication (ex: "example-password").
maven.artifact
Generates the data map for a Maven artifact given the available information about its coordinates.
Example usage (generated)
load("@rules_jvm_external//:specs.bzl", "maven")
maven.artifact(
# The Maven artifact coordinate group name (ex: "com.google.guava").
group = None,
# The Maven artifact coordinate artifact name (ex: "guava").
artifact = None,
# The Maven artifact coordinate version name (ex: "27.0-jre").
version = None,
)
group
The Maven artifact coordinate group name (ex: "com.google.guava").
artifact
The Maven artifact coordinate artifact name (ex: "guava").
version
The Maven artifact coordinate version name (ex: "27.0-jre").
packaging
The Maven packaging specifier (ex: "jar").
classifier
The Maven artifact classifier (ex: "javadoc").
override_license_types
An array of Bazel license type strings to use for this artifact's rules (overrides autodetection) (ex: ["notify"]).
exclusions
An array of exclusion objects to create exclusion specifiers for this artifact (ex: maven.exclusion("junit", "junit")).
neverlink
Determines if this artifact should be part of the runtime classpath.
testonly
Determines whether this artifact is available for targets not marked as testonly = True
.
maven.exclusion
Generates the data map for a Maven artifact exclusion.
Example usage (generated)
load("@rules_jvm_external//:specs.bzl", "maven")
maven.exclusion(
# The Maven group name of the dependency to exclude, e.g
group = None,
# The Maven artifact name of the dependency to exclude, e.g
artifact = None,
)
group
The Maven group name of the dependency to exclude, e.g. "com.google.guava".
artifact
The Maven artifact name of the dependency to exclude, e.g. "guava".