ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: splitting "arg line" into multiple "arg value"s fails? Unable to execute command
Date Mon, 14 Oct 2002 22:47:09 GMT
Wait, wait ;-)

Have you tried Stefan's suggestion as-is?
>From your original shell script command, it sounds like you want to delete
all files ending in .??.html, and Stefan sent just that. So really try,

  <fileset dir=".">
    <include name="**/*.??.html"/>

which is the real equivalent to your:

    <exec executable="${shCmd}">
       <arg line='-c "rm  *.??.html"'/>

applied in all subdirectory of Ant's basedir.

Now, if that's not what you want to do, and want to delete only those
*.??.html files that have an equivalent *.m4 files, check out the <present>
selector, not the <depend> one you used.

It it's neither of what you want, please explain clearly in English which
files are to be removed, where, and especially why. Thanks, --DD

-----Original Message-----
From: Ralf Hauser [] 
Sent: Monday, October 14, 2002 4:47 PM
To: Ant Users List
Subject: RE: splitting "arg line" into multiple "arg value"s fails? Unable
to execute command

thanks - I was just about to suggest a version of apply that doesn't add the
srcfile per default to the arguments:
<<    <apply executable="myDel.bat" dir="." relative="true"
                 dest="." parallel="false">
         <fileset dir="." includes="*.m4"/>
	    <mapper type="regexp" from="^([^\.]+)\.m4$$" to="\1.en.html"/>

the myDel.bat batch file just drops the second argument >>

Now trying it with your recommendation (and the example in
    <delete verbose="true">
       <fileset dir="." includes="*.m4">
          <depend targetdir=".">
  	     <mapper type="regexp" from="^(.+)\.m4$$" to="*.en.html"/>
this unfortunately deletes the *.m4 instead of the *.html files, so I tried
       <srcfileset dir="." includes="*.m4">
	    <mapper type="regexp" from="^([^\.]+)\.m4$$" to="\1.en.html"/>
       <targetfileset dir="." includes="*.en.html"/>
build.xml:96: The <fileset> data type doesn't support the nested "mapper"

Any idea how this would work?

Many thanks in advance!

> -----Original Message-----
> From: Stefan Bodewig []
> On Mon, 14 Oct 2002, Ralf Hauser <> wrote:
> > Yes, I could use <delete>
> > if a) I could run delete
> You've got it backwards, <delete> already supports filesets:
> will delete those files in a single path.  Make yourself familiar with
> the selector stuff to get the most out of <fileset> once simple
> pattern matching is not enough.

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

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

View raw message