ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Fetzer <>
Subject Re: Calling CYGWIN from ANT via EXEC
Date Wed, 14 Apr 2010 17:05:13 GMT
I figured out the space issue, you can single quote the args successfully.

On Apr 14, 2010, at 9:26 AM, Eric Fetzer <> wrote:

It's actually much easier to use CYGWIN from Ant than stated in the documentation with the
<exec> task.  Here is an example of using Ant to run a shell script via CYGWIN (be sure
the shell script is formatted for unix):
                   <exec executable="c:\cygwin\bin\bash.exe">
                     <arg value="--login"/>
                     <arg value="-c"/>
                     <arg value="/cygdrive/c/BuildDeployScripts/ ${scp.keyfile}
${fileToSCP} ${scp.user} ${} ${}"/>
Note that all arguments to the script in this case must be on the same <arg> as the
script file or they won't show up as args to the script, but rather, args to bash.  I haven't
figured out how to send an argument with spaces in it, but I'm sure you Ant guru's could tell
me.  Any help there?  I tried ' "argument with spaces" arg2', but that didn't work.
 CYGWIN wants spaces escaped.



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

View raw message