重新部署"版本化的"从Jenkins到Tomcat的war文件失败

时间:2014-11-10 13:42:38

标签: tomcat jenkins jenkins-plugins

我正在使用Jenkins部署插件来部署到Tomcat。生成的.war文件使用以下格式命名:MyApp ## [version]。[buildnumber] .war

例如,war文件将生成为:MyApp ## alpha.13.war

文件名中散列的原因是Tomcat manager html页面列出已部署应用程序的version列中的版本。这样,我们可以仔细检查当前部署到Tomcat的版本。

现在,当尝试通过Jenkins进行第二次部署时,内部版本号显然会增加。因此,将使用文件名:MyApp ## alpha.14.war

生成上述war文件

现在因以下异常而失败:

  

部署C:\ Users \ davidr.jenkins \ jobs \ Task Form Builder   (trunk)\ workspace \ target \ TaskFormBuilder ## alpha.21.war to container   Tomcat 7.x远程重新部署[C:\ Users \ davidr.jenkins \ jobs \ Task   表单生成器(主干)\ workspace \ target \ TaskFormBuilder ## alpha.21.war]
  取消部署[C:\ Users \ davidr.jenkins \ jobs \ Task Form Builder   (trunk)\ workspace \ target \ TaskFormBuilder ## alpha.21.war]错误:   发布者hudson.plugins.deploy.DeployPublisher因中止而中止   异常org.codehaus.cargo.container.ContainerException:失败   取消部署[C:\ Users \ davidr.jenkins \ jobs \ Task Form Builder   (trunk)\ workspace \ target \ TaskFormBuilder ## alpha.21.war] at   org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:140)     在   org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:178)     在   hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73)     在   hudson.plugins.deploy.CargoContainerAdapter $ 1.invoke(CargoContainerAdapter.java:116)     在   hudson.plugins.deploy.CargoContainerAdapter $ 1.invoke(CargoContainerAdapter.java:103)     在hudson.FilePath.act(FilePath.java:919)at   hudson.FilePath.act(FilePath.java:897)at   hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)     在   hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)     在hudson.tasks.BuildStepMonitor $ 3.perform(BuildStepMonitor.java:45)     在   hudson.model.AbstractBuild $ AbstractBuildExecution.perform(AbstractBuild.java:770)     在   hudson.model.AbstractBuild $ AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)     在hudson.model.Build $ BuildExecution.post2(Build.java:183)at at   hudson.model.AbstractBuild $ AbstractBuildExecution.post(AbstractBuild.java:683)     在hudson.model.Run.execute(Run.java:1784)at   hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)at at   hudson.model.ResourceController.execute(ResourceController.java:89)     在hudson.model.Executor.run(Executor.java:240)引起:   org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:   失败 - 路径/TaskFormBuilder ##alpha.21

没有上下文      

在   org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:566)     在   org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:480)     在   org.codehaus.cargo.container.tomcat.internal.TomcatManager.undeploy(TomcatManager.java:420)     在   org.codehaus.cargo.container.tomcat.Tomcat7xRemoteDeployer.performUndeploy(Tomcat7xRemoteDeployer.java:62)     在   org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:130)     ......还有17个   org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:   失败 - 路径/TaskFormBuilder ##alpha.21

没有上下文      

在   org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:566)     在   org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:480)     在   org.codehaus.cargo.container.tomcat.internal.TomcatManager.undeploy(TomcatManager.java:420)     在   org.codehaus.cargo.container.tomcat.Tomcat7xRemoteDeployer.performUndeploy(Tomcat7xRemoteDeployer.java:62)     在   org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:130)     在   org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:178)     在   hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73)     在   hudson.plugins.deploy.CargoContainerAdapter $ 1.invoke(CargoContainerAdapter.java:116)     在   hudson.plugins.deploy.CargoContainerAdapter $ 1.invoke(CargoContainerAdapter.java:103)     在hudson.FilePath.act(FilePath.java:919)at   hudson.FilePath.act(FilePath.java:897)at   hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)     在   hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)     在hudson.tasks.BuildStepMonitor $ 3.perform(BuildStepMonitor.java:45)     在   hudson.model.AbstractBuild $ AbstractBuildExecution.perform(AbstractBuild.java:770)     在   hudson.model.AbstractBuild $ AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)     在hudson.model.Build $ BuildExecution.post2(Build.java:183)at at   hudson.model.AbstractBuild $ AbstractBuildExecution.post(AbstractBuild.java:683)     在hudson.model.Run.execute(Run.java:1784)at   hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)at at   hudson.model.ResourceController.execute(ResourceController.java:89)     在hudson.model.Executor.run(Executor.java:240)完成:失败

任何人都可以协助如何使用tomcats建议的命名约定(使用哈希指定版本)让Jenkins将war文件重新部署到Tomcat吗?

1 个答案:

答案 0 :(得分:2)

我认为您发现部署确实有效,只是报告错误。

这是部署者插件或货物代码中的错误,请参阅JIRA问题https://issues.jenkins-ci.org/browse/JENKINS-19564