From adfc6560a65318b55ecb49b13b6af12c6e235a7d Mon Sep 17 00:00:00 2001 From: Alex Humesky Date: Tue, 23 Feb 2016 20:01:16 +0000 Subject: Update external dependencies documentation to mention the --artifact argument to generate_workspace. -- MOS_MIGRATED_REVID=115367724 --- site/docs/external.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'site') diff --git a/site/docs/external.md b/site/docs/external.md index 9f60b8821f..f1ef7c4542 100644 --- a/site/docs/external.md +++ b/site/docs/external.md @@ -62,28 +62,32 @@ following to build the tool and see usage: bazel run //src/tools/generate_workspace ``` -You can either specify directories containing Bazel projects (i.e., `WORKSPACE` -files) or Maven projects (i.e., `pom.xml` files). For example: +You can specify directories containing Bazel projects (i.e., directories +containing a `WORKSPACE` file), Maven projects (i.e., directories containing a +`pom.xml` file), or Maven artifact coordinates directly. For example: ```bash $ bazel run //src/tools/generate_workspace -- \ > --maven_project=/path/to/my/project \ > --bazel_project=/path/to/skunkworks \ -> --bazel_project=/path/to/teleporter/project +> --bazel_project=/path/to/teleporter/project \ +> --artifact=groupId:artifactId:version \ +> --artifact=groupId:artifactId:version Wrote: /tmp/1437415510621-0/2015-07-20-14-05-10.WORKSPACE /tmp/1437415510621-0/2015-07-20-14-05-10.BUILD ``` -The `WORKSPACE` file contains the transitive dependencies of given projects. The -`BUILD` file contains a single target, `transitive-deps`, that contains all of -the dependencies. You can copy these files to your project and add -`transitive-deps` as a dependency of your `java_` targets in `BUILD` files. +The `WORKSPACE` file will contain the transitive dependencies of the given +projects and artifacts. The `BUILD` file will contain a single target, +`transitive-deps`, that contains all of the dependencies. You can copy these +files to your project and add `transitive-deps` as a dependency of your `java_` +targets in `BUILD` files. -If you specify multiple Bazel or Maven projects, they will all be combined into -one `WORKSPACE` file (e.g., if the Bazel project depends on junit and the Maven -project also depends on junit, junit will only appear once as a dependency in -the output). +If you specify multiple Bazel projects, Maven projects, or artifacts, they will +all be combined into one `WORKSPACE` file (e.g., if the Bazel project depends on +junit and the Maven project also depends on junit, junit will only appear once +as a dependency in the output). You may wish to curate the generated `WORKSPACE` file to ensure it is using the correct version of each dependency. If several different versions of an artifact -- cgit v1.2.3