Uploaded image for project: 'Apache Tomcat Maven Plugin'
  1. Apache Tomcat Maven Plugin
  2. MTOMCAT-197

tomcat7:undeploy goal not ignoring non-war projects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.1
    • tomcat7
    • 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

      Attachments

        Activity

          People

            olamy Olivier Lamy
            gmazza Glen Mazza
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: