From f6788e2036059c734af50b85545852316959a4dc Mon Sep 17 00:00:00 2001 From: Alan Velasco Date: Sun, 10 Jun 2018 15:15:32 -0700 Subject: [PATCH] Add the --owner-of= usage on Target Address documentation (#5931) Problem The documentation of the feature proposed in PR #5930 Solution I decided to put it inside Target Addresses because that is where a user would look if they needed a feature like this, I think. Result More docs, and that's always good. --- src/docs/target_addresses.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/docs/target_addresses.md b/src/docs/target_addresses.md index ccbeb2980bc..9a54c7e8fa4 100644 --- a/src/docs/target_addresses.md +++ b/src/docs/target_addresses.md @@ -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: