Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    1. jart7.zip
      11 kB
      Romain Manni-Bucau

      Issue Links

        Activity

        Hide
        Hudson added a comment -

        SUCCESS: Integrated in TomcatMavenPlugin-mvn3.x #257 (See https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/257/)
        MTOMCAT-239 src/main/webapp must not be mandatory when running a jar so create a fake one (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1534436)

        • /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java
        • /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
          MTOMCAT-239 when running a jar with tomcat7:run ServletContainerInitializer is ignored
          fix an issue with reactor containing a jar module with ServletContainerInitializer and running the webapp (target/classes from the jar is ignored during scanning) (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1534433)
        • /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
        • /tomcat/maven-plugin/trunk/pom.xml
        • /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java
        • /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
        Show
        Hudson added a comment - SUCCESS: Integrated in TomcatMavenPlugin-mvn3.x #257 (See https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/257/ ) MTOMCAT-239 src/main/webapp must not be mandatory when running a jar so create a fake one (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1534436 ) /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java MTOMCAT-239 when running a jar with tomcat7:run ServletContainerInitializer is ignored fix an issue with reactor containing a jar module with ServletContainerInitializer and running the webapp (target/classes from the jar is ignored during scanning) (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1534433 ) /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java /tomcat/maven-plugin/trunk/pom.xml /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        fixed.

        Show
        Olivier Lamy (*$^¨%`£) added a comment - fixed.
        Hide
        Romain Manni-Bucau added a comment -

        Note: in the sample servlet api is set with scope compile (instead of provided) and if you set <warSourceDirectory>$

        {project.basedir}

        /src/main/resources/META-INF/resources</warSourceDirectory> you realize the servlet api is no more filtered as in a real tomcat instance.

        Show
        Romain Manni-Bucau added a comment - Note: in the sample servlet api is set with scope compile (instead of provided) and if you set <warSourceDirectory>$ {project.basedir} /src/main/resources/META-INF/resources</warSourceDirectory> you realize the servlet api is no more filtered as in a real tomcat instance.
        Hide
        Romain Manni-Bucau added a comment -

        Attaching jart7.zip project showing the issue(s).

        First src/main/webapp looks mandatory,
        Then ServletContainerInitializer are ignored,
        Finally META-INF/resources are ignored.

        If the packaging type if jar replacing src/main/webapp by src/main/resources/META-INF/resources would help and using target/classes as WEB-INF/classes would solve everything. An alternative would be to use the package jar and add it in the WebappClassLoader. The first one is better since it allows hot redeployment of resources

        Show
        Romain Manni-Bucau added a comment - Attaching jart7.zip project showing the issue(s). First src/main/webapp looks mandatory, Then ServletContainerInitializer are ignored, Finally META-INF/resources are ignored. If the packaging type if jar replacing src/main/webapp by src/main/resources/META-INF/resources would help and using target/classes as WEB-INF/classes would solve everything. An alternative would be to use the package jar and add it in the WebappClassLoader. The first one is better since it allows hot redeployment of resources

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development