ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Persistent global properties - are they going to be available?
Date Tue, 16 Apr 2002 12:03:50 GMT
I have made a couple of tasks that allow you to read/write properties to a
property file, in a central place, so the properties are available between
processes, and also are global.

Is there any facility such as this planned for Ant?


The following task will set the property 'testProperty' under topic
'testTopic', storing it in
a central property file.

<SetProperty topic="testTopic" name="testProperty" value="BOOYASHAH" />

To retrieve the property as an ant property, you could use the following

<GetProperty topic="testTopic" name="testProperty" />

Then this request would echo the value of the property.

<echo message="${testTopic:testProperty}" />

You can also retrieve the property and store it to an ant property under a
different name:

<GetProperty topic="testTopic" name="testProperty" to="testAlias" />

Then this request would echo the value of the property.

<echo message="${testAlias}" />

The major difference, is that the properties are persistent, so you can read
and set them across
multiple processes, projects and tasks.

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

View raw message