我正在使用Hudson进行CI。我使用了复制工件插件,将新形成的构建复制到maven存储库,maven的货物插件用于在tomcat7x容器上部署战争。当tomcat webapps和Hudson作业没有战争时,在tomcat上成功部署了build,但是当我在在下次构建成功时安排我的Hudson作业,但是当部署在tomcat容器上时,我会遇到异常。
[INFO] Copying 68 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] [war:war {execution: default-war}]
[INFO] Packaging webapp
[INFO] Assembling webapp [epdei] in [C:\Users\rohit.kumar\.hudson\jobs\test\workspace\target\epdei]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\rohit.kumar\.hudson\jobs\test\workspace\src\main\webapp]
[INFO] Webapp assembled in [34667 msecs]
[INFO] Building war: C:\Users\rohit.kumar\.hudson\jobs\test\workspace\target\epdei.war
[INFO] [install:install {execution: default-install}]
[INFO] Installing C:\Users\rohit.kumar\.hudson\jobs\test\workspace\target\epdei.war to C:\Users\rohit.kumar\.m2\repository\epdei\epdei\2.3.0.RELEASE\epdei-2.3.0.RELEASE.war
[HUDSON] Archiving C:\Users\rohit.kumar\.hudson\jobs\test\workspace\pom.xml to C:\Users\rohit.kumar\.hudson\jobs\test\modules\epdei$epdei\builds\2012-10-23_15-47-30\archive\epdei\epdei\2.3.0.RELEASE\pom.xml
[HUDSON] Archiving C:\Users\rohit.kumar\.hudson\jobs\test\workspace\target\epdei.war to C:\Users\rohit.kumar\.hudson\jobs\test\modules\epdei$epdei\builds\2012-10-23_15-47-30\archive\epdei\epdei\2.3.0.RELEASE\epdei.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 38 seconds
[INFO] Finished at: Tue Oct 23 15:50:16 IST 2012
[INFO] Final Memory: 31M/265M
[INFO] ------------------------------------------------------------------------
channel stopped
Deploying artifacts to file:///C:/Users/rohit.kumar/.m2/repository
Deploying the main artifact epdei.war
Deploying C:\Users\rohit.kumar\.hudson\jobs\test\workspace\target\epdei.war to container Tomcat 7.x Remote
The property cargo.tomcat.manager.url has been deprecated, please use cargo.remote.uri instead.
Redeploying [C:\Users\rohit.kumar\.hudson\jobs\test\workspace\target\epdei.war]
Undeploying [C:\Users\rohit.kumar\.hudson\jobs\test\workspace\target\epdei.war]
ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.container.ContainerException: Failed to undeploy [C:\Users\rohit.kumar\.hudson\jobs\test\workspace\target\epdei.war]
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:138)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:176)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:62)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:92)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:75)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:75)
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:630)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:608)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:811)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:553)
at hudson.model.Run.run(Run.java:1390)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:414)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Unable to delete [C:\apache-tomcat-7.0.28\webapps\epdei]. The continued presence of this file may cause problems.
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:529)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:443)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.undeploy(TomcatManager.java:383)
at org.codehaus.cargo.container.tomcat.Tomcat7xRemoteDeployer.performUndeploy(Tomcat7xRemoteDeployer.java:59)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:128)
... 17 more
org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Unable to delete [C:\apache-tomcat-7.0.28\webapps\epdei]. The continued presence of this file may cause problems.
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:529)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:443)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.undeploy(TomcatManager.java:383)
at org.codehaus.cargo.container.tomcat.Tomcat7xRemoteDeployer.performUndeploy(Tomcat7xRemoteDeployer.java:59)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:128)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:176)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:62)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:92)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:75)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:75)
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:630)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:608)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:811)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:553)
at hudson.model.Run.run(Run.java:1390)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:414)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
[DEBUG] Skipping watched dependency update for build: test #43 due to result: FAILURE
Finished: FAILURE
我的货物插件配置是:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.2.0</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>
<type>installed</type>
</container>
<configuration>
<type>existing</type>
<home>C:\apache-tomcat-7.0.28</home>
</configuration>
<deployer>
<type>installed</type>
<deployables>
<deployable>
<groupId>epdei</groupId>
<artifactId>epdei</artifactId>
<type>war</type>
<properties>
<context>/epdei</context>
</properties>
</deployable>
</deployables>
</deployer>
</configuration>
</plugin>
可以告诉我如何解决这个问题。