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 Tue, 15 Oct 2002 07:16:12 GMT
> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@apache.org]
> > 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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message