ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: apply task trouble for command using < and >
Date Thu, 24 Nov 2005 13:13:58 GMT
< and > mean redirection of STDIN and STDOUT from/to file.
So I would have a look at nested <redirector>s.


Jan 

>-----Urspr√ľngliche Nachricht-----
>Von: Jakob Fix [mailto:jakob.fix@gmail.com] 
>Gesendet: Donnerstag, 24. November 2005 13:53
>An: Ant Users List
>Betreff: apply task trouble for command using < and >
>
>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
>
>

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


Mime
View raw message