How can I make the Maven PMD Plugin print the PMD errors that it finds to the console during a "mvn install"? Right now, the output is going into a pmd error file in the target dir. It looks like old version of the plugin supported the variable "maven.pmd.console", but the new one doesn't seem to.
New PMD plugin: http://maven.apache.org/plugins/maven-pmd-plugin/
Old PMD plugin variables: http://maven.apache.org/maven-1.x/plugins/pmd/properties.html
Just like khmarbaise said, the below configuration worked:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${plugin.maven.pmd.version}</version>
<configuration>
<minimumTokens>100</minimumTokens>
<targetJdk>${jdk.version}</targetJdk>
<printFailingErrors>true</printFailingErrors>
<rulesets>
<ruleset>example_pmd.xml</ruleset>
</rulesets>
</configuration>
<dependencies>
<dependency>
<groupId>com.example</groupId>
<artifactId>example</artifactId>
<version>${example.version}</version>
</dependency>
</dependencies>
</plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With