Dominique, > Even my current use of <antReturn> I find hackish, but > without the ability > to use Ant's own digester-like XML to Java engine, I find > easier to call > another Project and extract what I need out of it, rather > than coding from > scratch the info I need about of a separate non-Ant (data-type) file. >
Maybe the xpath PropertyHelper would help you in this case. My version of <subant> (not based on it (yet)) does what I suggested, but not by reusing Projects, because it's also internally using <ant> :-) Rather I have a static Map which tells me what targets I've already run on what buildfiles. Of course it's not always desirable to run a target only exactly once. But IMO, if the buildfiles are well organized, this should be the case. At least for project inter-dependencies. And I can of course always get around this "optimization" by using <ant> instead. Also my <subant> has a "onlyonce" attribute to control this. I found that I can significantly lower my build times with this behaviour. Also the log is more readable. I think I will continue using my own <subant>. But if someone thinks this is a good idea I could write a patch which would add a "onlyonce" attribute to Ant's <subant>. -- knut > I hope I'm not too off base vis-à-vis your question. --DD > > > -----Original Message----- > > From: Knut Wannheden [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 14, 2003 6:40 AM > > To: [EMAIL PROTECTED] > > Subject: can <subant> reuse Projects? > > > > Hi, > > > > Up until now I've been using my own <subant> like task. > But now that Ant > > 1.6 doesn't seem too distant anymore I'd like to integrate > with <subant>. > > > > There's one thing I'm wondering about: Can <subant> reuse > the same Project > > object corresponding to a buildfile in multiple calls? The > reason that > > I'm > > askin this is that I think it would be nice if a target's > dependencies > > were > > only resolved once. Consider the following case: > > > > a.xml > > ^ > > / \ > > b.xml c.xml > > ^ ^ > > \ / > > d.xml > > > > where I in b.xml and c.xml use <subant> to invoke a target > i a.xml. And > > in > > d.xml i use <subant> to invoke a target in b.xml and c.xml. > Now if both > > b.xml and c.xml invoke the same target "foo" in a.xml, then > I'd only want > > the dependencies of "a:foo" to be resolved once. > > > > Is this currently possible with <subant> or would it be > possible to add > > this > > behaviour? > > > > -- > > knut > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >