Skip to end of metadata
Go to start of metadata

Plugin Information

View Deploy to container on the plugin site for more information.

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:

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
  • Glassfish 2.x/3.x

Refer to the Deploy WebSphere Plugin to deploy to a running remote WebSphere Application Server.
Refer to the WebLogic Deployer Plugin to deploy to a running remote WebLogic 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.13 (August 7, 2017)
Version 1.10 (Jul 2, 2014)
Version 1.9 (Jun 11, 2012)
  • Password in config.xml is now scrambled (pull #6)
    • This change is backward-compatible but is not forward-compatible
  • The context path can now also be spericied (JENKINS-9093)
Version 1.8 (Jun 28, 2011)
  • GlassFish v3 remote deployment (pull #3)
Version 1.7 (Mar 11, 2011)
  • Fix Tomcat 7 deployement url
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 (JENKINS-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)

60 Comments

  1. Unknown User (edgriebel)

    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. Does it really support deploying on a remote JBoss 4.x? There is a open issue: 3437

  3. Unknown User (kinwah.lai@gmail.com)

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

  4. Unknown User (mosgjig@hotmail.com)

    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. Unknown User (amigo)

    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. Unknown User (monojetski)

    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. Unknown User (monojetski)

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

  8. 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. Updating the plugin to use cargo 1.0.4 library solves the above problem (smile)

  10. Unknown User (dmartin@dmartin.org)

    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. Unknown User (michaelajr)

    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. Unknown User (dominique.righetto@gmail.com)

    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. great!!!

      thank you, so much!!

  13. I managed to install the plugin on my jenkins instance and Jboss 5x is listed as one of the containers.

    Does this plugin actually support Jboss 5x?

  14. I can't deploy multiple war files with this version.

    Does Jenkins Deploy-Plugin support to deploy multiple war files,?

  15. Hello, 

    i'm trying to deploy my EAR file using this plugin.

    I have lateste version of jenkins and the deployment plugin. My Jboss is 5.1.0GA.

    It gives me the error:

    Caused by: org.codehaus.cargo.util.CargoException: Cannot locate the JBoss deployer class! Make sure the jboss-deployer for your
    JBoss version as well as all required JBoss JARs are in CARGO's classpath.
    More information on: http://cargo.codehaus.org/JBoss+Remote+Deployer
     at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:91)
     ... 25 more
    Caused by: java.lang.ClassNotFoundException: org.codehaus.cargo.tools.jboss.JBossDeployerCaused by: org.codehaus.cargo.util.CargoException: Cannot
     locate the JBoss deployer class! Make sure the jboss-deployer for yourJBoss version as well as all required JBoss JARs are in CARGO's classpath.More information on: http://cargo.codehaus.org/JBoss+Remote+Deployer	at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:91)	... 25 moreCaused by: java.lang.ClassNotFoundException: org.codehaus.cargo.tools.jboss.JBossDeployer
    

    I added to the jenkins global variables the values for classpath:

    classpath as: $classpath;/usr/java/jboss-5.1.0.GA/lib;/usr/java/jboss-5.1.0.GA/client

    What could be the problem? thank you

  16. where is the proplem?

    deploy the war to tomcat7,but i always get" Caused by: java.io.FileNotFoundException: /manager/text/list" class="external-link" rel="nofollow">http://server/manager/text/list"

    how should i do

  17. Hi,

    I'm deploying a war and ear file to glassfish via port 4848. Port is open (I can telnet to it) and username and password are OK.

    I get the following error:

    ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
    java.lang.IllegalStateException: error submitting remote command
    at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:170)
    at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.findTargetModule(AbstractJsr88Deployer.java:350)
    at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:122)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:60)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
    at hudson.FilePath.act(FilePath.java:758)
    at hudson.FilePath.act(FilePath.java:740)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635)
    at hudson.model.Build$RunnerImpl.post2(Build.java:162)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:604)
    at hudson.model.Run.run(Run.java:1401)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:230)
    Caused by: java.lang.RuntimeException: error submitting remote command
    at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:725)
    at org.glassfish.deployment.client.AbstractDeploymentFacility.listTargets(AbstractDeploymentFacility.java:683)
    at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:168)
    ... 19 more
    Caused by: java.lang.RuntimeException: org.glassfish.api.admin.CommandException: HTTP connection failed with code 403, message: Forbidden
    at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:121)
    at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:694)
    ... 21 more
    Caused by: org.glassfish.api.admin.CommandException: HTTP connection failed with code 403, message: Forbidden
    at com.sun.enterprise.admin.remote.RemoteAdminCommand.checkConnect(RemoteAdminCommand.java:901)
    at com.sun.enterprise.admin.remote.RemoteAdminCommand.doHttpCommand(RemoteAdminCommand.java:659)
    at com.sun.enterprise.admin.remote.RemoteAdminCommand.doHttpCommand(RemoteAdminCommand.java:544)
    at com.sun.enterprise.admin.remote.RemoteAdminCommand.fetchCommandModel(RemoteAdminCommand.java:1061)
    at com.sun.enterprise.admin.remote.RemoteAdminCommand.getCommandModel(RemoteAdminCommand.java:320)
    at com.sun.enterprise.admin.cli.remote.RemoteCommand.prepare(RemoteCommand.java:296)
    at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:241)
    at com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput(RemoteCommand.java:388)
    at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:117)
    ... 22 more

    Is there any way to get more information on the error? What is giving the 403 error? Is it possible to enable a verbose mode?

    Thanks

    Matteo

    1. I found the solution. You need to

      ./asadmin enable-secure-admin

      on the server and restart the domain

  18. Sorry if I ask again: now the plugin complains that I am deploying an application that already exists.

    ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
    org.codehaus.cargo.util.CargoException: Deployment has failed: Action failed Deploying application to target server failed; Error occurred during deployment: Application with name idman is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name. Please see server.log for more details.
    at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.waitForProgressObject(AbstractJsr88Deployer.java:220)
    at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.deploy(AbstractJsr88Deployer.java:76)
    at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:142)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:60)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
    at hudson.FilePath.act(FilePath.java:758)
    at hudson.FilePath.act(FilePath.java:740)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635)
    at hudson.model.Build$RunnerImpl.post2(Build.java:162)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:604)
    at hudson.model.Run.run(Run.java:1401)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:230)
    Finished: FAILURE
    
    

    Is there a way to force the redeployment via the plugin? Is this a bug or am I missing something (again :-) ?

  19. Hi there

    I have a problem with remote deploy to a JBoss 4.2.3. We are running Jenkins 1.428 on Ubuntu 11.04 in a tomcat6.

    What happens is that I get through to the JBoss correctly which in turn attempts to download the artefact from the build server.

    This fails because there is nothing behind the download URL i.e. Cargo failed to fire up the jetty to serve the artefact?

    In Jenkins I get

    ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
    org.codehaus.cargo.container.ContainerException: Failed to deploy to [http://vm-rainbow:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=redeploy&argType=java.net.URL&arg0=http%3A%2F%2FSP-Ubuntu%3A18080%2Fschadenmanager.ear]
    at org.codehaus.cargo.container.jboss.internal.JdkHttpURLConnection.connect(JdkHttpURLConnection.java:76)
    at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.invokeURL(JBoss4xRemoteDeployer.java:290)
    ...
    Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: [http://vm-rainbow:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=redeploy&argType=java.net.URL&arg0=http%3A%2F%2FSP-Ubuntu%3A18080%2Fschadenmanager.ear]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1403)
    at org.codehaus.cargo.container.jboss.internal.JdkHttpURLConnection.connect(JdkHttpURLConnection.java:69)
    ... 20 more
    

    and on the remote JBoss I get this error in the log

    2011-09-08 10:02:43,270 ERROR \[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].\[\].[HtmlAdaptor]\] Servlet.service() for servlet HtmlAdaptor threw exception
    org.jboss.deployment.DeploymentException: url [http://SP-Ubuntu:18080/schadenmanager.ear] could not be opened, does it exist?
           at org.jboss.deployment.DeploymentInfo.<init>(DeploymentInfo.java:214)
    

    I can ping the build server like this

    C:\Dokumente und Einstellungen\developer>ping SP-Ubuntu
    
    Ping SP-Ubuntu [192.168.47.163] mit 32 Bytes Daten:
    
    Antwort von 192.168.47.163: Bytes=32 Zeit=2ms TTL=64
    Antwort von 192.168.47.163: Bytes=32 Zeit<1ms TTL=64
    Antwort von 192.168.47.163: Bytes=32 Zeit<1ms TTL=64
    Antwort von 192.168.47.163: Bytes=32 Zeit<1ms TTL=64
    
    Ping-Statistik für 192.168.47.163:
          Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0 (0% Verlust),
    Ca. Zeitangaben in Millisek.:
          Minimum = 0ms, Maximum = 2ms, Mittelwert = 0ms
    

    Any ideas why I don't get anything from the Jenkins box?

    best regards

    Thomas

    P.S. where should I ask this question if not here?

    P.P.S. Worked around the problem by running deployment locally on the JBoss machine with a Jenkins slave.

  20. Hi!

    Just wanted to warn about new roles in tomcat6. Some time before you just needed to use "manager" role to be able to deploy manually or with this plugin in Jenkins but now "manager" role is deprecated and you're encouraged to use "manager-gui" role in your users. If you do so, make sure that you assign "manager-script" role to the user that will be doing the deployments in Jenkins, as "manager-gui" won't grant access to the text version of the manager that the plugin uses.

    Best regards

  21. Hi,

    I have a problem deploying on JBoss 4.x.

    JBoss console is on port 11310 (so the JBoss URL configured in my job is: http://myserver.mydomain.com:11310).

    The build fails and in the ouput console there's the following stack trace

    ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
    org.codehaus.cargo.container.ContainerException: Failed to create deployer with implementation class org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer for the parameters (container [id = [jboss4x]], deployer type [remote]).
    	at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:157)
    	at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:87)
    	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:135)
    	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:153)
    	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:55)
    	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
    	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
    	at hudson.FilePath.act(FilePath.java:758)
    	at hudson.FilePath.act(FilePath.java:740)
    	at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
    	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
    	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:664)
    	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:639)
    	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:617)
    	at hudson.model.Build$RunnerImpl.post2(Build.java:161)
    	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:586)
    	at hudson.model.Run.run(Run.java:1400)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    	at hudson.model.ResourceController.execute(ResourceController.java:88)
    	at hudson.model.Executor.run(Executor.java:175)
    Caused by: java.lang.reflect.InvocationTargetException
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    	at java.lang.reflect.Constructor.newInstance(Unknown Source)
    	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:206)
    	at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:153)
    	... 20 more
    Caused by: java.lang.IllegalArgumentException: port out of range:111310
    	at java.net.InetSocketAddress.<init>(Unknown Source)
    	at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.buildSocketAddressForDeployableServer(JBoss4xRemoteDeployer.java:263)
    	at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.<init>(JBoss4xRemoteDeployer.java:132)
    	at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.<init>(JBoss4xRemoteDeployer.java:117)
    	... 26 more
    java.lang.reflect.InvocationTargetException
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    	at java.lang.reflect.Constructor.newInstance(Unknown Source)
    	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:206)
    	at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:153)
    	at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:87)
    	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:135)
    	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:153)
    	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:55)
    	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
    	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
    	at hudson.FilePath.act(FilePath.java:758)
    	at hudson.FilePath.act(FilePath.java:740)
    	at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
    	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
    	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:664)
    	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:639)
    	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:617)
    	at hudson.model.Build$RunnerImpl.post2(Build.java:161)
    	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:586)
    	at hudson.model.Run.run(Run.java:1400)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    	at hudson.model.ResourceController.execute(ResourceController.java:88)
    	at hudson.model.Executor.run(Executor.java:175)
    Caused by: java.lang.IllegalArgumentException: port out of range:111310
    	at java.net.InetSocketAddress.<init>(Unknown Source)
    	at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.buildSocketAddressForDeployableServer(JBoss4xRemoteDeployer.java:263)
    	at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.<init>(JBoss4xRemoteDeployer.java:132)
    	at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.<init>(JBoss4xRemoteDeployer.java:117)
    	... 26 more
    

    I have double checked my job configuration and the JBoss Url is correct (http://myserver.mydomain.com:11310) while the IllegalArgumentException refers to port 111310

    Should I file an issue?

    Regards,

    Manlio

    1. We his this problem a few days ago with WebLogic 10.3.0 -> 10.3.5 I wonder if they are sharing code !?

  22. Is there any way to get around the problem that Matteo Corti mentioned earlier?

    remote failure: Error occurred during deployment: Application with name itmems4-ear is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name. Please see server.log for more details.

    when deploying the same application to the same server more than one gives the above error (in glassfish).  If I am going to have to write a script that runs after the build completes to undeploy the application first, then whats the point of this plugin, I may as well just deploy the application in the same script.

    see this http://blog.enterpriselab.ch/tdmarti/2011/10/20/jenkins-and-the-deployment-plugin/ for more information.

    Derek

  23. Are there any plans to add support for deploy to multiple containers for a clustered environment.

  24. Hello , 

    We are working ion new Java Project where appserver runs on Tomcat 7.x , I configured my job  to use DEPloy Plug in to deploy war on Tomcat server but failed due to below errors, Any help would be greatly appreciated. I can see war copied to tomcat server and exploded But Does Not restart service at all again.

    I restarted manually Process.Started by user Kalluri, Jagan
    Building on master in workspace E:\jenkins\workspace\Test-Tomcat-Deploy
    Test-Tomcat-Deploy $ cmd /c call C:\Users\mksadmin\AppData\Local\Temp\hudson530932303868573312.bat

    E:\jenkins\workspace\Test-Tomcat-Deploy>echo E:\jenkins\workspace\Test-Tomcat-Deploy
    E:\jenkins\workspace\Test-Tomcat-Deploy

    E:\jenkins\workspace\Test-Tomcat-Deploy>del E:\jenkins\workspace\Test-Tomcat-Deploy\web\target*.war
    Could Not Find E:\jenkins\workspace\Test-Tomcat-Deploy\web\target*.war

    E:\jenkins\workspace\Test-Tomcat-Deploy>copy E:\jenkins\workspace\VMS-JAVA\web\target\vms*.war E:\jenkins\workspace\Test-Tomcat-Deploy\web\target
    E:\jenkins\workspace\VMS-JAVA\web\target\vms-web-1.0-SNAPSHOT.war
    1 file(s) copied.

    E:\jenkins\workspace\Test-Tomcat-Deploy>exit 0
    Deploying E:\jenkins\workspace\Test-Tomcat-Deploy\web\target\vms-web-1.0-SNAPSHOT.war to container Tomcat 7.x Remote
    ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
    org.codehaus.cargo.container.ContainerException: Failed to redeploy \jenkins\workspace\Test-Tomcat-Deploy\web\target\vms-web-1.0-SNAPSHOT.war
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:195)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:60)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
    at hudson.FilePath.act(FilePath.java:788)
    at hudson.FilePath.act(FilePath.java:770)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656)
    at hudson.model.Build$RunnerImpl.post2(Build.java:162)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625)
    at hudson.model.Run.run(Run.java:1435)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:238)
    Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:504)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:622)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:635)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:176)
    ... 17 more
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:504)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:622)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:635)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:176)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:60)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
    at hudson.FilePath.act(FilePath.java:788)
    at hudson.FilePath.act(FilePath.java:770)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656)
    at hudson.model.Build$RunnerImpl.post2(Build.java:162)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625)
    at hudson.model.Run.run(Run.java:1435)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:238)
    Finished: FAILURE

  25. Newbie question: I use the deploy plugin to deploy a war file I create manually. Where exactly should I put the war file so that the plugin can find it?

    The on-form help reads: "War/ear files to deploy. Relative to the workspace root". What is the "workspace root"? Is it the tomcat/webapps folder?

    Also, I tried to write the name of a non-existing file, just to see what error message I get, and I saw no error message on the "Console output". Where can I see error messages of the plugin?

  26. I'm having trouble deploying a war file (name.war) that uses a different display name. When I do so, instead of getting a file name.war in the webapps directory, I get the file displayname.war. Is this a bug or expected behavior? Any way I can work around it? For now I'm having to stop Tomcat via ssh, scp the war file over, and start Tomcat again.

    Using Tomcat 6.0.24 running on Sun VM 1.6.0_26-b03 on Ubuntu (reported as Linux 2.6.32-39-server) on amd64 architecture.

  27. Will this plugin support build/environment variables for deploy URLs?

    I'm currently trying to deploy WARs to servers that are selected via Paramaterized Builds plugin. The result is an UnknownHostException when trying to resolve the variable.

    Thanks!

    1. +1 please!! I'm trying to create a DRY pipeline: having many jobs funnel into a single "deployer" for multiple environments. Same for the Context Path, please.

  28. Is this plugin still maintained?

    Cargo is at Version 1.2.2, the plugin uses 1.0.6!?

    I want to use it with the parallel deployment feature of Tomcat 7 and Cargo is throwing exceptions all the time though the deployment does work (sometimes, most of the times...). This is failing the build.

    ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception org.codehaus.cargo.container.ContainerException: Failed to deploy []
    Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Failed to deploy application at context path /css//1.5.1

    1. I updated the plugin to Cargo 1.2.3. Parallel deployment to Tomcat 7 is now working.

      I did a fork on GitHub

      https://github.com/trexter/deploy-plugin

      and will probably make a pull request for it.

      There is a Jira issue

      https://issues.jenkins-ci.org/browse/JENKINS-13855

      that could be closed after pulling the changes.

      1. I would like to know how to update the plugin.

                can you help me through..

        Where to place the updated cargo.

  29. I am getting the following error when deploying to a Tomcat 7 instance:Deploying /var/lib/jenkins/jobs/Demo1/workspace/target/ROOT.war to container Tomcat 7.x Remote
    ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
    org.codehaus.cargo.container.ContainerException: Failed to redeploy /var/lib/jenkins/jobs/Demo1/workspace/target/ROOT.war
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:195)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:64)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
    at hudson.FilePath.act(FilePath.java:842)
    at hudson.FilePath.act(FilePath.java:824)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:77)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:47)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692)
    at hudson.model.Build$BuildExecution.post2(Build.java:183)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639)
    at hudson.model.Run.execute(Run.java:1527)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:236)
    Caused by: java.io.FileNotFoundException: http://demo1-vm.picsauditing.com:8080/manager//manager/text/list
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:504)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:622)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:635)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:176)
    ... 16 more
    java.io.FileNotFoundException: http://demo1-vm.picsauditing.com:8080/manager//manager/text/list
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:504)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:622)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:635)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:176)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:64)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
    at hudson.FilePath.act(FilePath.java:842)
    at hudson.FilePath.act(FilePath.java:824)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:77)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:47)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692)
    at hudson.model.Build$BuildExecution.post2(Build.java:183)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639)
    at hudson.model.Run.execute(Run.java:1527)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:236)

    1. You noticed the double slash in the URL and the two "manager" parts!?

      You have to set the Tomcat URL in the job plugin configuration to http://demo1-vm.picsauditing.com:8080

      See also http://cargo.codehaus.org/Tomcat+7.x at the end of the page:

      "With Tomcat 7, the Tomcat manager has multiple aspects to be careful about:

      • Your browser by default accesses the HTML-based manager whereas CARGO needs to use the text-based manager. As a result, if you want to set the RemotePropertySet.URI manually, please make sure you set the URL for the text-based manager, for example http://production27:8080/manager/text
      • The text-based manager requires to be accessed by a user with the manager-script role; and by default no user has that role. As a result, please make sure you modify your tomcat-users.xml file to give that role to a user.

      You can read more on the Tomcat documentation: http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html"

  30. Hello, I have a problem with using this plugin in version 1.9 on Jenkins and glassfish v3.1.2. If Jenkins want to deploy the artifact it aborted with the following exception:

    Remote Deploying /root/.hudson/jobs/MavenTest/workspace/MavenTest-ear/target/MavenTest-ear-1.12-SNAPSHOT.ear to container GlassFish 3.x
    ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
    org.codehaus.cargo.util.CargoException: Cannot communicate with the server
    	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:126)
    	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:64)
    	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
    	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
    	at hudson.FilePath.act(FilePath.java:852)
    	at hudson.FilePath.act(FilePath.java:825)
    	at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:77)
    	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:47)
    	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:779)
    	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:939)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
    	at hudson.model.Run.execute(Run.java:1541)
    	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
    	at hudson.model.ResourceController.execute(ResourceController.java:88)
    	at hudson.model.Executor.run(Executor.java:236)
    Caused by: javax.enterprise.deploy.spi.exceptions.TargetException: Error getting required modules
    	at org.glassfish.deployapi.SunDeploymentManager.getModules(SunDeploymentManager.java:313)
    	at org.glassfish.deployapi.SunDeploymentManager.getRunningModules(SunDeploymentManager.java:200)
    	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.findTargetModule(AbstractJsr88Deployer.java:350)
    	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:122)
    	... 16 more
    Caused by: java.lang.ClassCastException: org.glassfish.deployapi.TargetImpl cannot be cast to org.glassfish.deployapi.TargetImpl
    	at org.glassfish.deployapi.SunDeploymentManager.getModules(SunDeploymentManager.java:300)
    	... 19 more
    javax.enterprise.deploy.spi.exceptions.TargetException: Error getting required modules
    	at org.glassfish.deployapi.SunDeploymentManager.getModules(SunDeploymentManager.java:313)
    	at org.glassfish.deployapi.SunDeploymentManager.getRunningModules(SunDeploymentManager.java:200)
    	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.findTargetModule(AbstractJsr88Deployer.java:350)
    	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:122)
    	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:64)
    	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
    	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
    	at hudson.FilePath.act(FilePath.java:852)
    	at hudson.FilePath.act(FilePath.java:825)
    	at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:77)
    	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:47)
    	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:779)
    	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:939)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
    	at hudson.model.Run.execute(Run.java:1541)
    	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
    	at hudson.model.ResourceController.execute(ResourceController.java:88)
    	at hudson.model.Executor.run(Executor.java:236)
    Caused by: java.lang.ClassCastException: org.glassfish.deployapi.TargetImpl cannot be cast to org.glassfish.deployapi.TargetImpl
    	at org.glassfish.deployapi.SunDeploymentManager.getModules(SunDeploymentManager.java:300)
    	... 19 more
    Finished: FAILURE
    
    

    What`s the Problem? Could anybody help me? I didn´t configure the cargo-plugin at the pom.xml in my artefact. Is this the problem?

  31. Hi all,

    I am new to Jenkins. Iam facing an issue in remote deploy to Jboss server.

    I am using the deploy plugin for deploying ear files to a remote box. The environment is windows. I have attached the jboss settings. Build is getting successful. But the ear file is not getting copied tot he jboss deploy folder. can anyone please let me know what corrections I need to make?

    Any help is really appreciated.

    Regards,

    Harry.

  32. Hi Everyone,
    I am using deploy plugin to deploy a file in JBOSS server but it shows error and fails my entire build.
    Do anyone has suggestion to configure the plugin? I have attached my configuration screenshot.
    Any suggestion or replies ASAP is appreciated..

    ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
    org.codehaus.cargo.container.ContainerException: Failed to create deployer with implementation class org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer for the parameters (container [id = jboss5x], deployer type remote).
    at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:157)
    at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:87)
    at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:135)
    at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:153)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:55)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
    at hudson.FilePath.act(FilePath.java:852)
    at hudson.FilePath.act(FilePath.java:825)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:77)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:47)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:779)
    at hudson.model.Build$BuildExecution.post2(Build.java:183)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
    at hudson.model.Run.execute(Run.java:1568)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:236)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:206)
    at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:153)
    ... 19 more
    Caused by: org.codehaus.cargo.util.CargoException: Cannot locate the JBoss deployer class! Make sure the jboss-deployer for your
    JBoss version as well as all required JBoss JARs are in CARGO's classpath.
    More information on: http://cargo.codehaus.org/JBoss+Remote+Deployer
    at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:91)
    ... 25 more
    Caused by: java.lang.ClassNotFoundException: org.codehaus.cargo.tools.jboss.JBossDeployer
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:81)
    ... 25 more
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:206)
    at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:153)
    at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:87)
    at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:135)
    at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:153)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:55)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
    at hudson.FilePath.act(FilePath.java:852)
    at hudson.FilePath.act(FilePath.java:825)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:77)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:47)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:779)
    at hudson.model.Build$BuildExecution.post2(Build.java:183)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
    at hudson.model.Run.execute(Run.java:1568)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:236)
    Caused by: org.codehaus.cargo.util.CargoException: Cannot locate the JBoss deployer class! Make sure the jboss-deployer for your
    JBoss version as well as all required JBoss JARs are in CARGO's classpath.
    More information on: http://cargo.codehaus.org/JBoss+Remote+Deployer
    at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:91)
    ... 25 more
    Caused by: java.lang.ClassNotFoundException: org.codehaus.cargo.tools.jboss.JBossDeployer
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:81)
    ... 25 more

  33. Hello,

    sadly the plugin does not replace PARAMETER for the deploy URL.

    Our deploy url for tomcat (Tomcat URL) looks like this: https://backend1-$SYSTEM:8443

    The variable $SYSTEM can be:
    test.oursystem.com
    dev.oursystem.com
    demo.oursystem.com

    Sadly the plugin does not replace the URL. Can somebody fix this small issue please?

    Thanks

    https://backend1-$SYSTEM:8443

    1. +1,please

      i have the issue,

      can support the PARAMETER for the deploy URL.?

      when?

  34. Hi,

    I tried this plugin (deploy plugin), worked fine for tomcat, but when I tried using it for JBoss (EAR file), the context got deployed, but in tmp rather than default.

    So on next restart my app is gone.

    Anyway to deploy it to default, or am I doing something wrong.

    Thanks

  35. Here is a fork on github with remote Jetty support. This uses the cargo-jetty-deployer webapp.

    https://github.com/andytompkins/deploy-plugin

  36. Read timed out deploying a large war with Tomcat 7

    Caused by: [org.codehaus.cargo.container.tomcat.internal.TomcatManagerException|http://stacktrace.jenkins-ci.org/search?query=org.codehaus.cargo.container.tomcat.internal.TomcatManagerException]: FAIL - Encountered exception java.net.SocketTimeoutException: Read timed out
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:507)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:547)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:273)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:256)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:240)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:107)
    ... 17 more
    

    My Googling suggest that I simply need to increase the read time out on the process making the connection. Is there a way to configure this value with the plugin?

    Example : this jira resolves the issue for the JBoss4xRemoteDeployer by changing the default readTimeout value.

  37. What if I want to deploy to IIS ??? I havent read anything about it.
    Greetings.

  38. Hi All,

    I'm having problems with this plugin.  It doesn't seem to do anything and nothing is showing in the log except for:

    Mar 16, 2015 10:04:47 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.tasks.LogRotator
    Mar 16, 2015 10:04:47 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.plugins.deploy.DeployPublisher
    Mar 16, 2015 10:04:47 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.plugins.deploy.tomcat.Tomcat7xAdapter
    Mar 16, 2015 10:04:48 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.tasks.LogRotator
    Mar 16, 2015 10:04:48 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.plugins.deploy.DeployPublisher
    Mar 16, 2015 10:04:48 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.plugins.deploy.tomcat.Tomcat7xAdapter
    Mar 16, 2015 10:05:56 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.tasks.LogRotator
    Mar 16, 2015 10:05:56 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.model.StringParameterDefinition
    Mar 16, 2015 10:05:56 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.model.StringParameterDefinition
    Mar 16, 2015 10:05:56 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.plugins.deploy.DeployPublisher
    Mar 16, 2015 10:05:56 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.plugins.deploy.tomcat.Tomcat7xAdapter
    Mar 16, 2015 10:05:58 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.tasks.LogRotator
    Mar 16, 2015 10:05:58 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.model.StringParameterDefinition
    Mar 16, 2015 10:05:58 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.model.StringParameterDefinition
    Mar 16, 2015 10:05:58 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.plugins.deploy.DeployPublisher
    Mar 16, 2015 10:05:58 AM WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
    'stapler-class' is deprecated: hudson.plugins.deploy.tomcat.Tomcat7xAdapter

    If I have any other post-steps then even that doesn't show up. This message seems to be in response to commit 82b0a45924b083796d04c94661bbef7b80e2d2bf. And may be part of this issue https://issues.jenkins-ci.org/browse/JENKINS-25403. I was wondering if others saw the same behavior.

  39. Hi all,

    Can I know how to deploy .war to container Jboss-AS-6.x/ Jboss-AS-7.x?

    And I try to add my own plugin and but jenkins did not allow me to add it since it is not jenkins plugin. Can anyone help me to solve this.

    Best Regards.

  40. Hi,

    Is there any way to set the management port ? I have 3 JBoss on the same server with port offsets : +1000, +3000, +5000. Cargo always tried to connect to remote://myjbossserver.mydomain:9999 using the port "9999" which is invalid (because only 10999 (+1000), 12999 (+3000) and 14999 (+5000) are used).

    Regards

  41. Can this plugin not deploy EAR files to TOMEE?  

    Getting this error when trying to deploy my EAR, 

    org.codehaus.cargo.container.ContainerException: Only WAR archives are supported for deployment in Tomcat.
  42. Hi, guys. When tomcat 8 will be supported?

    I saw some updates on github, hope new release is coming.

  43. Can you please add support to Tomcat 8.x?

    1. Old comment, but for anyone with the same issue: the workaround is just to use the Tomcat 7.x adapter. A release with the Tomcat 8.x adapter will hopefully be made soon.

       

      See:  JENKINS-42110 - Getting issue details... STATUS

  44. Can you please help me with a Download Link on this page... How do i download the .hpi as it is not available in the Available Plugins over my Jenkins Server.

    Appreciate your support.

  45. Hi,

    I have a problem deploying on Tomca 7.x.

    The build fails and in the ouput console there's the following stack trace

    Deploying C:\jenkins-2.93\workspace\Deployment\PostProdRelease_I2\target\MyApp.war to container Tomcat 7.x Remote with context MyApp

    Redeploying [C:\jenkins-2.93\workspace\MyApp_Deployment\PostProdRelease_I2\target\MyApp.war]
    Undeploying [C:\jenkins-2.93\workspace\MyApp_Deployment\PostProdRelease_I2\target\MyApp.war]
    ERROR: Build step failed with exception
    org.codehaus.cargo.container.ContainerException: Failed to undeploy [C:\jenkins-2.93\workspace\MyApp_Deployment\PostProdRelease_I2\target\MyApp.war]
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:139)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:177)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:77)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:147)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:117)
    at hudson.FilePath.act(FilePath.java:1009)
    at hudson.FilePath.act(FilePath.java:987)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:114)
    at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeploy(PasswordProtectedAdapterCargo.java:93)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:64)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1073)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
    at hudson.model.Run.execute(Run.java:1752)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
    Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The Tomcat Manager responded "FAIL - Context /MyApp is defined in server.xml and may not be undeployed
    " instead of the expected "OK" message
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:715)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:501)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.undeploy(TomcatManager.java:441)
    at org.codehaus.cargo.container.tomcat.Tomcat7xRemoteDeployer.performUndeploy(Tomcat7xRemoteDeployer.java:61)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:129)
    ... 18 more
    org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The Tomcat Manager responded "FAIL - Context /MyApp is defined in server.xml and may not be undeployed
    " instead of the expected "OK" message
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:715)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:501)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.undeploy(TomcatManager.java:441)
    at org.codehaus.cargo.container.tomcat.Tomcat7xRemoteDeployer.performUndeploy(Tomcat7xRemoteDeployer.java:61)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:129)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:177)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:77)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:147)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:117)
    at hudson.FilePath.act(FilePath.java:1009)
    at hudson.FilePath.act(FilePath.java:987)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:114)
    at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeploy(PasswordProtectedAdapterCargo.java:93)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:64)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1073)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
    at hudson.model.Run.execute(Run.java:1752)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
    Build step 'Deploy war/ear to a container' marked build as failure
    Finished: FAILURE

     

    What`s the Problem? Could anybody help me?

    1. Hi Venu,

      Tomcat's documentation suggests this:

      It is NOT recommended to place <Context> elements directly in the server.xml file. This is because it makes modifying the Context configuration more invasive since the main conf/server.xml file cannot be reloaded without restarting Tomcat.

      Regards,

      A

  46. Hi All,

    I am trying to make Tomcat Parallel deployments using deploy plugin work. After upgrading to the latest version, now cargo doesn't throw any errors, but the problem is that I have to specify a context for it to deploy the new war. This means the war being deployed isn't versioned, and hence instead of being deployed in parallel to the existing one, it undeploys and redeploys on the same context. Any solutions to this?

    As a workaround, I have used publish over ssh plugin to directly sending the versioned war to webapps and that seems to be working fine. I would still like to use a deployment plugin to achieve this task.

    Thanks in advance.

    Regards,

    Ansh

  47. Plugin not able exeucte post build actions publishinh WAR files.

  48. M Z

    How can I deploy the target war file into custom directory under tomcat/ instead of webapps ?

Write a comment…