Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the --owner-of= usage on Target Address documentation #5931

Merged
merged 2 commits into from Jun 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/docs/target_addresses.md
Expand Up @@ -37,6 +37,16 @@ The following target addresses all specify the same single target.

It's idiomatic to omit the repetition of the target name in this case.

- If the address of the target that owns a certain file is not known, the `--owner-of=` global
option can be passed to run the goal on the target which own that file.

::::bash
$ ./pants --owner-of=examples/src/java/org/pantsbuild/example/hello/main/HelloMain.java list
examples/src/java/org/pantsbuild/example/hello/main:main

It's also worth noting that multiple passes of `owner-of=` are accepted in order to work with multiple
files and pants will execute the goal on all the targets that own those files.

- Relative paths and trailing forward slashes are ignored on the
command-line to accommodate tab completion:

Expand Down