ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: Properties getting unset with <import>?
Date Mon, 06 Dec 2004 15:38:36 GMT
--- Martin Cooper <> wrote:
> So, I guess I'm stuck with doing things the clunky
> way. Sigh.

Okay, now, let's back up.  You want to be able, as
advertised, to enhance blah blah blah tasks called
before or after... and so on.  Okay...

<project name="parent">
  <target name="foo">
  <target name="bar" depends="foo">

<project name="child">
  <import file="parent.xml" />
  <target name="foo" depends="prefoo,">
    <echo>after &lt;echo&gt;foo&lt;/echo&gt;</echo>
  <target name="prefoo">
    <echo>before &lt;echo&gt;foo&lt;/echo&gt;</echo>
There you have it.  No big deal and not that
complicated.  The key is that while extending target
foo seems like no big deal, the payoff is in the foo
dependency of target bar.  Now whenever you execute
the bar target it will do what it would have done in
the parent buildfile with foo augmented as necessary
for the child build.


Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message