You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "littlebluehouse1@juno.com" <li...@juno.com> on 2009/09/03 14:55:05 UTC
SCP task succeeds on client, but no file created on remote site
Hi. I am a new ant user seeking to use ant to deploy my webapp to my remote server. For starters, I am just trying to copy one file from my local computer to my remote server using an scp task. According to my local computer, my attempt works: I get "BUILD SUCCESSFUL" and even the number of bytes per second that the transfer took. However, the file does not appear on the server. Here is the target with password and site obscured, along with console output from running ant. Thanks for any input.
TARGET
<property name="file" location="z:/test.txt"/>
<property name="dest" location="/test"/>
<target name="test">
<scp file="${file}" todir="root@MySiteHere:${dest}"
password="MyPasswordHere" trust="true" verbose="true"
sftp="true"/>
</target>
CONSOLE OUTPUT
test:
[scp] Connecting to MySiteHere.com:22
[scp] Sending: test.txt : 474
[scp] File transfer time: 0.17 Average Rate: 2,771.93 B/s
[scp] done.
BUILD SUCCESSFUL
Total time: 1 second
____________________________________________________________
Best Weight Loss Program - Click Here!
http://thirdpartyoffers.juno.com/TGL2131/fc/BLSrjnsEGrDhekrAbQjWjhnr1QxKmbJyQoCwObUJPhK1j8q4wJ1Z5qJ7hFO/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: SCP task succeeds on client, but no file created on remote site
Posted by Michael Ludwig <ml...@as-guides.com>.
littlebluehouse1@juno.com schrieb:
> I am just trying to copy one file from my local computer to my remote
> server using an scp task. According to my local computer, my attempt
> works: I get "BUILD SUCCESSFUL" and even the number of bytes per
> second that the transfer took. However, the file does not appear on
> the server.
> <property name="file" location="z:/test.txt"/>
> <property name="dest" location="/test"/>
Read the doc for the <property> task, especially what property/@location
evaluates to. Add these to check the values:
> <target name="test">
<echo message="${file}"/>
<echo message="${dest}"/>
> <scp file="${file}" todir="root@MySiteHere:${dest}"
> password="MyPasswordHere" trust="true" verbose="true"
> sftp="true"/>
> </target>
If your local computer is Windows, this might not be adequate. Even if
it is UNIX, it might not be adequate.
--
Michael Ludwig
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org