ANT propertyfile entry is not resolving to its value
Posted
by Brian
on Stack Overflow
See other posts from Stack Overflow
or by Brian
Published on 2010-06-11T15:32:58Z
Indexed on
2010/06/15
4:32 UTC
Read the original article
Hit count: 289
ant
I have a value in a properties file that I want to increment while the build is running. The goal is to copy a set of files and append a number to the front of each in order to maintain the order in which they were copied into the directory. I am using the <propertyfile>
task as follows:
<propertyfile file="jsfiles.properties">
<entry key="file.number" type="int" operation="=" value="10" />
<entry key="file.number" type="int" default="010" operation="+" value="10" pattern="000" />
</propertyfile>
Then I do the copy:
<copy todir="${js-in.dir}">
<resources>
...
</resources>
<chainedmapper>
<flattenmapper />
<globmapper from="*.js" to="${file.number}-*.js"/>
</chainedmapper>
</copy>
This does exactly what I need it to EXCEPT that instead of the following output:
- 010-file1.js
- 020-file2.js
- 030-file3.js
- ...
I get:
- ${file.number}-file1.js
- ${file.number}-file2.js
- ${file.number}-file3.js
- ...
What am I doing wrong?
© Stack Overflow or respective owner