Hi all,
is it possible to execute a target in an antfile where there are some
targets missing which causes that some targets (but not the one I want to
execute) don't have satisfied their dependencies, i.e. some of the targets
in their "depends" attribute are missing? 

A short example (no other targets are assumed to be in the antfile):

target name="A" depends=""
target name="B" depends="A"
target name="C" depends="D"

Obviously, target C cannot be executed because its dependency, target D, is
missing. But there should be no problem executing targets A and B. But when
ant reads such antfile it stops because of missing task D although I've
requested it to execute target A or B. Is there a simple solution to this
(like some property saying to ant that missing depends targets should be
ignored when they are not necessary)? I know that generally you want to
complain about this but in some special situations...

I am able to think of several solutions "outside ant" but it involves some
complications (like antfile preprocessing, two antfiles, ...). So I'm
looking for a simple solution (although I don't think there is one, just in
case I'm missing something).

In case you wonder why I'd like to do that: master common antfile, included
at the beggining of a project antfile, contains target which downloads other
common antfiles which are also included in the project antfile (after the
master common antfile). And some targets in the project antfile depend on
some targets from those other common antfiles. But it is not possible to
invoke the "downloader" target because during reading the project antfile,
ant complains about missing dependencies of targets in the project antfile.
So possible solution is ant -f "master common file" -Dbasedir=. "downloader
target" but I need to set some properties (in the project antfile) before
including the master antfile. Another solution is to include (before the
other common antfiles) an antfile containing empty targets which will then
be overriden from the downloaded and imported antfiles but that's not really
that simple...

Thanks for any suggestions.
David
-- 
View this message in context: 
http://www.nabble.com/Executing-targets-in-an-antfile-missing-some-depends-targets-tp21309798p21309798.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to