java - Is it possible to exclude some targets from Ant targets while executing the script? -
If you want to execute more than one goal in ant, we can do it like this,
< Pre> by any means
But the problem is that, I have a goal definition:
& lt; Target name = "buildApp" dependent = "init, copy-all-requiredfiles-local, merge to wait, compile, createWAR, deployAll" />
And if I want to execute buildApp it will also run all related targets, as is clear. Is it possible to execute the buildApp target without executing the deployAll target?
One possibility will add your deployed all target this way.
& lt; Goal name = "depolyAll" until no = "doNotDeploy" & gt; ... & lt; / Target & gt;
Then when you want to run buildApp without all deployed on the command line
Ant -DoNotDeploy = true buildAll
Note that BTW is checked only until the asset is set. Do not assume.
But this behavior should be documented and it is a bit unclear.
I clearly consider making a second build goal eg. buildAllWithoutDeploy that just remembers the deployed target
Comments
Post a Comment