ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sony Antony <>
Subject Overriding ant <copy> task
Date Mon, 05 Jul 2010 00:17:20 GMT
Hi :
Im trying to modify the <copy> task so that if a token seen in the
file being copied, is undefined in teh <filterset>, the build will
( It will also list all teh undefined tokens encountered against the
corresponding file name )

1. Was there an way to do this without writing java code ?

2. I have already made the changes required in teh ant source code.
But I cant figure out how to execute my code.
I created a jar file with just the changed class files, and did a
<taskdef> with this jar file.
But none of my files got executed.
Since my class files were packaged just like teh original ant
classfiles, it appeard that ant ignored them completely thinking that
those class files have already been loaded.

Is there a way around it so that class files seen inside my jar file
will be picked up first and the remaining files will be resolved from
the original ant classloader


Files being changed and packaged inside antfix.jar

<taskdef name="copy2" classname=""

Doesnt work :
<target name="try">
        <copy2 file="srcfile" toFile="destfile">
<filterset begintoken="@" endtoken="#">
<filter token="TOK1" value="VAL1"/>
<filter token="TOK2" value="VAL2"/>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message