Thank you all.
I chose Erik's solution, but yours is a good idea too.

Thanks,

--
B.LUBEK


Kris Read wrote:
This is a hack, but:

PropertyFile to persist the property to a file.

Replace or ReplaceRegExp to alter the value.

Then reload from the file.



On Wed, 27 Oct 2004 10:04:33 -0400, Erik Hatcher
<[EMAIL PROTECTED]> wrote:

On Oct 27, 2004, at 8:56 AM, Beno�t Lubek wrote:

Hi,

I have a property :

<property name="version" value="v1.0.2" />

And I'd like to manipulate it a bit, ie, change the "." to "_" (so it
can be used for a cvs tag). So I'd like to have a property with the
value "v1_0_2".

Is there a way to do that with the core tasks? I realize it would be
easy to do it with the <script> task, but I would prefer to avoid the
need to depend on another jar for our project... Any idea?

There is no way to do this without some scripting, that I know of. However, an alternative is to keep the pieces of that property separate:

       <property name="part1" value="1"/>
       <property name="part2" value="0"/>
       <property name="part3" value="2"/>

       <property name="version" value="v${part1}.${part2}.${part3}"/>

       <property name="version_with_underscores"
value="v${part1}_${part2}_${part3}"/>

Erik

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to