Tomcat Undeploy Failed Error


今日はwindowsの下にtomcatを配置し、jenkinsを利用して自動配置を実現しました.
最初の導入ではwarパッケージのインストールがスムーズで、正常にアクセスできます.
2回目の導入では、自分が発表した古いプロジェクトを正常に削除できず、失敗しました.

org.codehaus.cargo.container.ContainerException: Failed to undeploy [C:\.jenkins\jobs\TestProject\workspace\test-web\target\test.war]
	at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:140)
	at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:178)
	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103)
	at hudson.FilePath.act(FilePath.java:914)
	at hudson.FilePath.act(FilePath.java:887)
	at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)
	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)
	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1030)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:725)
	at hudson.model.Run.execute(Run.java:1701)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:231)
Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Unable to delete [C:\Apache Software Foundation\Tomcat 7.0\webapps\test]. The continued presence of this file may cause problems.

	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:566)
	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:480)
	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.undeploy(TomcatManager.java:420)
	at org.codehaus.cargo.container.tomcat.Tomcat7xRemoteDeployer.performUndeploy(Tomcat7xRemoteDeployer.java:62)
	at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:130)
	... 17 more
org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Unable to delete [C:\Apache Software Foundation\Tomcat 7.0\webapps\test]. The continued presence of this file may cause problems.

	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:566)
	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:480)
	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.undeploy(TomcatManager.java:420)
	at org.codehaus.cargo.container.tomcat.Tomcat7xRemoteDeployer.performUndeploy(Tomcat7xRemoteDeployer.java:62)
	at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.undeploy(AbstractTomcatManagerDeployer.java:130)
	at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:178)
	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103)
	at hudson.FilePath.act(FilePath.java:914)
	at hudson.FilePath.act(FilePath.java:887)
	at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)
	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)
	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1030)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:725)
	at hudson.model.Run.execute(Run.java:1701)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:231)

エラーメッセージは明らかですが、私たちが発表したプロジェクトtestを削除できません.
私はまたtomcatのuserに権限があるかどうかを見て、あることに気づいた.私は多くのroleを一緒に彼に払ったからだ.

その後、antiResourceLockingプロパティによる可能性があることがわかりました.以下を参照してください.http://stackoverflow.com/questions/14873219/cannot-undeploy-a-web-app-completely-in-tomcat-7
contextを変更します.xmlファイル

tomcatを再起動し、jenkinsを複数回利用して再自動配置に成功しました.