Apache Tomcat Maven Plugin
  1. Apache Tomcat Maven Plugin
  2. MTOMCAT-197

tomcat7:undeploy goal not ignoring non-war projects

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Component/s: tomcat7
    • Labels:
      None

      Description

      Hello, the new tomcat7:undeploy goal is not ignoring non-war projects (<packaging>anything but war</packaging>) (like tomcat7:deploy and tomcat:undeploy already correctly do), creating errors and extra WAR deletion attempts. Whatever config you do to tomcat7:deploy that causes it to skip non-war projects needs to be added to this goal as well.

      Using this project w/2.1-SNAPSHOT of Maven Tomcat plugin:
      https://github.com/gmazza/blog-samples/tree/master/web_service_tutorial
      running tomcat:undeploy from the base folder should cause it to be ignored for three poms (base,client, and service) while activated only for war. Compare:

      Codehaus tomcat:undeploy (good, correctly skipping non-war projects):
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Tutorial: Basic WSDL-First Web Service 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] Skipping non-war project
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building – Web Service Provider 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — tomcat-maven-plugin:1.1:undeploy (default-cli) @ web-service-tutorial-service —
      [INFO] Skipping non-war project
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building – Service WAR file 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — tomcat-maven-plugin:1.1:undeploy (default-cli) @ web-service-tutorial-war —
      [INFO] Undeploying application at http://localhost:8080/doubleit
      [INFO] OK - Undeployed application at context path /doubleit
      [INFO]

      Apache tomcat7:deploy (good, correctly skipping non-war projects):
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Tutorial: Basic WSDL-First Web Service 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] Skipping non-war project
      [INFO]
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building – Web Service Provider 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — tomcat7-maven-plugin:2.1-SNAPSHOT:deploy (default-cli) @ web-service-tutorial-service —
      [INFO] Skipping non-war project
      [INFO] ------------------------------------------------------------------------
      [INFO] Building – Service WAR file 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      Uploading: http://localhost:8080/manager/text/deploy?path=%2Fdoubleit
      Uploaded: http://localhost:8080/manager/text/deploy?path=%2Fdoubleit (7723 KB at 66574.0 KB/sec)

      – tomcat7:undeploy (bad, always running undeploy )

      [INFO] ------------------------------------------------------------------------
      [INFO] Building Tutorial: Basic WSDL-First Web Service 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] FAIL - No context exists for path /web-service-tutorial-1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] Building – Web Service Provider 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] Undeploying application at http://localhost:8080/doubleit
      [INFO] OK - Undeployed application at context path /doubleit
      [INFO] ------------------------------------------------------------------------
      [INFO] Building – Service WAR file 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] — tomcat7-maven-plugin:2.1-SNAPSHOT:undeploy (default-cli) @ web-service-tutorial-war —
      [INFO] Undeploying application at http://localhost:8080/doubleit
      [INFO] FAIL - No context exists for path /doubleit
      [INFO] ------------------------------------------------------------------------
      [INFO] Building – SOAP Client 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — tomcat7-maven-plugin:2.1-SNAPSHOT:undeploy (default-cli) @ web-service-tutorial-client —
      [INFO] Undeploying application at http://localhost:8080/web-service-tutorial-client-1.0-SNAPSHOT
      [INFO] FAIL - No context exists for path /web-service-tutorial-client-1.0-SNAPSHOT

        Activity

        Hide
        Hudson added a comment -

        Integrated in TomcatMavenPlugin-mvn3.x #227 (See https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/227/)
        MTOMCAT-197 tomcat7:undeploy goal not ignoring non-war projects (Revision 1430966)

        Result = SUCCESS
        olamy : http://svn.apache.org/viewvc/?view=rev&rev=1430966
        Files :

        • /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/deploy/UndeployMojo.java
        Show
        Hudson added a comment - Integrated in TomcatMavenPlugin-mvn3.x #227 (See https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/227/ ) MTOMCAT-197 tomcat7:undeploy goal not ignoring non-war projects (Revision 1430966) Result = SUCCESS olamy : http://svn.apache.org/viewvc/?view=rev&rev=1430966 Files : /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/deploy/UndeployMojo.java
        Show
        Olivier Lamy (*$^¨%`£) added a comment - fixed http://svn.apache.org/r1430966

          People

          • Assignee:
            Olivier Lamy (*$^¨%`£)
            Reporter:
            Glen Mazza
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development