ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Fix <>
Subject apply task trouble for command using < and >
Date Thu, 24 Nov 2005 12:53:20 GMT

I have the following command line (see [1] for jsmin):

  jsmin < bigfile.js > smallfile.js "prefix file with this comment"

To do this for an entire directory I created this task:

<target name="jsmin">
  <apply executable="jsmin.exe" failonerror="true" dest="${dir.out}">
    <arg value=" &lt; "/>
    <arg value=" &gt; "/>
    <arg value="${comment}"/>
    <fileset dir="${}" includes="*.js"/>
    <mapper type="identity"/>

This runs, but the result is not at all satisfactory:
- No output is produced,
- Only four lines are written to standard output as javascript
comments (as jsmin would do with everything after the outfile

My suspicion is that the problem may be caused by the "<" and ">"
characters in the command line.  Could it be that they are ignored?

Thanks for any idea to get this resolved.

The -v output of this is:

    [apply] Current OS is Windows XP
    [apply] DyApplication.js added as DyApplication.js doesn't exist.
    [apply] Executing 'D:\Projects\dy\tests\JSMinAnt\jsmin.exe' with arguments:
    [apply] ' < '
    [apply] 'D:\Projects\dy\tests\JSMinAnt\in\DyApplication.js'
    [apply] ' > '
    [apply] 'D:\Projects\dy\tests\JSMinAnt\out\DyApplication.js'
    [apply] 'prefix file with this comment'
    [apply] The ' characters around the executable and arguments are
    [apply] not part of the command.
    [apply] //  <
    [apply] // D:\Projects\dy\tests\JSMinAnt\in\DyApplication.js
    [apply] //  >
    [apply] // D:\Projects\dy\tests\JSMinAnt\out\DyApplication.js
    [apply] // prefix file with this comment

    [apply] Applied D:\Projects\dy\tests\JSMinAnt\jsmin.exe to 1 file
and 0 directories.



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

View raw message