You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by du...@yahoo.com on 2006/01/18 19:33:19 UTC

SCP probleme

I have the follwoing issue. 
The scp task confiured as such :

    <scp localTodir="${basedir}/${module}/grinder"
         verbose="true"
         failonerror="true"
         trust="true"
         password="${pwd}">
      <fileset dir="${user}@${grinder.host}:/home/${user}/src/**/*"/>
    </scp>


Fail and gives this :
/data/Projects/test/performance/build.xml:101: 'todir' and 'file' attributes must have syntax like the following: user:password@host:/path
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:187)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: 'todir' and 'file' attributes must have syntax like the following: user:password@host:/path
        at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:181)
        ... 10 more

But ...
Not both should have a syntx with "@" in the path ... ?

\T,






 
--  Any fool can write code that a computer can understand.  Good programmers write code that humans can understand.                                                    Martin Fowler  T. : +32 (0)2 742 05 94 M. : +32 (0)497 44 68 12 @  : duvelbier-tsmets@yahoo.com Do you skype too ... ?



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


Re: SCP probleme

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 18 Jan 2006, <du...@yahoo.com> wrote:

> The scp task confiured as such :
> 
>     <scp localTodir="${basedir}/${module}/grinder"
>          verbose="true" failonerror="true" trust="true"
>          password="${pwd}">
>       <fileset
>            dir="${user}@${grinder.host}:/home/${user}/src/**/*"/>
>     </scp>

fileset must be local, remote fileset's are not supported in any way.
Use remoteFile="${user}@${grinder.host}:/home/${user}/src/*" instead.

Stefan

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


Re: SCP probleme

Posted by Rhino <rh...@sympatico.ca>.
----- Original Message ----- 
From: <du...@yahoo.com>
To: "Ant Users" <us...@ant.apache.org>
Sent: Wednesday, January 18, 2006 1:33 PM
Subject: SCP probleme


>
> I have the follwoing issue.
> The scp task confiured as such :
>
>    <scp localTodir="${basedir}/${module}/grinder"
>         verbose="true"
>         failonerror="true"
>         trust="true"
>         password="${pwd}">
>      <fileset dir="${user}@${grinder.host}:/home/${user}/src/**/*"/>
>    </scp>
>
>
> Fail and gives this :
> /data/Projects/test/performance/build.xml:101: 'todir' and 'file' 
> attributes must have syntax like the following: user:password@host:/path
>        at 
> org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:187)
>        at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>        at org.apache.tools.ant.Task.perform(Task.java:364)
>        at org.apache.tools.ant.Target.execute(Target.java:341)
>        at org.apache.tools.ant.Target.performTasks(Target.java:369)
>        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
>        at org.apache.tools.ant.Main.runBuild(Main.java:673)
>        at org.apache.tools.ant.Main.startAnt(Main.java:188)
>        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
>        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> Caused by: 'todir' and 'file' attributes must have syntax like the 
> following: user:password@host:/path
>        at 
> org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:181)
>        ... 10 more
>
> But ...
> Not both should have a syntx with "@" in the path ... ?
>
> \T,
>

I don't know if this helps but here are two tasks that work perfectly for 
me; the first one downloads a directory from a remote server to the local 
system and the secone one uploads a directory from the local system to a 
remote server:

 <scp file="${loginid}@${Maximal.hostname}:${Maximal.sql.dir}/Create*.sql"
  localtodir="${resume.sql.dir}" trust="true"
  keyfile="${Maximal.keyfile}" passphrase="${passphrase}"
  description="Download the scripts which create the tables"/>

 <scp todir="${loginid}@${Maximal.hostname}:${Maximal.resume.dir}/sql" 
trust="true"
  keyfile="${Maximal.keyfile}" passphrase="${passphrase}">
  <fileset dir="${resume.sql.dir}">
   <patternset refid="ps.sql"/>
   </fileset>
   </scp>

Remember, filesets can only be used for uploads to a remote server, not for 
downloads from that server. See the 'scp' article in the Ant Manual if you 
don't believe me ;-)

I'm using a keyfile and you appear to be using passwords but I'm sure you 
can figure out how to modify my examples to use a password instead of a 
keyfile. Again, the manual illustrates both approaches.

Rhino 



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.20/233 - Release Date: 18/01/2006


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