ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: AW: dynamic targets
Date Wed, 25 Oct 2006 13:14:50 GMT
> Yep, <import> is powerful and extremely useful
> and I use it all the time.  I tried to keep my
> example specific and concrete so as not to
> complicate the question.  But it seems to have
> caused the original point of this exercise to be entirely missed.

Indeed. Yet now that I understand what you are after, I'm not
too sure I agree with your goal. You talk about ant -p, which
should display only the relevant targets, but what about the
project help on your master "known-nothing-just-pass-it-on"?

What target can it report help on?

What about the fact that you can now throw any target names
at your builds, and all you get is a little warning target foo or bar
doesn't exist, but no build failure?

Or a non-existent target used as a dependency of a real target,
for example when using the template method (target) pattern?
Will that one be "magically" and dynamically implemented on the
fly and no error be thrown?

IMHO, either your sub-builds are related, and then it's quite natural
for them to have a common "skeleton", or their are not related, and
then you probably have no business calling them. OK, the latter is
a bit extreme, but maybe not too far from the truth still ;-)

If you really really want to what you have in mind, then I think you
need to write a custom file selector, which queries Ant builds for
their supported targets, and filter in or out based on this information.

Using <subant failonerror="true"> is not a good idea, IMO, since
you can't differentiate between a real error of a build with the target,
from an error from a missing target.

To finish, I'm always amazed at the things people want to do with Ant or
any tech for that matter, bending and sometimes twisting it in weird and
often interesting ways. So thank you Jake ;-)   --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message