ant-user mailing list archives

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

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; "/>
    <srcfile/>
    <arg value=" &gt; "/>
    <targetfile/>
    <arg value="${comment}"/>
    <fileset dir="${dir.in}" includes="*.js"/>
    <mapper type="identity"/>
  </apply>
</target>

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
argument).

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:

jsmin:
    [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]
    [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.


--
cheers,
Jakob.

[1] http://www.crockford.com/javascript/jsmin.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message