ANT :: um SCP Task erweitern

NetBull

Erfahrenes Mitglied
#1
Moin,

ich möchte auf Windows Rechnern, per Ant, mittels Keyfile zur Authentifizierung, Dateien per SSH auf einem entfernten Linux-System speichern. Hierzu habe ich den SCP Task gefunden, den ich wie folgte benutzen wollte: (Keyfile ist noch nicht eingerichtet, deswegen sind hier noch die Zugangsdaten im Script.)
Code:
<?xml version="1.0"?>
    <project name="Hello World Project" default="info">
    <target name="info">
        <echo>Hello World - Welcome to Apache Ant!</echo>
        <scp todir="usr:pass@my-server.de/:/home/usr/">
        <include name="**/*.*"/>
  </scp>
    </target>
</project>
Der scheint aber nicht in ANT enthalten. Wie installiere ich den? Habe eine Zip Datei "jsch-0.1.51.zip" mit diversen Ordnern / Files. Aber irgendwie bekomme ich immer die gleiche Meldung:
Code:
D:\users\usr\Desktop\ant-test>ant
Buildfile: D:\users\usr\Desktop\ant-test\build.xml

info:
     [echo] Hello World - Welcome to Apache Ant!

BUILD FAILED
D:\users\usr\Desktop\ant-test\build.xml:5: Problem: failed to create task or type scp
Cause: Could not load a dependent class com/jcraft/jsch/Logger
       It is not enough to have Ant's optional JARs
       you need the JAR files that the optional tasks depend upon.
       Ant's optional task dependencies are listed in the manual.
Action: Determine what extra JAR files are needed, and place them in one of:
        -C:\ant\lib
        -D:\users\usr\.ant\lib
        -a directory added on the command line with the -lib argument

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem


Total time: 0 seconds

D:\users\usr\Desktop\ant-test>
Hier der Inhalt des ZIP Archivs... Habe es mit der build.bat versucht, aber ANT kann danach immer noch kein SCP Task
Code:
|   build.bat
|   build.sh
|   build.xml
|   ChangeLog
|   LICENSE.txt
|   README
|   test.txt
|  
+---examples
|       AES.java
|       ChangePassphrase.java
|       Compression.java
|       Daemon.java
|       Exec.java
|       KeyGen.java
|       KnownHosts.java
|       Logger.java
|       OpenSSHConfig.java
|       PortForwardingL.java
|       PortForwardingR.java
|       README
|       ScpFrom.java
|       ScpTo.java
|       ScpToNoneCipher.java
|       Sftp.java
|       Shell.java
|       StreamForwarding.java
|       Subsystem.java
|       Sudo.java
|       UserAuthKI.java
|       UserAuthPubKey.java
|       ViaHTTP.java
|       ViaSOCKS5.java
|       X11Forwarding.java
|      
+---lib
+---src
|   +---main
|   |   \---java
|   |       \---com
|   |           \---jcraft
|   |               \---jsch
|   |                   |   Buffer.java
|   |                   |   Channel.java
|   |                   |   ChannelAgentForwarding.java
|   |                   |   ChannelDirectTCPIP.java
|   |                   |   ChannelExec.java
|   |                   |   ChannelForwardedTCPIP.java
|   |                   |   ChannelSession.java
|   |                   |   ChannelSftp.java
|   |                   |   ChannelShell.java
|   |                   |   ChannelSubsystem.java
|   |                   |   ChannelX11.java
|   |                   |   Cipher.java
|   |                   |   CipherNone.java
|   |                   |   Compression.java
|   |                   |   ConfigRepository.java
|   |                   |   DH.java
|   |                   |   DHG1.java
|   |                   |   DHG14.java
|   |                   |   DHGEX.java
|   |                   |   DHGEX256.java
|   |                   |   ForwardedTCPIPDaemon.java
|   |                   |   GSSContext.java
|   |                   |   HASH.java
|   |                   |   HostKey.java
|   |                   |   HostKeyRepository.java
|   |                   |   Identity.java
|   |                   |   IdentityFile.java
|   |                   |   IdentityRepository.java
|   |                   |   IO.java
|   |                   |   JSch.java
|   |                   |   JSchAuthCancelException.java
|   |                   |   JSchException.java
|   |                   |   JSchPartialAuthException.java
|   |                   |   KeyExchange.java
|   |                   |   KeyPair.java
|   |                   |   KeyPairDSA.java
|   |                   |   KeyPairGenDSA.java
|   |                   |   KeyPairGenRSA.java
|   |                   |   KeyPairPKCS8.java
|   |                   |   KeyPairRSA.java
|   |                   |   KnownHosts.java
|   |                   |   LocalIdentityRepository.java
|   |                   |   Logger.java
|   |                   |   MAC.java
|   |                   |   OpenSSHConfig.java
|   |                   |   Packet.java
|   |                   |   PBKDF.java
|   |                   |   PortWatcher.java
|   |                   |   Proxy.java
|   |                   |   ProxyHTTP.java
|   |                   |   ProxySOCKS4.java
|   |                   |   ProxySOCKS5.java
|   |                   |   Random.java
|   |                   |   Request.java
|   |                   |   RequestAgentForwarding.java
|   |                   |   RequestEnv.java
|   |                   |   RequestExec.java
|   |                   |   RequestPtyReq.java
|   |                   |   RequestSftp.java
|   |                   |   RequestShell.java
|   |                   |   RequestSignal.java
|   |                   |   RequestSubsystem.java
|   |                   |   RequestWindowChange.java
|   |                   |   RequestX11.java
|   |                   |   ServerSocketFactory.java
|   |                   |   Session.java
|   |                   |   SftpATTRS.java
|   |                   |   SftpException.java
|   |                   |   SftpProgressMonitor.java
|   |                   |   SftpStatVFS.java
|   |                   |   Signature.java
|   |                   |   SignatureDSA.java
|   |                   |   SignatureRSA.java
|   |                   |   SocketFactory.java
|   |                   |   UIKeyboardInteractive.java
|   |                   |   UserAuth.java
|   |                   |   UserAuthGSSAPIWithMIC.java
|   |                   |   UserAuthKeyboardInteractive.java
|   |                   |   UserAuthNone.java
|   |                   |   UserAuthPassword.java
|   |                   |   UserAuthPublicKey.java
|   |                   |   UserInfo.java
|   |                   |   Util.java
|   |                   |  
|   |                   +---jce
|   |                   |       AES128CBC.java
|   |                   |       AES128CTR.java
|   |                   |       AES192CBC.java
|   |                   |       AES192CTR.java
|   |                   |       AES256CBC.java
|   |                   |       AES256CTR.java
|   |                   |       ARCFOUR.java
|   |                   |       ARCFOUR128.java
|   |                   |       ARCFOUR256.java
|   |                   |       BlowfishCBC.java
|   |                   |       DH.java
|   |                   |       HMAC.java
|   |                   |       HMACMD5.java
|   |                   |       HMACMD596.java
|   |                   |       HMACSHA1.java
|   |                   |       HMACSHA196.java
|   |                   |       HMACSHA256.java
|   |                   |       HMACSHA512.java
|   |                   |       KeyPairGenDSA.java
|   |                   |       KeyPairGenRSA.java
|   |                   |       MD5.java
|   |                   |       PBKDF.java
|   |                   |       Random.java
|   |                   |       SHA1.java
|   |                   |       SHA256.java
|   |                   |       SignatureDSA.java
|   |                   |       SignatureRSA.java
|   |                   |       TripleDESCBC.java
|   |                   |       TripleDESCTR.java
|   |                   |      
|   |                   +---jcraft
|   |                   |       Compression.java
|   |                   |       HMAC.java
|   |                   |       HMACMD5.java
|   |                   |       HMACMD596.java
|   |                   |       HMACSHA1.java
|   |                   |       HMACSHA196.java
|   |                   |      
|   |                   \---jgss
|   |                           GSSContextKrb5.java
|   |                          
|   \---test
|       +---resources
|       \---scala
\---tools
    +---bin
    |       ant
    |       ant.bat
    |       antRun
    |       antRun.bat
    |       lcp.bat
    |       runant.pl
    |       runant.py
    |      
    \---lib