ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject Re: ant exec task: ssh username contains spaces, how to escape?
Date Tue, 01 Feb 2011 22:04:39 GMT

in theory, this should work :

<exec executable="ssh" failonerror="true">
    <arg value="stein inge morisbak@localhost" />
    <arg value="if [ -f /tmp/test.txt ]; then rm -f /tmp/test.txt ; fi" />

when you use <arg value="'/> it generates a single argument.

BTW there is also a sshexec task in ant. Maybe it would work better ?



On 2/1/2011 3:24 PM, Stein Inge Morisbak wrote:
> I am trying to call ssh using the ant exec task from maven. My problem is that I can't
figure out how to escape spaces in usernames. I have tried:

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

View raw message