tags:

views:

152

answers:

1

I'm using ants propertyregex method to change a property and it works fine up to a point. I'm lossing return characters.

Here's what I'm trying to change:

cluster.path=\
${nbplatform.active.dir}/harness:\
${nbplatform.active.dir}/platform:\
${nbplatform.active.dir}/nb

This is in a .properties file.

So I'm trying to change it like this:

<propertyregex property="cluster.path"
               input="${cluster.path}"
               regexp="nbplatform.active.dir"
               replace="xplatform.base"
               global="true"
               override="true"/>

The stuff is replaced but I get:

cluster.path=    ${xplatform.base}/harness\:    ${xplatform.base}/platform\:    ${xplatform.base}/nb

This brakes logic down the line not controlled by me (Netbeans) that uses the ':' as delimiter.

Any idea?

A: 

I worked around that changing the file itself like this: replaceregexp file="nbproject/platform.properties" match="nbplatform.active.dir" replace="platform.base" byline="true" flags="g,s"/

javydreamercsw