ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis GALIEGUE <...@one2team.com>
Subject regexp-type <mapper> doesn't work as expected/(advertised?)
Date Fri, 09 Oct 2009 17:25:28 GMT
Hello,

Take this example:

----
build@build ~ $ cat build.xml
<project name="testme" default="doit" basedir=".">

        <target name="check">
                <uptodate property="noneed">
                        <srcfiles dir="." includes="t.xml"/>
                        <mapper type="regexp" from="xml$" to="txt"/>
                </uptodate>
        </target>

        <target name="doit" depends="check" unless="noneed">
                <copy file="t.xml" tofile="t.txt" overwrite="true"/>
        </target>

</project>
----

Say that t.txt doesn't exist. The first time the file is run, then it
is created. So far, so good, that's what is expected.

But the second time, it is _also_ executed, and that is totally
unexpected. This has been verified with ant 1.6.5 and ant 1.7.1. If I
run ant -v, here's what I see in the output:

---
check:
 [uptodate] t.xml added as txt doesn't exist.
----

Uh!

-- 

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message