Robert,

I had trouble with the ftp task a while ago.
In my case however, I could use the scp task instead, 
which works very well. 

So if you should try to use the ssh copy (scp) task, 
your environment permitting of course.


Eg:
<target name="sshjsp">
<echo message="Copying jsp fles."/>
        <scp todir="${username}:[EMAIL PROTECTED]:${imPrjDir}" 
trust="true">
                <fileset refid="jsp.files"/>
        </scp>
</target>

Thanks,
Suma







"Robert Koberg" <[EMAIL PROTECTED]>
10/13/2004 02:05 PM
Please respond to "Ant Users List"
 
        To:     [EMAIL PROTECTED]
        cc:     (bcc: Suma Bhat/CONTRACTOR/FIB/CO/GSA/GOV)
        Subject:        CopyStreamException on FTP task


Hi,

When executing the FTP task, I consistently get a SocketException: 
Connection reset

I have no problem uploading the files with other FTP clients using the 
same host, username and password.

This is going to a windows server (I have sent a request for the logs 
but I doubt the client knows how to get them).

I am using ant 1.6.2, commons-net 1.2.2, jakarta-oro 2.0.8 (jdk 1.4.2). 
I have tried this on WinXP with SP2 and OSX.

I have tried a variety of options in the task, but after a few files, I 
get the exception. Any ideas how I can get this to work?

Here is the debug output from the task:


promote-remote-ftp:
       [ftp] Opening FTP connection to xx.xx.xx.xx
       [ftp] connected
       [ftp] logging in to FTP server
       [ftp] login succeeded
       [ftp] changing the remote directory
       [ftp] sending files
Could not load a dependent class 
(com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) 
for type cvsversion
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load a dependent class (junit/framework/Test) for type junit
fileset: Setup scanner in dir 
C:\home\app\projects\project\dev.project.com with patternSet{ 
includes:[**/*.rss, **/*.txt, **/*.atom, **/*.htm, **/*.css, **/*.js] 
excludes: [**/*.gif, **/*.ico, **/*.jpg] }
       [ftp] transferring 
C:\home\app\projects\project\dev.project.com\Volumes\Volume10-01-04.htm
       [ftp] File 
C:\home\app\projects\project\dev.project.com\Volumes\Volume10-01-04.htm 
copied to xx.xx.xx.xx
       [ftp] transferring 
C:\home\app\projects\project\dev.project.com\Volumes\archivefull.htm
       [ftp] File 
C:\home\app\projects\project\dev.project.com\Volumes\archivefull.htm 
copied to xx.xx.xx.xx
       [ftp] transferring 
C:\home\app\projects\project\dev.project.com\Volumes\currentissue.txt
       [ftp] File 
C:\home\app\projects\project\dev.project.com\Volumes\currentissue.txt 
copied to xx.xx.xx.xx
       [ftp] transferring 
C:\home\app\projects\project\dev.project.com\Volumes\currentissue_email.htm
       [ftp] disconnecting

BUILD FAILED
C:\home\app\projects\project\project.xml:70: error during FTP transfer: 
java.net.SocketException: Connection reset
         at 
org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:2014)
         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)

Total time: 43 seconds


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to