Uploaded image for project: 'Codehaus Cargo'
  1. CARGO-1172

cannot redeploy to tomcat if using a context with a version

    Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects versions: 1.3.2
    • Fix versions: 1.3.3
    • Components: Tomcat
    • Labels:
      None
    • Environment:

      Windows - JDK 1.7

      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 :

      <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>
      

        Attachments

          Activity

            People

            • Assignee:
              savasalitokmen Savas Ali Tokmen (Inactive)
              Reporter:
              bernardlupin Bernard LUPIN (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: