ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi Roy" <ravi.a...@gmail.com>
Subject Re: How to set a new property based on value of another property in Ant ?
Date Tue, 29 Jan 2008 10:09:14 GMT
On 1/29/08, Jan.Materne@rzf.fin-nrw.de <Jan.Materne@rzf.fin-nrw.de> wrote:
> You could load different property files according to a base property
>    <property file="${user.name}.properties"/>
>
> And with AntContrib you could copy contents
>    <property name="text.en" value="Hello World"/>
>    <property name="text.de" value="Hallo Welt"/>
>    <property name="language" value="en"/>
>    <antcontrib:propertycopy name="text" from="text.${language}"/>
>    <echo>${text} = Hello World</echo>
>
> see also http://ant.apache.org/faq.html#propertyvalue-as-name-for-property
>
>
> Jan

Thanks Jan,

But initially, I was looking for how to manipulate the string like -
pushing "." in between value of the property using ant.

Regards,
Ravi

>
> > -----Urspr√ľngliche Nachricht-----
> > Von: Ravi Roy [mailto:ravi.aroy@gmail.com]
> > Gesendet: Dienstag, 29. Januar 2008 09:53
> > An: user@ant.apache.org
> > Betreff: How to set a new property based on value of another
> > property in Ant ?
> >
> > Hi All,
> >
> > I want to set a property based on a value of the other property in my
> > build script :
> >
> > Already defined property in a build file :
> >
> >  <property foo.1="prop.1" value="xx" />
> >
> > Want to set another property based on the value of this property like.
> >
> >   <property foo.2="prop2. value="x.x" />
> >
> > Which means addding  "." character after first character in the value
> > of foo.1 property.
> >
> > Is it possible in ant ?
> >
> > Thanks for pointers.
> >
> > Regards,
> > Ravi.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message