Deploy Plugin

Plugin Information

Plugin ID deploy
Latest Release 1.9-h-2
Latest Release Date Apr 16, 2013
Sources Github
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla

This plugin takes a war/ear file and deploys that to a running remote application server at the end of a build. The implementation is based on Cargo. The list of currently supported containers include:

  • Tomcat 4.x/5.x/6.x/7.x
  • JBoss 3.x/4.x/5.x/6.x
  • Glassfish 2.x/3.x

Refer to the Deploy WebSphere Plugin to deploy to a running remote WebSphere Application Server.

How to rollback or redeploy a previous build

There may be several ways to accomplish this, but here is one suggested method:

  1. Install the Copy Artifact Plugin
  2. Create a new job that you will trigger manually only when needed
  3. Configure this job with a build parameter of type "Build selector for Copy Artifact", and a copy artifact build step using "Specified by build parameter" to select the build.
  4. Add a post-build action to deploy the artifact that was copied from the other job

Now when you trigger this job you can enter the build number (or use any other available selector) to select which build to redeploy. Thanks to Helge Taubert for this idea.

Change Log

Version 1.7 (Sep 27, 2011)
  • Added JBoss 5.x and 6.x support
Version 1.6 (Dec 10, 2010)
  • Added Tomcat 7 and GlassFish 3 support
  • Fixed bug in GlassFishAdapter, need to explicitly set the home on the container
  • Updated library to Cargo 1.0.4
Version 1.5 (Jan 16, 2010)
  • Support Ant style GLOBs for specifying war/ear files (issue #5166)
Version 1.4 (Dec 30, 2009)
  • Update library to Cargo 1.0
  • Only deploy if the build was successful, unless "even when failed" option is checked
  • Check URL format when saving config
  • Update code for more recent Hudson
  • Add initial glassfish support
Version 1.3 (Aug 5, 2008)
Version 1.2 (Jul 11, 2008)
  • Fixed the problem in submitting the configuration. Make sure to run this with 1.234 or later. (report)

Labels:

plugin-upload plugin-upload Delete
tier2-plugin tier2-plugin 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. Jun 19, 2009

    Ed Griebel says:

    Any plans on adding support for WebLogic 10.3 now that Cargo 1.0 is implemented,...

    Any plans on adding support for WebLogic 10.3 now that Cargo 1.0 is implemented, or would it be pretty easy to integrate myself?

  2. Oct 13, 2009

    Rafique Anwar says:

    Does it really support deploying on a remote JBoss 4.x? There is a open issue: 3...

    Does it really support deploying on a remote JBoss 4.x? There is a open issue: 3437

  3. Jan 27, 2010

    kinwah says:

    is it possible to deploy the war or ear as 1 of the build step and not that the ...

    is it possible to deploy the war or ear as 1 of the build step and not that the end of the build?

  4. Apr 30, 2010

    ms says:

    Feature request: Server restart. Use Context: Plugin deploys a war to tomcat ...

    Feature request: Server restart.

    Use Context: Plugin deploys a war to tomcat server on each build (initiated by svn commit) to represent a dev environment.

    Issue: After several clean deployments, plugin hangs on a deployment, requiring a manual tomcat restart which allows the plugin to complete and in turn allowing Hudson to mark the job as complete. Otherwise, the job remains open causing a Hudson job queue buildup.

    Maybe its not a prevalent issue and there is another automated way to handle this?

  5. May 05, 2010

    amigo says:

    Version 1.5 is not working for me, no invoke of deployment procedure. Deployment...

    Version 1.5 is not working for me, no invoke of deployment procedure. Deployment environment tomcat 6.x.

    D:\.hudson\jobs\s27_Grid_deploy\workspace>exit 0
    Finished: SUCCESS

    So I returned to version 1.4, there it is working fine.

    D:\.hudson\jobs\s27_Grid_deploy\workspace>exit 0
    Deploying D:\.hudson...
       Redeploying D:\.hudson...
       Undeploying D:\.hudson...[]
       Deploying D:\.hudson...[]

    Finished: SUCCESS

  6. Jun 30, 2010

    Rafael says:

    Version 1.5 wasn't working for me either.. I wasn't getting any output from it. ...

    Version 1.5 wasn't working for me either.. I wasn't getting any output from it. Then I revert to 1.4 which worked only on the first deploy. On the next build it tried to deploy to my tomcat again but it tried to deploy to the same context and failed. It really should have done an undeploy then a deploy. SO I just changed my code to use this as part of my maven build command in hudson and switched off the deploy plugin.
    tomcat:deploy-only -Dmaven.tomcat.update=true

    It would be nice to use the plugin though.

  7. Jun 30, 2010

    Rafael says:

    Actually I remove my deployments from tomcat and started again and the deploy pl...

    Actually I remove my deployments from tomcat and started again and the deploy plugin is working fine now . Tomcat must have ben confused. But version 1.5 still isn't working for me.

  8. Nov 25, 2010

    Aditya Nain says:

    Please update the plugin to use latest cargo 1.0.3 library which solves the remo...

    Please update the plugin to use latest cargo 1.0.3 library which solves the remote deployment problem in JBoss.

    I am getting this error when i use the deploy plugin (i have updated the plugin to use the latest cargo 1.0.3 library)

  9. Nov 25, 2010

    Aditya Nain says:

    Updating the plugin to use cargo 1.0.4 library solves the above problem

    Updating the plugin to use cargo 1.0.4 library solves the above problem

  10. Dec 05, 2010

    Dan Martin says:

    Maybe I'm not very smart, but I don't understand how to configure this plugin to...

    Maybe I'm not very smart, but I don't understand how to configure this plugin to use a "remote" server as the description indicates. The only configuration I am presented with is the location of the war/ear, the username/password, and the "Glassfish home" (if I chose Glassfish). The description on Glassfish Home indicates a file path, implying Hudson must be on the same server that is to be deployed to. If this is the case, I think stating this plugin allows deployment to a remote server is incorrect. If I'm wrong, please explain how to configure for a remote server.

  11. Jan 07, 2011

    Michael Andrews says:

    Having trouble with tomcat 7: java.io.FileNotFoundException: http://server:port...

    Having trouble with tomcat 7:

    java.io.FileNotFoundException: http://server:port/manager/list

    That command does not exist in 7.

    Should be:

    /manager/text/list

    M

  12. Jan 13, 2011

    Dominique Righetto says:

    Hello, In Tomcat 7, the manager base url have changed thus the plugin do not ru...

    Hello,

    In Tomcat 7, the manager base url have changed thus the plugin do not run and throw a FileNotFoundException on "http://tomcathost:tomcatport/manager/list" because the page do not exists.

    To fix it, i have checkout the plugin code (from version 1.6) and i have edited the class "hudson.plugins.deploy.tomcat.Tomcat7xAdapter" in order to override the method "configure" in order to change the url suffix.

    I have put the HPI package (compiled on Windows Server 2003 using JDK 1.6.0_17) and the source code of the modified class in the Google Docs Share below : http://docs.google.com/leaf?id=0B7SAopRfWOagNjk5MjBjYTMtODEyYy00ZGRiLTgxZWQtODk1ZDdmN2M4Nzc2&hl=en_GB

    Hope this help ;o)

    Best regards,

    Dominique

    1. Feb 10, 2011

      Aurélien Pelletier says:

      Thank you, it works. I hope the fix will be included shortly in the official ver...

      Thank you, it works. I hope the fix will be included shortly in the official version.

    2. Jan 12, 2012

      Albert Tingson says:

      Hi, Im encountering also the same problem when deploying to tomcat 7.x. Can I h...

      Hi,

      Im encountering also the same problem when deploying to tomcat 7.x. Can I have HPI package that you modified? please send it to albert@ugoods.com. Your help is really appreciated

    3. Jan 16, 2012

      Javier A. Ortiz Bultron says:

      I have the same issue but the file referred in the link is no longer available. ...

      I have the same issue but the file referred in the link is no longer available. Think you can provide it? Thanks in advance!

    4. Jan 20, 2012

      Ricardo Lindooren says:

      Like Dominique I've also patched the source, but version 1.7, to support Tomcat ...

      Like Dominique I've also patched the source, but version 1.7, to support Tomcat 7. You can find it here: http://bright-bits.blogspot.com/2012/01/fix-for-deploying-with-hudson-deploy.html

  13. Mar 09, 2011

    FatMan says:

    Dose is support Multi-deploy?

    Dose is support Multi-deploy?

  14. Jul 18, 2011

    Troy Town says:

    Regarding the WebSphere plugin…. After placing the required .jar files into the ...

    Regarding the WebSphere plugin…. After placing the required .jar files into the %project.basedir%/WEB_INF/lib/ directory, Jenkins can’t restart. I have to remove the two WAS jar files in order for Jenkins to start up again. Has anyone had this problem and is there a fix?

  15. Jan 24, 2012

    Sunil Vasisht says:

    I'm having an issue with both JBoss 5.1.0.GA and JBoss 6.1.0 with this plugin, ...

    I'm having an issue with both JBoss 5.1.0.GA and JBoss 6.1.0 with this plugin,

    1) With JBoss 5.1.0.GA, I get the following error when I deploy ear file,
    Caused by: java.io.InvalidClassException: org.jboss.profileservice.spi.ProfileKey; local class incompatible: stream classdesc serialVersionUID = 2, local class serialVersionUID = 1

    2) With JBoss 6.1.0, I don't get the above error, but the ear file is uploaded with a .war appended to it.

    I appreciate any help in resolving either of the above 2 issues.

    Thanks.

    1. Feb 15, 2012

      Daniel Wurst says:

      I've got the same problem with JBoss 5.1.0.GA. I was able to solve the first pro...

      I've got the same problem with JBoss 5.1.0.GA. I was able to solve the first problem by exchanging the jboss-profileservice-spi-0.2.2.jar in the plugin by the respective JARs from my JBoss installation (jboss-profileservice-spi.jar, jboss-profileservice.jar), but then the second problem (as you described for JBoss 6.1.0) still occurs.

  16. Feb 07, 2012

    Akilan Paulraj says:

    i downloaded deploy plugin, i got deploy.zip. when i open that i could not see t...

    i downloaded deploy plugin, i got deploy.zip. when i open that i could not see the .hpi file, instaead web-inf and met-inf folders are there. how to install this plugin pls help me

    i am using windows 2003 server

    1. Feb 07, 2012

      Akilan Paulraj says:

      this above problem solved, after downloading need to rename the file  .zip ...

      this above problem solved, after downloading need to rename the file  .zip to .hpi