ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From detlef.bren...@canoo.com
Subject Re: Redefine value of property
Date Thu, 25 Jul 2002 12:57:30 GMT
Hi Jens,
Once created a property holds its state for the whole lifecycle. Depending where
you define it the lifecycle differs : 
global defined properties life as long as the project lifes.
properties within a target life for the rest of this project.

Using <antcall> a  property inside antcall does only life for the child-project.
And therefore the callee wont have the property after the antcall is finished.

I would suggest you define one global property such as 'rootPath' and use
rootPath as Postfix for the real outpath.



detlef


Quoting Jens Kuttig <newsgroups@activem.de>:

> Hi.
> 
> I use property-elements to shorten used strings in my ant-script.
> 
> My Problem:
> I define the following property at the beginning of the file:
> <property name="outpath" value="g:/java/out" />
> This property is used by diffrent targets. One target now should change
> the content of this property by adding another string to the value. I
> tried to redefine the property with the following line:
> <property name="outpath" value=${outpath}/${timestamp}" />
> But this doesn't work. The property still has its original content.
> 
> How can I redefine the value of a property? Or should I use another
> xml-element instead of <property>?
> 
> Thanks for answers,
> Jens
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message