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

exclude configuration in exec-war-only goal does not actually exclude anything

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.2
    • None
    • tomcat7
    • None

    Description

      Trying to exclude files using the exec-war-only goal of the tomcat7-maven-plugin does not actually exclude anything. Instead, matched exclude directives should exclude matching files. For example:

      <plugin>
      <groupId>org.apache.tomcat.maven</groupId>
      <artifactId>tomcat7-maven-plugin</artifactId>
      <version>2.2</version>
      <executions>
      <execution>
      <id>tomcat-run</id>
      <goals>
      <goal>exec-war-only</goal>
      </goals>
      <phase>package</phase>
      <configuration>
      <path>/oases</path>
      <contextFile>applicationContext.xml</contextFile>
      <extraDependencies>
      <extraDependency>
      <groupId>com.microsoft.sqlserver</groupId>
      <artifactId>sqljdbc4</artifactId>
      <version>4.0</version>
      </extraDependency>
      </extraDependencies>
      <excludes>
      <exclude>META-INF/MSFTSIG.RSA</exclude>
      </excludes>
      </configuration>
      </execution>
      </executions>
      </plugin>

      Does not prevent META-INF/MSFTSIG.RSA from being included in the WAR.

      The problem looks to be in AbstractExecWarMojo.extractJarToArchive. There is an inner for loop with a continue statement that has no effect. Instead, the statement should be changed to continue on the outer while loop.

      This issue was raised because of the following Stack Overflow question: http://stackoverflow.com/questions/29686124/how-do-i-exclude-extradependency-meta-inf-files-for-exec-war-goal

      Attachments

        Activity

          People

            olamy Olivier Lamy
            heenenee Abraham Grief
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified