ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: Settting environment variables
Date Thu, 19 Apr 2007 14:11:24 GMT
Propertys in Ant are immutable, so you can't reset the value (with vanilla Ant - ant-contrib
may let you). 

Depending on what you need the system property for, though, you may be able to use <sysproperty>.


-----Original Message-----
From: query [] 
Sent: Thursday, April 19, 2007 8:26 AM
To: ant
Subject: Settting environment variables


I am having a set of ANT build files. I want to change "Path" and "include" environment variables
only in build file.
I tried the following options to reset "include" variable in the build file.

<property environment="env"/>     
1.<exec executable="cmd">
     <env key="include" path="${new.includepath}"/>
2.<property name="${env.include}" value="${new.includepath}"/>

3.<property name="env.include" value="${new.includepath}"/>

4.<property name="env.${include}" value="${new.includepath}"/>

When I tried to echo "include" variable in the same build file, it is still showing the default
old settings.

Is there any other way to modify the environment variables only for some instance and not
for other? 

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

View raw message