[ 
https://issues.apache.org/jira/browse/MPMD-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141558#comment-15141558
 ] 

Hudson commented on MPMD-219:
-----------------------------

SUCCESS: Integrated in maven-plugins #5085 (See 
[https://builds.apache.org/job/maven-plugins/5085/])
[MPMD-219] PMD processing errors should fail build (skipPmdError=false)
This commit adds a "PmdCollectingRenderer" and uses it instead of
the report listener, as listeners are unfortunately not informed about
errors.
If the "skipPmdError" property is true (default),
then these processing errors are logged as warnings.
closes apache/maven-plugins#80 (adangel: 
[http://svn.apache.org/viewvc/?view=rev&rev=1729695])
* maven-pmd-plugin/src/it/MPMD-219-pmd-processing-error
* maven-pmd-plugin/src/it/MPMD-219-pmd-processing-error/invoker.properties
* maven-pmd-plugin/src/it/MPMD-219-pmd-processing-error/pom.xml
* maven-pmd-plugin/src/it/MPMD-219-pmd-processing-error/src
* maven-pmd-plugin/src/it/MPMD-219-pmd-processing-error/src/main
* maven-pmd-plugin/src/it/MPMD-219-pmd-processing-error/src/main/java
* 
maven-pmd-plugin/src/it/MPMD-219-pmd-processing-error/src/main/java/BrokenFile.java
* maven-pmd-plugin/src/it/MPMD-219-pmd-processing-error/verify.groovy
* 
maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdCollectingRenderer.java
* maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java
* 
maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReportListener.java
* maven-pmd-plugin/src/test/java/org/apache/maven/plugin/pmd/PmdReportTest.java
* maven-pmd-plugin/src/test/resources/unit/processing-error
* 
maven-pmd-plugin/src/test/resources/unit/processing-error/pmd-processing-error-plugin-config.xml
* maven-pmd-plugin/src/test/resources/unit/processing-error/src
* maven-pmd-plugin/src/test/resources/unit/processing-error/src/BrokenFile.java


> Maven PMD Plugin ignores PMD processing errors
> ----------------------------------------------
>
>                 Key: MPMD-219
>                 URL: https://issues.apache.org/jira/browse/MPMD-219
>             Project: Maven PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 3.0
>            Reporter: Andreas Dangel
>            Assignee: Andreas Dangel
>            Priority: Minor
>             Fix For: 3.7
>
>
> If a source file cannot be parsed by PMD, the error is reported as a 
> "processing error" and continues with the next file.
> However, the maven plugin doesn't use this information. This leads to a 
> situation, where project build is successful despite PMD violations - because 
> PMD skipped files which it can't parse.
> This is not such a big problem if the files are compiled before (e.g. 
> executing PMD in a phase later than compile) - as the compiler plugin would 
> fail the build already.
> But if "pmd:pmd" or "pmd:check" is called directly, maven would not fail the 
> build.
> See also https://sourceforge.net/p/pmd/mailman/message/34715839/
> I'll provide a PR for this bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to