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

cannot redeploy to tomcat if using a context with a version

Description

When deploying a war on tomcat 7, it's very useful to configure the <context> parameter, as it is not allowed within META-INF/context.xml war file.
Everything works fine if I'm using a "simple" context like <context>myappli</context>.
But, if I want to add a version number to my context using tomcat's special feature (like <context>myappli##1.0-SNAPSHOT</context>), deployment succeed the first time but fails on subsequent tries with this error :

[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.3.2:deployer-redeploy (verify-deploy) on project myappli-war: Execution verify-deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.3.2:deployer-redeploy failed: Failed to deploy [E:\myappli\myappli-war\target\myappli-war-1.0.0-SNAPSHOT.war]: FAIL - application already exists at path /myappli##1.0.0-SNAPSHOT -> [Help 1]

My cargo configuration :

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.3.2</version> <executions> <execution> <id>verify-deploy</id> <phase>install</phase> <goals> <goal>deployer-redeploy</goal> </goals> </execution> </executions> <configuration> <container> <containerId>tomcat7x</containerId> <type>remote</type> </container> <deployer> </deployer> <deployables> <deployable> <groupId>${project.groupId}</groupId> <artifactId>${project.artifactId}</artifactId> <type>${project.packaging}</type> <properties> <context>myappli##${project.version}</context> </properties> </deployable> </deployables> <configuration> <type>runtime</type> <properties> <cargo.hostname>localhost</cargo.hostname> <cargo.protocol>http</cargo.protocol> <cargo.remote.uri>http://localhost:8080/manager/text</cargo.remote.uri> <cargo.remote.username>admin</cargo.remote.username> <cargo.remote.password>admin</cargo.remote.password> <cargo.servlet.port>8080</cargo.servlet.port> </properties> </configuration> </configuration> </plugin>

Status

Assignee

Savas Ali Tokmen

Reporter

Bernard LUPIN

Components

Fix versions

Affects versions

1.3.2

Priority

Minor