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

slachiewicz pushed a commit to branch MCHECKSTYLE-393v2
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git

commit 0a65a6ae8f41d2443815e72f2f49149ebaaa09ff
Author: User <User@host.docker.internal>
AuthorDate: Mon Apr 5 14:54:59 2021 +0200

    [MCHECKSTYLE-393] update doxia to 1.9.2
    
    Closes #46
---
 pom.xml                                            | 48 ++++++++--------------
 src/it/checkstyle-goal/verify.groovy               |  2 +-
 .../checkstyle/CheckstyleReportGenerator.java      |  2 +-
 .../plugins/checkstyle/CheckstyleReportTest.java   | 13 +++---
 4 files changed, 28 insertions(+), 37 deletions(-)

diff --git a/pom.xml b/pom.xml
index 90dc78d..6786c0d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,9 +65,9 @@ under the License.
   <properties>
     <!-- Because Checkstyle 7+ requires Java 8 -->
     <javaVersion>8</javaVersion>
-    <mavenVersion>3.0</mavenVersion>
+    <mavenVersion>3.1.1</mavenVersion>
     <checkstyleVersion>8.41.1</checkstyleVersion>
-    <doxiaVersion>1.4</doxiaVersion>
+    <doxiaVersion>1.9.2</doxiaVersion>
     <sitePluginVersion>3.9.1</sitePluginVersion>
     <surefire.version>2.22.2</surefire.version>
     
<project.build.outputTimestamp>2021-01-23T22:30:12Z</project.build.outputTimestamp>
@@ -116,51 +116,39 @@ under the License.
     <!-- shared -->
     <dependency>
       <groupId>org.apache.maven.reporting</groupId>
-      <artifactId>maven-reporting-api</artifactId>
-      <version>3.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.reporting</groupId>
       <artifactId>maven-reporting-impl</artifactId>
-      <version>2.3</version>
+      <version>3.0.0</version>
       <exclusions>
-        <exclusion>
-          <groupId>org.apache.maven</groupId>
-          <artifactId>maven-project</artifactId>
+       <exclusion>
+          <groupId>org.apache.maven.doxia</groupId>
+          <artifactId>*</artifactId>
         </exclusion>
       </exclusions>
     </dependency>
 
-    <!-- doxia -->
+    <!-- shared to help doxia work with the old version of maven -->
     <dependency>
-      <groupId>org.apache.maven.doxia</groupId>
-      <artifactId>doxia-sink-api</artifactId>
-      <version>${doxiaVersion}</version>
+      <groupId>org.eclipse.sisu</groupId>
+      <artifactId>org.eclipse.sisu.plexus</artifactId>
+      <version>0.1.1</version>
     </dependency>
     <dependency>
-      <groupId>org.apache.maven.doxia</groupId>
-      <artifactId>doxia-decoration-model</artifactId>
-      <version>${doxiaVersion}</version>
+      <groupId>org.sonatype.sisu</groupId>
+      <artifactId>sisu-guice</artifactId>
+      <version>3.2.5</version>
+      <classifier>no_aop</classifier>
     </dependency>
+
+    <!-- doxia -->
     <dependency>
       <groupId>org.apache.maven.doxia</groupId>
       <artifactId>doxia-site-renderer</artifactId>
       <version>${doxiaVersion}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.codehaus.plexus</groupId>
-          <artifactId>plexus-component-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.codehaus.plexus</groupId>
-          <artifactId>plexus-container-default</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.doxia</groupId>
       <artifactId>doxia-integration-tools</artifactId>
-      <version>1.6</version>
+      <version>${doxiaVersion}</version>
     </dependency>
 
     <!-- plexus -->
@@ -227,7 +215,7 @@ under the License.
     <dependency>
       <groupId>org.apache.maven.plugin-testing</groupId>
       <artifactId>maven-plugin-testing-harness</artifactId>
-      <version>2.1</version>
+      <version>3.1.0</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/src/it/checkstyle-goal/verify.groovy 
b/src/it/checkstyle-goal/verify.groovy
index 38d7683..c560d47 100644
--- a/src/it/checkstyle-goal/verify.groovy
+++ b/src/it/checkstyle-goal/verify.groovy
@@ -37,6 +37,6 @@ assert item != null
 assert item.title.text().startsWith('File: 1,')
 
 def html = new File( basedir, 'target/site/checkstyle.html' ).text;
-assert html.contains( '<meta http-equiv="Content-Type" content="text/html; 
charset=UTF-8" />' );
+assert html.contains( '<meta charset="UTF-8" />' );
 
 return true;
\ No newline at end of file
diff --git 
a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java
 
b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java
index 4f97b48..a05abf1 100644
--- 
a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java
+++ 
b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java
@@ -27,8 +27,8 @@ import java.util.List;
 import java.util.ResourceBundle;
 
 import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.SinkEventAttributeSet;
 import org.apache.maven.doxia.sink.SinkEventAttributes;
+import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
 import org.apache.maven.doxia.tools.SiteTool;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.plugin.logging.SystemStreamLog;
diff --git 
a/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java 
b/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java
index 956375f..81ec866 100644
--- 
a/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java
+++ 
b/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java
@@ -215,7 +215,7 @@ public class CheckstyleReportTest
         String htmlString = FileUtils.fileRead( outputHtml );
 
         boolean searchHeaderFound =
-            ( htmlString.indexOf( "<h2>" + bundle.getString( 
"report.checkstyle.rules" ) ) > 0 );
+            htmlString.contains( getHtmlHeader( bundle.getString( 
"report.checkstyle.rules" ) ) );
         Boolean rules = (Boolean) getVariableValueFromObject( mojo, 
"enableRulesSummary" );
         if (rules)
         {
@@ -226,8 +226,7 @@ public class CheckstyleReportTest
             assertFalse( "Test for Rules Summary", searchHeaderFound );
         }
 
-        searchHeaderFound =
-            ( htmlString.indexOf( "<h2>" + bundle.getString( 
"report.checkstyle.summary" )  ) > 0 );
+        searchHeaderFound = htmlString.contains( getHtmlHeader( 
bundle.getString( "report.checkstyle.summary" ) ) );
         Boolean severity = (Boolean) getVariableValueFromObject( mojo, 
"enableSeveritySummary" );
         if (severity)
         {
@@ -238,8 +237,7 @@ public class CheckstyleReportTest
             assertFalse( "Test for Severity Summary", searchHeaderFound );
         }
 
-        searchHeaderFound =
-            ( htmlString.indexOf( "<h2>" + bundle.getString( 
"report.checkstyle.files" ) ) > 0 );
+        searchHeaderFound = htmlString.contains( getHtmlHeader( 
bundle.getString( "report.checkstyle.files" ) ) );
         Boolean files = (Boolean) getVariableValueFromObject( mojo, 
"enableFilesSummary" );
         if (files)
         {
@@ -253,6 +251,11 @@ public class CheckstyleReportTest
         return outputHtml;
     }
 
+    private static String getHtmlHeader( String s )
+    {
+        return ">" + s + "</h2>";
+    }
+
     /**
      * Renderer the sink from the report mojo.
      *

Reply via email to