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

Michael Osipov commented on MPMD-299:
-------------------------------------

Here is the bugfix:
{noformat}
D:\Entwicklung\Projekte\maven-site-plugin [maven-site-plugin-3.x ≡ +0 ~1 -0 !]> 
git diff -w
diff --git 
a/src/main/java/org/apache/maven/plugins/site/render/SiteJarMojo.java 
b/src/main/java/org/apache/maven/plugins/site/render/SiteJarMojo.java
index 26be6d40..8471aed9 100644
--- a/src/main/java/org/apache/maven/plugins/site/render/SiteJarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/site/render/SiteJarMojo.java
@@ -137,10 +137,7 @@ public class SiteJarMojo
             return;
         }

-        if ( !outputDirectory.exists() )
-        {
         super.execute();
-        }

         try
         {
{noformat}

That's a bug in MSITE. What is happening? PMD check runs, creates an empty 
report, implicitly the output directory, site:jar runs, ooops dir is already 
present, don't execute. This makes site:jar broken. site:site does not apply 
such a logic. I need to create an issue with MSITE and fix this for 3.12.1.

> Change of default skipEmptyReport value breaks site:jar
> -------------------------------------------------------
>
>                 Key: MPMD-299
>                 URL: https://issues.apache.org/jira/browse/MPMD-299
>             Project: Maven PMD Plugin
>          Issue Type: Bug
>          Components: CPD, PMD
>    Affects Versions: 3.13.0
>            Reporter: Matt Nelson
>            Priority: Major
>             Fix For: waiting-for-feedback, wontfix-candidate
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Change of default skipEmptyReport value in MPMD-225 causes 
> [site:jar|https://maven.apache.org/plugins/maven-site-plugin/jar-mojo.html] 
> to be empty.
> Had to revert to the value to get site jars working again.
> {code:xml}
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-pmd-plugin</artifactId>
>     <version>3.13.0</version>
>     <configuration>
>         <skipEmptyReport>true</skipEmptyReport>
>     </configuration>
> </plugin>
> {code}
> Working on getting a repro case against 
> https://github.com/apache/maven-pmd-plugin



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to