We're updating the issue view to help you get more done. 

Undeploying should not fail if No context exists

Description

I'm deploying war application during automated build.
Application keeps running after build finished for demo and tests by QA.

In build before application deployed on server it is undeployed then app database is updeted and tested and only then app deployed again.

the problem is deployer-undeploy fails if No context exists.

TomcatRemoteDeployer] Undeploying [c:\build\work\entree\entree\..\server\target\entree.war
[INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------ [INFO] Failed to undeploy [c:\build\work\entree\entree\..\server\target\entree.war]
FAIL - No context exists for path /entree
[INFO] ------------------------------------------------------------------------ [INFO] Trace
org.codehaus.cargo.container.ContainerException: Failed to undeploy [c:\build\work\entree\entree\..\server\target\entree.war]
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatDeployer.undeploy(AbstractTomcatDeployer.java:141)
at org.codehaus.cargo.maven2.DeployerUndeployMojo.performDeployerActionOnSingleDeployable(DeployerUndeployMojo.java:38)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:106)

Would be nice to have property to prevent build failure in this case. Sumthing like cargo.undelpoy.nocontext.ignore=true

<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<executions>
<execution>
<id>verify-deploy</id>
<phase>install</phase>
<goals>
<goal>deployer-deploy</goal>
</goals>
</execution>

<execution>
<id>clean-undeploy</id>
<phase>pre-clean</phase>
<goals>
<goal>deployer-undeploy</goal>
</goals>
<configuration>
<no-context-ok>true</no-context-ok>
</configuration>
</execution>

</executions>
<configuration>
.....

Status

Assignee

Unassigned

Reporter

Vlad Skarzhevskyy

Fix versions

Priority

Minor