ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: loading before other properties when it does n't exist before building ...
Date Mon, 09 Sep 2002 21:41:21 GMT
Sounds to me that you should maybe avoid this kind of trouble by using
entity include instead of your <copy> of sample files... That way, you can
have a properly named project whose entire body is empty but for the entity
reference. Pretty much achieve what you do with <copy>, without the trouble
you're running into with properties. Check out the Ant FAQ for details on
entity including an XML fragment file.

You could also go with the embed proposal (that defines an <import> tag),
but that's a little more on the bleeding edge. --DD

-----Original Message-----
From: Jacob Kjome [] 
Sent: Monday, September 09, 2002 4:29 PM
To: Ant Users List
Subject: loading before other properties when it doesn't
exist before building ...


I have a project where we have sample files such as sample.web.xml or  I copy these files to a file of the same
name minus the ".sample" prefix.  That is all working fine.  The
problem is with the unique case of

Normally, I load first thing before defining other
properties so that properties in the build file can be overridden by
those in  However, the target that runs the copy of to runs *after* all the
properties would have been defined.  So, with a fresh CVS tree,
running ant for the first time on my build file fails to load
properties from because it does not exist yet.

Now, I would put the <copy> deal before
<property file=""/>
but the latter needs to be before all the properties are defined which
aren't inside a target.  Since I can't put <copy> anywhere outside a
<target> element, I can't make the copy happen before the rest of the
properties are defined.

Is there a good way to deal with this situation other than, maybe,
putting all the <property ...> definitions inside a <target ...>
element, thereby allowing me to run the <copy ...> task to copy the to then load it, then define
all the other propeprties?



Best regards,

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

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

View raw message