Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Using property in regexp mapper

Using property in regexp mapper

2004-02-13       - By Hagen, Christian
Reply:     1     2  

Hi,

I have the following problem (ANT 1.6.0, Windows 2000) with copy using a
mapper:

I have a property file, which is loaded first:

prod.A.target = targetA
prod.B.target = targetB
prod.C.target = targetC


The copying should do the following:

src/prod/A/config/configA.xml  -->
target/${prod.A.target}/config/configA.xml
src/prod/B/config/configB.xml  -->
target/${prod.B.target}/config/configB.xml


I tried to copy it with a mapper:

<copy preservelastmodified="true" verbose="true" todir="target">
 <fileset dir="src"/>
 <mapper type="regexp" from="prod/(.*)/config/(.*)"
to="${prod.\1.target}/config/\2"/>
</copy>


It does not work telling me: "Property ${prod.\1.target} has not been
set".

Does this mean the property is resolved before inserting the regexp
group?
Does anybody know another way to do the copying?



Thanks in advance.

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)



©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.