ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kronus David" <kro...@atlas.cz>
Subject Ignoring missing targets
Date Tue, 24 Mar 2009 21:51:37 GMT
 Hi Ant developers,
I also have a second suggestion which I have already posted to this list on 25.2. but I didn't
receive any feedback. I don't know if this means that my suggestion has been rejected so I'm
trying again. This time I will definitely consider a no-response reaction to be a rejection:)
Ok, the thing is that in some cases I needed to tell Ant that it is not a problem if in the
buildfile there are any targets which depend on targets which are not present in the buildfile
(or in any imported one) IF these tasks with missing dependencies are not going to be invoked
in the current process. The reason for that was that I'm using Ant tasks (in fact Apache Ivy)
which download Ant buildfile fragments from a repository. And these fragments are included
using <import optional="true".../> so in the first run, when the fragments are being
downloaded, the targets from these fragments are not available and there may be tasks in the
main file that depend on them. However, there is no problem with that as these targets are
not being invoked at the moment.
I've looked into the source code and found that this is absolutely easy to do because in fact
there is a (well documented) redundant check of the dependencies of the targets which are
not needed during the current build. I've added commandline option to disable this redundant
check. So that's the first thing. Would you find it useful for submission to Ant?
Second thing is that I didn't like specifying this commandline option whenever it was necessary
so I created a special Ant task which from inside a buildfile, where it is used in the toplevel,
can disable this check (because fortunately top-level tasks in a buildfile are executed before
dependency checking - this may, however, possibly change in the future). In general, it could
be a way to configure Ant from within a buildfile which may be useful if some Ant options
should be switched on/off for specific buildifiles. That's my second question, do you find
this task useful?
Thanks for your opinions.
David 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message