ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Christen" <>
Subject AW: Ant PropertyFile Class
Date Sun, 18 Nov 2001 16:46:02 GMT

In deed your question is a bit vague.

a) PropertyFile does not load properties and therefore does made them
available to ant.
b) The Task PropertyFile stores values in a format so they could be loaded
with anormal property task specifiying a file

To made properties available to a build you must set them in your build file
to the values you need. This includes also loading properties from a
property file with the same task 'Property'.

To modify properties stored in sutch a file and then reuse this modified
value in the next build, you can use PropertyFile

You mentioned 'Sub' builds. Keep in mind that you can start sub builds with
the task 'Ant'. These sub builds will inherit all properties from the build
starting the sub build. Even if you try to set a property in your sub build
witch has been defined in the 'Master' build already - the new value will be
ingnored and the property remains the same as it was in the master. The sam
is true for 'AntCall'.

Hope it has helped.

Thomas Christen
> -----Urspr√ľngliche Nachricht-----
> Von: Dewayne Richardson []
> Gesendet am: Donnerstag, 15. November 2001 16:06
> An:;
> Betreff: Ant PropertyFile Class
> Hi,
> My name is Dewayne Richardson and I'm working on a project to
> implement ant
> as a part of our build process.  I was digging around in the javadoc and
> noticed your emails associated to the "PropertyFile" task class.
> I have one
> major question, that none of the documentation seems to explain,
> and that is
> how is the scope of the properties that are loaded to ant by the
> propertyFile task applied to a build?
> I may be using this task out of context, but what I want is to
> have a global
> "" file that a complicated build process can access across
> multiple projects. Obviously, for one point of maintenance for multiple
> projects.
> I've been able to get the to load with a single build.xml
> file, single project, and have those properties available globally to just
> that build.xml, but when I build a complicated hierarchy of
> projects, where
> a master build.xml, invokes (with the "ant" task), several sub-build.xml
> files, the properties somehow get lost.
> If my question is too vague, please advise.
> Thank you,
> -Dewayne Richardson
> Access International Financial Services

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

View raw message