ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf Hauser" <ralfhau...@gmx.ch>
Subject RE: splitting "arg line" into multiple "arg value"s fails? Unable to execute command
Date Mon, 14 Oct 2002 21:47:13 GMT
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">
       <targetfile/>
         <fileset dir="." includes="*.m4"/>
	    <mapper type="regexp" from="^([^\.]+)\.m4$$" to="\1.en.html"/>
    </apply>

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

Now trying it with your recommendation (and the example in
http://www.mail-archive.com/ant-user@jakarta.apache.org/msg16144.html).
    <delete verbose="true">
       <fileset dir="." includes="*.m4">
          <depend targetdir=".">
  	     <mapper type="regexp" from="^(.+)\.m4$$" to="*.en.html"/>
          </depend>
       </fileset>
    </delete>
this unfortunately deletes the *.m4 instead of the *.html files, so I tried
(http://www.mail-archive.com/ant-user@jakarta.apache.org/msg18388.html):
    <dependset>
       <srcfileset dir="." includes="*.m4">
	    <mapper type="regexp" from="^([^\.]+)\.m4$$" to="\1.en.html"/>
       </srcfileset>
       <targetfileset dir="." includes="*.en.html"/>
    </dependset>
build.xml:96: The <fileset> data type doesn't support the nested "mapper"
element.
        at
org.apache.tools.ant.IntrospectionHelper.createElementIntrospectionH
elper.java:521)
...

Any idea how this would work?

Many thanks in advance!

	Ralf
> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@apache.org]
>
> On Mon, 14 Oct 2002, Ralf Hauser <ralfhauser@gmx.ch> wrote:
>
> > Yes, I could use <delete>
> > if a) I could run delete
>
> You've got it backwards, <delete> already supports filesets:
[snip]
> 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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message