Deploy Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID deploy Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
1.10
Jul 02, 2014
1.532
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Kohsuke Kawaguchi (id: kohsuke)
Meikel Bode (id: edobm)
Daniel Barth (id: devkiela)
Leandro Kersting de Freitas (id: leandro-freitas-softdevelop)
Usage Installations 2013-Jun 5690
2013-Jul 5939
2013-Aug 5864
2013-Sep 5923
2013-Oct 6149
2013-Nov 6210
2013-Dec 6121
2014-Jan 6479
2014-Feb 6616
2014-Mar 6871
2014-Apr 6948
2014-May 7126

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.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 (issue #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 (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
Enter labels to add to this page:
Please wait 
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 - 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. Mar 07, 2011

      cynipe - says:

      great!!! thank you, so much!!

      great!!!

      thank you, so much!!

  13. Apr 13, 2011

    Wahyu Saputra says:

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

    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. May 23, 2011

    Nguyen Manh Chuan says:

    I can't deploy multiple war files with this version. Does Jenkins Deploy-Plugin...

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

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

  15. Jun 01, 2011

    Martin Irigaray says:

    Hello,  i'm trying to deploy my EAR file using this plugin. I have latest...

    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. Aug 29, 2011

    zhu yc says:

    where is the proplem? deploy the war to tomcat7,but i always get" Caused by: ja...

    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. Sep 06, 2011

    Matteo Corti says:

    Hi, I'm deploying a war and ear file to glassfish via port 4848. Port is open (...

    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. Sep 06, 2011

      Matteo Corti says:

      I found the solution. You need to ./asadmin enable-secure-admin on the server...

      I found the solution. You need to

      ./asadmin enable-secure-admin

      on the server and restart the domain

  18. Sep 08, 2011

    Matteo Corti says:

    Sorry if I ask again: now the plugin complains that I am deploying an applicatio...

    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. Sep 09, 2011

    Thomas Mühlfriedel says:

    Hi there I have a problem with remote deploy to a JBoss 4.2.3. We are running J...

    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. Sep 08, 2011

    Guillermo Gutiérrez Almazor says:

    Hi! Just wanted to warn about new roles in tomcat6. Some time before you ju...

    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. Sep 26, 2011

    Manlio Reisoli says:

    Hi, I have a problem deploying on JBoss 4.x. JBoss console is on port 11310 (s...

    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. Dec 07, 2011

      Brett England says:

      We his this problem a few days ago with WebLogic 10.3.0 -> 10.3.5 I wonde...

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

  22. Dec 16, 2011

    Derek Knapp says:

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

    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. Mar 16, 2012

    Kevin Campton says:

    Are there any plans to add support for deploy to multiple containers for a clust...

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

  24. Mar 21, 2012

    Jagan Kalluri says:

    Hello ,  We are working ion new Java Project where appserver runs on Tomca...

    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 [E:\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. Mar 26, 2012

    Erel Segal says:

    Newbie question: I use the deploy plugin to deploy a war file I create manually....

    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. Apr 27, 2012

    Jeff Dickerson says:

    I'm having trouble deploying a war file (name.war) that uses a different display...

    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. Apr 30, 2012

    Andrew Lysyk says:

    Will this plugin support build/environment variables for deploy URLs? I'm curre...

    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. Jan 27, 2013

      Zachary Young says:

      +1 please!! I'm trying to create a DRY pipeline: having many jobs fu...

      +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. May 22, 2012

    Daniel Barth says:

    Is this plugin still maintained? Cargo is at Version 1.2.2, the plugin uses 1.0...

    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. Jul 27, 2012

      Daniel Barth says:

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

      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. Jan 17, 2013

        Gowtham An says:

        I would like to know how to update the plugin.      &n...

        I would like to know how to update the plugin.

                can you help me through..

        Where to place the updated cargo.

  29. Sep 04, 2012

    Jared Griffith says:

    I am getting the following error when deploying to a Tomcat 7 instance:Deploying...

    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. Sep 17, 2012

      Daniel Barth says:

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

      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. Nov 21, 2012

    Steffen Meier says:

    Hello, I have a problem with using this plugin in version 1.9 on Jenkins and gla...

    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. Dec 07, 2012

    Harry Cool says:

    Hi all, I am new to Jenkins. Iam facing an issue in remote deploy to Jboss serv...

    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. Jan 07, 2013

    Gowtham An says:

    Hi Everyone, I am using deploy plugin to deploy a file in JBOSS server but it sh...

    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. Apr 22, 2013

    Philipp Schneider says:

    Hello, sadly the plugin does not replace PARAMETER for the deploy URL. Our dep...

    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

  34. Apr 23, 2013

    wharpreet - says:

    Hi, I tried this plugin (deploy plugin), worked fine for tomcat, but when I tri...

    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. Apr 23, 2013

    Andy Tompkins says:

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

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

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

  36. Nov 07, 2013

    Yohann Dumais says:

    Read timed out deploying a large war with Tomcat 7 Caused by: [org.codehaus....

    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. Jan 23

    luis aguero says:

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

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