FTP-Publisher Plugin

Plugin Information

Plugin ID ftppublisher
Latest Release 1.2-h-1
Latest Release Date Aug 27, 2012
Sources Github
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla

The FTP-Publisher Plugin

This plugin can be used to upload project artifacts and whole directories to an ftp server. The following image show the configuration part of this plugin that can be found under

the Hudson System Configuration page. The fields are self explanatory with a little help text.

  After you define one or more ftp server to upload things you have to configure the projects what parts have to be uploaded. See the image below.
First you choose the target ftp server in this example ftp.urz.uni-heidelberg.de. So after that you specify the files and or folder to upload you are free to define a absolut path or a

fileset pattern (like in ant http://ant.apache.org/). So I guess with this information you can use this plugin very well and don't forget I developed this in my spare time so some feature are still

missing and maybe some bugs are living. Thankful to anybody how support hudson and this plugin. See the comments for information about some current bugs.

Labels:

plugin-upload plugin-upload Delete
tier3-hudson-plugin tier3-hudson-plugin Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. May 19, 2010

    Florian Straub says:

    Since this plugin was damn slow and somehow confused the paths starting with th...

    Since this plugin was damn slow and somehow confused the paths starting with the second upload, I wrote a batch script for uploading my artifacts via FTP:

    The batch job:
    echo Uploading artifacts
    rem use script and don't use automatic login
    ftp -s:"C:\path_to_my_ftp_script.txt" -n

    The ftp upload scrip (C:\path_to_my_ftp_script.txt)t:
    open 1.23.45.21 2122#
    user myusername
    mypassword
    bin
    cd artifact_dir_on_target_ftp_server
    put C:\artifactfile.zip
    bye

    I hope you like it.

  2. May 20, 2010

    Benjamin Jaton says:

    I just released an new version for this plugin. It fixes most of the bugs and ad...

    I just released an new version for this plugin. It fixes most of the bugs and adds directory support. Also you can specify if you need the path to use a timestamp or to flatten the remote paths.

    The new version is 1.0 and is NOT backward compatible so please take some time to fix your plugin/jobs configuration.

    Have fun !

  3. May 26, 2010

    Michał Minicki says:

    Hey, just installed 1.0 and it probably works great when using standard FTP tran...

    Hey, just installed 1.0 and it probably works great when using standard FTP transfer (ports 21 and 20) but I probably have port 20 blocked so I get 0 byte sized uploaded files (without an error, though).

    Could you possibly implement an option for PASV transfers?

    Console log is as follows:

    Connecting to crm-test file:/usr/local/hudson/.hudson/jobs/crm-commons/workspace/
    current root dir /jboss423
    current root dir /jboss423/deploy/common
    transferred 1 files to deploy/common
    Transfered 1 files
    Finished: SUCCESS

  4. Jul 25, 2010

    Werner Beroux says:

    The help description of some fields should be more elaborated. Like: Destinat...

    The help description of some fields should be more elaborated. Like:

    • Destination: What if it's empty? Does it take the same as the source?
    • Timestamp: What is it doing? Copy timestamp from source folder to keep the same timestamp? Only copy files newer, or may files with a different date time?
  5. Sep 01, 2010

    George A says:

    I am having an issue where if I save two different FTP servers, the individual j...

    I am having an issue where if I save two different FTP servers, the individual jobs default to the first FTP server I entered. Any help or tips? Thanks!

  6. Sep 09, 2010

    Stuart Boston says:

    What I would really like is the ability to upload to multiple FTP sites from the...

    What I would really like is the ability to upload to multiple FTP sites from the same job rather than just picking one per job.

  7. Dec 01, 2010

    Michał Minicki says:

    Switching to passive mode is easy if you're adventurous enough (plugin recompile...

    Switching to passive mode is easy if you're adventurous enough (plugin recompile). I have only one FTP server so I skipped the part of adding a parameter to the FTP site and just went and edited the createSession method on FTPSite object:

    Index: src/main/java/com/zanox/hudson/plugins/FTPSite.java
    ===================================================================
    --- src/main/java/com/zanox/hudson/plugins/FTPSite.java	(revision 37130)
    +++ src/main/java/com/zanox/hudson/plugins/FTPSite.java	(working copy)
    @@ -264,6 +264,7 @@
     		if (!ftpClient.changeWorkingDirectory(ftpDir)) {
     			throw new IOException("Can't connect/access FTP directory:" + ftpDir);
     		}
    +		ftpClient.enterLocalPassiveMode();
     	}
     
     	/**
    
  8. Dec 03, 2010

    Ivan Najman says:

    This error is what i get when trying to upload files to FTP server ERROR: Fail...

    This error is what i get when trying to upload files to FTP server

    ERROR: Failed to upload files
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at java.net.Socket.connect(Socket.java:478)
    at java.net.Socket.<init>(Socket.java:375)
    at java.net.Socket.<init>(Socket.java:189)
    at org.apache.commons.net.DefaultSocketFactory.createSocket(DefaultSocketFactory.java:53)
    at org.apache.commons.net.SocketClient.connect(SocketClient.java:162)
    at com.zanox.hudson.plugins.FTPSite.createSession(FTPSite.java:260)
    at com.zanox.hudson.plugins.FTPPublisher.perform(FTPPublisher.java:149)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:603)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:582)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:560)
    at hudson.model.Build$RunnerImpl.post2(Build.java:156)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:529)
    at hudson.model.Run.run(Run.java:1349)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:139)
    ERROR: Publisher com.zanox.hudson.plugins.FTPPublisher aborted due to exception
    java.lang.NullPointerException
    at org.apache.commons.net.telnet.TelnetClient.disconnect(TelnetClient.java:125)
    at org.apache.commons.net.ftp.FTP.disconnect(FTP.java:397)
    at org.apache.commons.net.ftp.FTPClient.disconnect(FTPClient.java:590)
    at com.zanox.hudson.plugins.FTPSite.closeSession(FTPSite.java:275)
    at com.zanox.hudson.plugins.FTPPublisher.perform(FTPPublisher.java:165)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:603)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:582)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:560)
    at hudson.model.Build$RunnerImpl.post2(Build.java:156)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:529)
    at hudson.model.Run.run(Run.java:1349)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:139)
    Finished: FAILURE