Hi, is there anything equivalent to the alias targ...
# general
r
Hi, is there anything equivalent to the alias target from Pants v1 in Pants v2?
c
yes, that would be the
target
target: https://www.pantsbuild.org/docs/reference-target
e
That is not actually the same. The alias target was inlined and so you could trick a rule into thinking an alias is what it points to. In v2 a target is basically not digestible by any rule in that way: https://v1.pantsbuild.org/build_dictionary.html
You can't
pants run
a
target
for example.
c
ok, so the “closest” thing, then.. depending on what you want to achieve. Thanks for the clarification John. 🙂
e
Yeah. V1 also has
target
though; so I'm guessing that's no dice.
😅 1
f
@refined-hydrogen-47967: What is the envisioned use case?
r
I was hoping to be able to run
pants package
on an alias for a
deploy_jar
target. With Pants v1 we've set up a directory with aliases for the
jvm_binary
targets for each service we deploy to try and simplify our ci/cd pipeline. Without alias though I think we could probably just move the
deploy_jar
targets to where the aliases are currently.
c
Ah, in v2 there’s a
[cli.alias]
config section you may use: https://www.pantsbuild.org/docs/reference-cli#alias
or, there’s also an option to use tags and filtering to select what your goal should operate on.
👍 1
r
Nice, I think tagging each
deploy_jar
target will achieve what I'm looking for. Thank you!
👌 1