Uploaded image for project: 'Maven PMD Plugin'
  1. Maven PMD Plugin
  2. MPMD-243

excludeFromFailureFile configuration does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 3.2, 3.5, 3.7, 3.8
    • None
    • PMD
    • None

    Description

      The excludeFromFailureFile configruation is ignored since version 3.1 of Maven PMD plugin. Here is my plugin configuration:

            <plugin>
              <artifactId>maven-pmd-plugin</artifactId>
              <!-- Latest version is 3.8, all version above 3.1 ignore the excludes file, hence we're downgrading to 3.1 -->
              <version>3.8</version>
              <configuration>
                <verbose>true</verbose>
              </configuration>
              <executions>
                <execution>
                  <goals>
                    <goal>check</goal>
                  </goals>
                  <configuration>
                    <excludeFromFailureFile>${basedir}/config/pmd/pmd-exclude.properties</excludeFromFailureFile>
                  </configuration>
                </execution>
              </executions>
            </plugin>
      

      The pmd-exclude.properties file has the following content:

      com.example.ClassWithLotsOfStaticImports=TooManyStaticImports
      

      When I execude mvn clean pmd:check, I get a violation for ClassWithLotsOfStaticImports. It works with 3.0 and 3.1. I've testet several version above 3.1.

      Attachments

        Activity

          People

            adangel Andreas Dangel
            britter Benedikt Ritter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: