Goal "exploded" does deploys before undeploy is finished
--------------------------------------------------------

                 Key: MTOMCAT-47
                 URL: http://jira.codehaus.org/browse/MTOMCAT-47
             Project: Maven 2.x Tomcat Plugin
          Issue Type: Bug
    Affects Versions: 1.0-beta-1
         Environment: Apache Maven 3.0-alpha-4 (r835944; 2009-11-13 
19:06:31+0100)
Java version: 1.6.0_17
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
            Reporter: Mark Michaelis


For integration tests we want to deploy an exploded webapp into tomcat. But 
this fails if we deployed the webapp in a previous run as the deployment seems 
to start before the undeployment is actually done.

This is the code snippet we use for deployment. Mind the "update=true" which 
should do the undeployment:

{code:xml}
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tomcat-maven-plugin</artifactId>
        <version>1.0-beta-1</version>
        <executions>
          <execution>
            <id>deploy</id>
            <goals>
              <goal>exploded</goal>
            </goals>
            <phase>compile</phase>
            <configuration>
              <url>http://localhost:8001/manager</url>
              <username>some</username>
              <password>someother</password>
              <warDirectory>${basedir}/webapp</warDirectory>
              <path>/${deploy.path}</path>
              <update>true</update>
            </configuration>
          </execution>
        </executions>
      </plugin>
{code}

>From the log:
{noformat}
[INFO] --- tomcat-maven-plugin:1.0-beta-1:exploded (deploy) @ tomcat-deployment 
---
[DEBUG] Created new class realm 
plugin>org.codehaus.mojo:tomcat-maven-plugin:1.0-beta-1
[DEBUG] Populating plugin realm for 
org.codehaus.mojo:tomcat-maven-plugin:1.0-beta-1
[DEBUG]   Included: 
org.codehaus.mojo:tomcat-maven-plugin:maven-plugin:1.0-beta-1
[DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0
[DEBUG]   Excluded: org.apache.maven:maven-artifact-manager:jar:2.0
[DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:2.0
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:1.0.4
[DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:2.0
[DEBUG]   Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
[DEBUG]   Excluded: classworlds:classworlds:jar:1.1-alpha-2
[DEBUG]   Excluded: org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5
[DEBUG]   Included: commons-codec:commons-codec:jar:1.3
[DEBUG]   Included: org.apache.tomcat:catalina:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:servlet-api:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:juli:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:annotations-api:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:catalina-ha:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:coyote:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:tribes:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:el-api:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:jasper:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:jsp-api:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:jasper-jdt:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:jasper-el:jar:6.0.16
[DEBUG]   Included: org.apache.tomcat:dbcp:jar:6.0.16
[DEBUG] Configuring mojo 
'org.codehaus.mojo:tomcat-maven-plugin:1.0-beta-1:exploded' with basic 
configurator -->
[DEBUG]   (f) charset = ISO-8859-1
[DEBUG]   (f) contextFile = ...\META-INF\context.xml
[DEBUG]   (f) mode = war
[DEBUG]   (f) packaging = war
[DEBUG]   (f) password = ...
[DEBUG]   (f) path = /editor
[DEBUG]   (f) update = true
[DEBUG]   (f) url = http://localhost:8001/manager
[DEBUG]   (f) username = ...
[DEBUG]   (f) version = 1.0-beta-1
[DEBUG]   (f) warDirectory = ...\webapp
[DEBUG] -- end configuration --
[INFO] Deploying war to http://localhost:8001/editor
[DEBUG] No server specified for authentication - using defaults
[INFO] OK - Undeployed application at context path /editor
[INFO] FAIL - Application already exists at path /editor
{noformat}

Thus the deployment fails because undeployment is still incomplete.

*Workarounds:*

* Manually clean before doing the deployment.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to