Andreas Büchler created MPMD-155:
------------------------------------

             Summary: Maven PMD Plugin ignores failurePriority
                 Key: MPMD-155
                 URL: https://jira.codehaus.org/browse/MPMD-155
             Project: Maven 2.x PMD Plugin
          Issue Type: Bug
          Components: PMD
    Affects Versions: 2.7.1
         Environment: Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: /usr/local/dev/maven/apache-maven-3.0.3
Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.0.0-22-generic-pae", arch: "i386", family: "unix"
            Reporter: Andreas Büchler
         Attachments: mvn-pmd-plugin.txt

Hello,

trying to configure the PMD plugin to fail on build errors I noticed that it 
doesn't evaluate the failurePriority. I wanted it only to fail on violations 
with priority > 4:

{code:xml}
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>2.7.1</version>
                <configuration>
                    <targetJdk>${compileSource}</targetJdk>
                    <verbose>true</verbose>
                    <rulesets>
                        
<ruleset>../../src/main/resources/pmd-rulesets.xml</ruleset>
                    </rulesets>
                </configuration>
                <executions>
                    <execution>
                        <id>pmd-check</id>
                        <phase>test</phase>
                        <configuration>
                            <failOnViolation>true</failOnViolation>
                            <failurePriority>4</failurePriority>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
{code}

Even when all remaining violations have priority 3 the build fails.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to