> -----Original Message----- > From: Stefan Bodewig [mailto:[EMAIL PROTECTED]] > > I was just about to suggest a version of apply that doesn't add the > > srcfile per default to the arguments: > > Yep, this is needed. Shall I post this as an RFE to http://issues.apache.org/bugzilla/? > > > <mapper type="regexp" from="^(.+)\.m4$$" to="*.en.html"/> > > So you want to delete all .en.html files where a corresponding .m4 > file exists? Use a <present> selector. Almost - where it exists and is newer. > > <delete> > <fileset dir="your-base-dir" includes="**/*.en.html"> > <present targetdir="your-base-dir"> > <mapper type="glob" from="*.en.html" to="*.m4"/> > </present> > </fileset> > </delete> Therefore, I tried <delete verbose="true"> <fileset dir="." includes="*.en.html"> <depend targetdir="."> <mapper type="glob" from="*.en.html" to="*.m4"/> </depend> </fileset> </delete> But this did exactly the opposite - the outdated file was the only one left. :( > > and the includes attribute is probably redundant as the mapper would > drop all non-html files anyway. right - no change without the "includes". > > > so I tried <dependset> > > Should work as well, just put the <mapper> directly under the task (as > a sibling of <fileset> instead of as a child). <dependset> <srcfileset dir="." includes="*.m4"> </srcfileset> <mapper type="regexp" from="^([^\.]+)\.m4$$" to="\1.en.html"/> <targetfileset dir="." includes="*.en.html"/> </dependset> </target> build.xml:97: The <dependset> task doesn't support the nested "mapper" element. at org.apache.tools.ant.IntrospectionHelper.createElement (IntrospectionHelper.java:521) If I take the mapper on the same level as the dependset, too many files are deleted.
Feels like we are almost there - hopefully... -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>