aboutsummaryrefslogtreecommitdiffhomepage
path: root/.gitignore
diff options
context:
space:
mode:
authorGravatar Adam Michael <ajmichael@google.com>2016-12-02 17:58:03 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-12-02 19:09:05 +0000
commita110ac400190c90a45856f15482c8d0952c542f5 (patch)
tree3e0f4e69a2dab1c4d539c84dbae6e6223c783534 /.gitignore
parent432e83ed4a282d152cfd2bff1c6dfe7542194e3b (diff)
Make the settings attribute of Skylark maven_jar and maven_aar a label.
Fixes https://github.com/bazelbuild/bazel/issues/2117. The settings attribute allows you to optional specify a custom Maven settings.xml file as a label. Previously, this attribute was an absolute path. As an absolute path it cannot really be used to specify a file in the workspace because each developer may install the workspace in a different location. And if the settings.xml cannot be included in the workspace, the developers may as well use one of Maven's default locations for settings.xml. Now the attribute is a label. An example use case is: $ cat WORKSPACE load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl") maven_jar( name = "guava", artifact = "com.google.guava:guava:19.0", settings = "//:my_custom_settings.xml", ) $ cat BUILD java_library( srcs = glob(["**/*.java"]), deps = ["@guava//jar"], ) $ cat my_custom_settings.xml <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">; <mirrors> <mirror> <id>planetmirror.com</id> <name>PlanetMirror Australia</name> <url>http://downloads.planetmirror.com/pub/maven2</url>; <mirrorOf>central</mirrorOf> </mirror> </mirrors> </settings> Note that `settings = "my_custom_settings.xml"` will not work as the workspace rule will not know to look in the main workspace. RELNOTES[INC]: Skylark maven_jar and maven_aar settings attribute is now a label so it can be checked into your workspace. -- PiperOrigin-RevId: 140861633 MOS_MIGRATED_REVID=140861633
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions