ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wizshah <shaa...@gmail.com>
Subject Re: overwriting property specified in different files.
Date Wed, 09 Jul 2008 15:19:40 GMT

Yes that makes sense.

The problem would then be that if the property is empty in the first file
the second would not get its thing in the zone. 

All that said I think I can workout something that doesn't allow empty
fields to be written at all.

And thanks for the clarification.

Regards,
-- wiz



André Pilz wrote:
> 
> Hello,
> 
> that is standard behaviour for ant. The first property definition wins. 
> A simple solution for this example is to load the second property file 
> first.
> 
> Also see the <variable> Task in ant-contrib, but I never needed it.
> 
> Cheers,
> Andre
> 
> wizshah schrieb:
>> I have two following lines added to my build.xml.
>> 
>>  	
>> 1. <property file="${env.DEVHOME}/config/config.properties"/>
>> 	
>> 2. <property
>> file="${env.DEVHOME}/usr/home/${env.projectname}/config.properties"/>
>> 
>> It can be seen that I have two config.properties being loaded. Thats runs
>> fine. All properties are loaded. But here the problem is that if I have
>> the
>> same property in the second file it does not overwrite the old one. 
>> for instance I have a temp variable set like temp=temp in the first
>> config
>> i.e. config/config.properties
>> 
>> where as I want to over write it in the second config i.e.
>> ${env.projectname}/config.properties like temp=xyz
>> 
>> But ant does not overwrite it. Can any one help me out how I can achieve
>> this?
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/overwriting-property-specified-in-different-files.-tp18358563p18363280.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message