You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2023/01/06 21:46:12 UTC

[maven-pmd-plugin] branch doxia-2.0.0 updated (6f2844c -> cb36e85)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch doxia-2.0.0
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git


 discard 6f2844c  Prepare for Doxia 2.0.0
     add b65c7a6  [MPMD-360] - Upgrade to PMD 6.53.0 (#109)
     new cb36e85  Prepare for Doxia 2.0.0

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (6f2844c)
            \
             N -- N -- N   refs/heads/doxia-2.0.0 (cb36e85)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                               | 2 +-
 src/site/apt/examples/upgrading-PMD-at-runtime.apt.vm | 2 +-
 src/site/markdown/releasenotes.md                     | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)


[maven-pmd-plugin] 01/01: Prepare for Doxia 2.0.0

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch doxia-2.0.0
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git

commit cb36e85b1e5fb743b7e2d1c2c6008776b29138f1
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat Dec 3 00:05:15 2022 +0100

    Prepare for Doxia 2.0.0
---
 pom.xml                                            | 50 ++++++----------------
 .../maven/plugins/pmd/CpdReportGenerator.java      |  2 +
 .../maven/plugins/pmd/PmdReportGenerator.java      |  6 +++
 .../apache/maven/plugins/pmd/CpdReportTest.java    |  2 -
 .../apache/maven/plugins/pmd/PmdReportTest.java    |  8 ++--
 5 files changed, 23 insertions(+), 45 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3ba228a..8f20556 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@ under the License.
   </parent>
 
   <artifactId>maven-pmd-plugin</artifactId>
-  <version>3.20.0-SNAPSHOT</version>
+  <version>4.0.0-SNAPSHOT</version>
   <packaging>maven-plugin</packaging>
 
   <name>Apache Maven PMD Plugin</name>
@@ -86,15 +86,14 @@ under the License.
 
   <properties>
     <mavenVersion>3.2.5</mavenVersion>
-    <doxiaVersion>1.11.1</doxiaVersion>
-    <doxiaSitetoolsVersion>1.11.1</doxiaSitetoolsVersion>
+    <doxiaVersion>2.0.0-M4</doxiaVersion>
     <javaVersion>8</javaVersion><!-- Because PMD 6.35.0+ requires Java 8 -->
     <pmdVersion>6.53.0</pmdVersion>
     <slf4jVersion>1.7.36</slf4jVersion>
     <aetherVersion>1.0.0.v20140518</aetherVersion>
-    <sitePluginVersion>3.12.1</sitePluginVersion>
-    <projectInfoReportsPluginVersion>3.4.1</projectInfoReportsPluginVersion>
-    <jxrPluginVersion>3.3.0</jxrPluginVersion>
+    <sitePluginVersion>4.0.0-M4</sitePluginVersion>
+    <projectInfoReportsPluginVersion>4.0.0-SNAPSHOT</projectInfoReportsPluginVersion>
+    <jxrPluginVersion>4.0.0-SNAPSHOT</jxrPluginVersion>
     <project.build.outputTimestamp>2022-09-01T09:45:10Z</project.build.outputTimestamp>
   </properties>
 
@@ -118,6 +117,12 @@ under the License.
       <version>${mavenVersion}</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-compat</artifactId>
+      <version>${mavenVersion}</version>
+      <scope>provided</scope>
+    </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
@@ -191,43 +196,12 @@ under the License.
       <artifactId>doxia-sink-api</artifactId>
       <version>${doxiaVersion}</version>
     </dependency>
-    <dependency>
-      <groupId>org.apache.maven.doxia</groupId>
-      <artifactId>doxia-decoration-model</artifactId>
-      <version>${doxiaSitetoolsVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.doxia</groupId>
-      <artifactId>doxia-site-renderer</artifactId>
-      <version>${doxiaSitetoolsVersion}</version>
-      <!--
-        Note: doxia-site-renderer needs to be defined AFTER pmd:
-        doxia-site-renderer requires transitively dom4j 1.1 which provides a very old version of jaxen (same jar).
-        PMD requires a newer version of jaxen, which is not compatible.
-      -->
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.httpcomponents</groupId>
-          <artifactId>httpclient</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
 
     <!-- shared -->
-    <dependency>
-      <groupId>org.apache.maven.reporting</groupId>
-      <artifactId>maven-reporting-api</artifactId>
-      <version>3.1.1</version>
-    </dependency>
     <dependency>
       <groupId>org.apache.maven.reporting</groupId>
       <artifactId>maven-reporting-impl</artifactId>
-      <version>3.2.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.shared</groupId>
-      <artifactId>maven-shared-utils</artifactId>
-      <version>3.3.4</version>
+      <version>4.0.0-M3</version>
     </dependency>
 
     <!-- plexus -->
diff --git a/src/main/java/org/apache/maven/plugins/pmd/CpdReportGenerator.java b/src/main/java/org/apache/maven/plugins/pmd/CpdReportGenerator.java
index 34a0702..1823055 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/CpdReportGenerator.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/CpdReportGenerator.java
@@ -165,6 +165,7 @@ public class CpdReportGenerator
             String code = duplication.getCodefragment();
 
             sink.table();
+            sink.tableRows( null, false );
             sink.tableRow();
             sink.tableHeaderCell();
             sink.text( bundle.getString( "report.cpd.column.file" ) );
@@ -201,6 +202,7 @@ public class CpdReportGenerator
             sink.verbatim_();
             sink.rawText( "</td>" );
             sink.tableRow_();
+            sink.tableRows_();
             sink.table_();
         }
 
diff --git a/src/main/java/org/apache/maven/plugins/pmd/PmdReportGenerator.java b/src/main/java/org/apache/maven/plugins/pmd/PmdReportGenerator.java
index e266cb5..623b7c9 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/PmdReportGenerator.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/PmdReportGenerator.java
@@ -166,6 +166,7 @@ public class PmdReportGenerator
         sink.sectionTitle_( level );
 
         sink.table();
+        sink.tableRows( null, false );
         sink.tableRow();
         sink.tableHeaderCell();
         sink.text( bundle.getString( "report.pmd.column.rule" ) );
@@ -187,6 +188,7 @@ public class PmdReportGenerator
 
     private void endFileSection( int level )
     {
+        sink.tableRows_();
         sink.table_();
         sink.section_( level );
     }
@@ -406,6 +408,7 @@ public class PmdReportGenerator
         } );
 
         sink.table();
+        sink.tableRows( null, false );
         sink.tableRow();
         sink.tableHeaderCell();
         sink.text( bundle.getString( "report.pmd.suppressedViolations.column.filename" ) );
@@ -448,6 +451,7 @@ public class PmdReportGenerator
             sink.tableRow_();
         }
 
+        sink.tableRows_();
         sink.table_();
         sink.section1_();
     }
@@ -471,6 +475,7 @@ public class PmdReportGenerator
         sink.sectionTitle1_();
 
         sink.table();
+        sink.tableRows( null, false );
         sink.tableRow();
         sink.tableHeaderCell();
         sink.text( bundle.getString( "report.pmd.processingErrors.column.filename" ) );
@@ -485,6 +490,7 @@ public class PmdReportGenerator
             processSingleProcessingError( error );
         }
 
+        sink.tableRows_();
         sink.table_();
 
         sink.section1_();
diff --git a/src/test/java/org/apache/maven/plugins/pmd/CpdReportTest.java b/src/test/java/org/apache/maven/plugins/pmd/CpdReportTest.java
index efb3d58..1ba8e7c 100644
--- a/src/test/java/org/apache/maven/plugins/pmd/CpdReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/pmd/CpdReportTest.java
@@ -23,7 +23,6 @@ import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
-import java.util.Locale;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -47,7 +46,6 @@ public class CpdReportTest
         throws Exception
     {
         super.setUp();
-        Locale.setDefault( Locale.ENGLISH );
         FileUtils.deleteDirectory( new File( getBasedir(), "target/test/unit" ) );
     }
 
diff --git a/src/test/java/org/apache/maven/plugins/pmd/PmdReportTest.java b/src/test/java/org/apache/maven/plugins/pmd/PmdReportTest.java
index d53ba48..e94b930 100644
--- a/src/test/java/org/apache/maven/plugins/pmd/PmdReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/pmd/PmdReportTest.java
@@ -26,7 +26,6 @@ import java.io.IOException;
 import java.net.ServerSocket;
 import java.net.URL;
 import java.nio.charset.StandardCharsets;
-import java.util.Locale;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -55,7 +54,6 @@ public class PmdReportTest
         throws Exception
     {
         super.setUp();
-        Locale.setDefault( Locale.ENGLISH );
         FileUtils.deleteDirectory( new File( getBasedir(), "target/test/unit" ) );
     }
 
@@ -93,9 +91,9 @@ public class PmdReportTest
         assertTrue( str.contains( "pmd_rules_java_bestpractices.html#unusedprivatefield\">UnusedPrivateField</a>" ) );
 
         // there should be the section Violations By Priority
-        assertTrue( str.contains( "Violations By Priority</h2>" ) );
-        assertTrue( str.contains( "Priority 3</h3>" ) );
-        assertTrue( str.contains( "Priority 4</h3>" ) );
+        assertTrue( str.contains( "Violations By Priority</h1>" ) );
+        assertTrue( str.contains( "Priority 3</h2>" ) );
+        assertTrue( str.contains( "Priority 4</h2>" ) );
         // the file App.java is mentioned 3 times: in prio 3, in prio 4 and in the files section
         assertEquals( 3, StringUtils.countMatches( str, "def/configuration/App.java" ) );