Hi list,

I am using Ant 1.7 with jdk-1.5.0_11. 

My usecase is to upload a directory to a host server, aka
scp -r myDir me:[EMAIL PROTECTED]:/path

I am using a custom class which is using the ant task for the job. The
directory contains three other dirs. 
The src tree looks something like:
./myDir
|-- Disposiciones
|   |-- BOJA07_021705_15671-A.incd
|   `-- BOJA07_021924_15784-A.incd
|-- PDF
|   |-- BOJA07-161-01NU_096_00001.pdf
|   `-- BOJA07-161-01NU_096_00096.pdf
`-- XML
    |-- BOJA07_161_S1.xml
    `-- BOJA07_161_S5.2.xml

I had a problem with the following code:
...
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.optional.ssh.Scp;
import org.apache.tools.ant.types.FileSet;
...
public void upload(String export, String toSshUri) {
    Scp scpConnection = new Scp();
    scpConnection.setTrust(true);
    scpConnection.setTodir(toSshUri);
    scpConnection.setProject(new Project());
    FileSet f = new FileSet();
    f.setDir(new File(export));
    f.setIncludes("**/*");
    scpConnection.addFileset(f);
    scpConnection.execute();
  }

With jsch-0.1.34.jar and jsch-0.1.33.jar the code did not finished. It
did create the "Disposiciones" and uploaded all files from this
directory but then nothing happens (no error, no message, nothing). 

Then I changed my jar to jsch-0.1.28.jar and now it works like a charm.

Hopefully this information helps you to determine what the problem may
be.

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to