You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ad...@apache.org on 2020/01/16 10:12:44 UTC
[maven-pmd-plugin] 01/01: [MPMD-225] - Create report even if no
warnings have been found by default
This is an automated email from the ASF dual-hosted git repository.
adangel pushed a commit to branch MPMD-225
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git
commit f064e3fb083ae55aa42617e9a7a27841cc8a0bcd
Author: Andreas Dangel <ad...@apache.org>
AuthorDate: Thu Jan 16 10:25:10 2020 +0100
[MPMD-225] - Create report even if no warnings have been found by default
---
src/it/mpmd-168-empty-report/pom.xml | 3 ++-
src/it/mpmd-168/pom.xml | 3 ++-
src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java | 6 ++++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/it/mpmd-168-empty-report/pom.xml b/src/it/mpmd-168-empty-report/pom.xml
index 91f5419..1d0f038 100644
--- a/src/it/mpmd-168-empty-report/pom.xml
+++ b/src/it/mpmd-168-empty-report/pom.xml
@@ -54,6 +54,7 @@ under the License.
<sourceEncoding>UTF-8</sourceEncoding>
<failOnViolation>false</failOnViolation> <!-- force execution of both goals, will be checked with verify-script -->
<skipPmdError>false</skipPmdError>
+<!-- <skipEmptyReport>false</skipEmptyReport> skipEmptyReport is false by default since 3.13.0 -->
</configuration>
</plugin>
</plugins>
@@ -66,7 +67,7 @@ under the License.
<artifactId>maven-pmd-plugin</artifactId>
<version>@project.version@</version>
<configuration>
- <skipEmptyReport>false</skipEmptyReport>
+<!-- <skipEmptyReport>false</skipEmptyReport> skipEmptyReport is false by default since 3.13.0 -->
<skipPmdError>false</skipPmdError>
</configuration>
</plugin>
diff --git a/src/it/mpmd-168/pom.xml b/src/it/mpmd-168/pom.xml
index 5d452fe..7573801 100644
--- a/src/it/mpmd-168/pom.xml
+++ b/src/it/mpmd-168/pom.xml
@@ -54,6 +54,7 @@ under the License.
<sourceEncoding>UTF-8</sourceEncoding>
<failOnViolation>false</failOnViolation> <!-- force execution of both goals, will be checked with verify-script -->
<skipPmdError>false</skipPmdError>
+ <skipEmptyReport>true</skipEmptyReport>
</configuration>
</plugin>
</plugins>
@@ -67,7 +68,7 @@ under the License.
<version>@project.version@</version>
<configuration>
<skipPmdError>false</skipPmdError>
-<!-- <skipEmptyReport>true</skipEmptyReport> it's by default true -->
+ <skipEmptyReport>true</skipEmptyReport>
</configuration>
</plugin>
<plugin>
diff --git a/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java b/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java
index 4cadbcd..9462ed8 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java
@@ -202,11 +202,13 @@ public abstract class AbstractPmdReport
/**
* Skip the PMD/CPD report generation if there are no violations or duplications found. Defaults to
- * <code>true</code>.
+ * <code>false</code>.
+ *
+ * <p>Note: the default value was changed from <code>true</code> to <code>false</code> with version 3.13.0.
*
* @since 3.1
*/
- @Parameter( defaultValue = "true" )
+ @Parameter( defaultValue = "false" )
protected boolean skipEmptyReport;
/**