[ https://jira.codehaus.org/browse/MPMD-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=319978#comment-319978 ]
Mirko Friedenhagen commented on MPMD-163: ----------------------------------------- When running the unit-tests, this shows as well: {code} Running org.apache.maven.plugin.pmd.PmdViolationCheckMojoTest [INFO] You have 17 warnings. For more details see:/Users/mifr/workspace/foss/maven-pmd-plugin-3.0/target/test/unit/default-configuration/target/pmd.xml [INFO] PMD Warning: def.configuration.App:80 Rule:UselessParentheses Priority:4 Useless parentheses.. [INFO] PMD Warning: def/configuration/App2.java:22 Rule:UnusedImports Priority:4 Avoid unused imports such as 'java.io.File'. [INFO] PMD Warning: def/configuration/App2.java:22 Rule:UnusedImports Priority:4 Avoid unused imports such as 'java.io.File'. [INFO] PMD Warning: def.configuration.AppSample:58 Rule:UselessParentheses Priority:4 Useless parentheses.. [INFO] PMD Warning: def.configuration.AppSample:58 Rule:UselessParentheses Priority:4 Useless parentheses.. [INFO] PMD Warning: def.configuration.AppSample:58 Rule:UselessParentheses Priority:4 Useless parentheses.. [INFO] PMD Failure: def.configuration.App:31 Rule:UnusedPrivateField Priority:3 Avoid unused private fields such as 'unusedVar2'.. [INFO] PMD Failure: def.configuration.App:56 Rule:EmptyCatchBlock Priority:3 Avoid empty catch blocks. [INFO] PMD Failure: def.configuration.AppSample:27 Rule:UnusedPrivateField Priority:3 Avoid unused private fields such as 'unusedVar'.. [INFO] PMD Failure: def.configuration.AppSample:27 Rule:UnusedPrivateField Priority:3 Avoid unused private fields such as 'unusedVar'.. [INFO] PMD Failure: def.configuration.AppSample:27 Rule:UnusedPrivateField Priority:3 Avoid unused private fields such as 'unusedVar'.. [INFO] PMD Failure: def.configuration.AppSample:45 Rule:UnusedFormalParameter Priority:3 Avoid unused method parameters such as 'unusedParam'.. [INFO] PMD Failure: def.configuration.AppSample:45 Rule:UnusedFormalParameter Priority:3 Avoid unused method parameters such as 'unusedParam'.. [INFO] PMD Failure: def.configuration.AppSample:45 Rule:UnusedFormalParameter Priority:3 Avoid unused method parameters such as 'unusedParam'.. [INFO] PMD Failure: def.configuration.AppSample:45 Rule:UnusedPrivateMethod Priority:3 Avoid unused private methods such as 'unusedMethod(String)'.. [INFO] PMD Failure: def.configuration.AppSample:45 Rule:UnusedPrivateMethod Priority:3 Avoid unused private methods such as 'unusedMethod(String)'.. [INFO] PMD Failure: def.configuration.AppSample:45 Rule:UnusedPrivateMethod Priority:3 Avoid unused private methods such as 'unusedMethod(String)'.. Caught Expected Message: You have 11 PMD violations and 6 warnings. For more details see:/Users/mifr/workspace/foss/maven-pmd-plugin-3.0/target/test/unit/default-configuration/target/pmd.xml {code} > PMD issues are reported multiple times > -------------------------------------- > > Key: MPMD-163 > URL: https://jira.codehaus.org/browse/MPMD-163 > Project: Maven 2.x PMD Plugin > Issue Type: Bug > Components: PMD > Affects Versions: 3.0 > Environment: Apache Maven 3.0.4 > Sun jdk1.6.0_04 on Debian Lenny > Oracle jdk 1.7.0_13 on Mac OS X (10.8.2) > Reporter: Mirko Friedenhagen > Priority: Blocker > Attachments: my-app.zip > > > After updating maven-pmd-plugin from 2.7.1 to 3.0, in some of our projects > the number of pmd violations exploded. Some are valid (new rules), however I > have a project where the same violation will show up more than 70 times! > See below for an example of this dramatic outcome: > {code} > [mifr@host SomeService]$ grep '^<violation' target/pmd.xml | wc > 3682 44655 1239557 > [mifr@host SomeService]$ grep '^<violation' target/pmd.xml | sort | uniq | wc > 92 1120 30832 > {code} > The number of source files in this project in total is 96, so a wild guess > would be, that the plugin readds already existing violations (the first > (unique) violation occurs once, the second 4 times and so on). I will try t > take a look at the source code or to get a working testcase. -- 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