ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patri...@exinet.co.za (Paul Arzul)
Subject javac task filtering
Date Fri, 29 Sep 2000 10:05:28 GMT
hi *,

(ant 1.1)

the javac task has a filtering attribute, which does
not work as i expected.

in the example below, @version@ is not replaced before or
after compliation, while Test.java is complied fine.

Test.java
---8<---
// @version@

public class Test {
  public static void main(String[] args) {
  }
}
--->8---

Text.xml
---8<---
<?xml version="1.0"?>

<project name="Filter Test" default="Test" basedir=".">
  <target name="Test">
    <tstamp />
    <filter token="version" value="${TODAY}" />    
    <javac srcdir="." destdir="." />
  </target>
</project>
--->8---

i've resorted to:
---8<---
    <filter token="version" value="${TODAY}" />    

    <copyfile filtering="on" src="Test.java" dest="Test2.java" />
    <rename src="Test2.java" dest="Test.java" />
--->8---

am i being stupid?

aside: is there version numbering support in ant 
1.2? something that could read a file, and auto increment a
build number?

this list is wonderful,
thanks,

- p


Mime
View raw message