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 2022/12/03 12:19:42 UTC

[maven-surefire] 01/01: [SUREFIRE-2129] Upgrade Maven Reporting API to 3.1.1/Maven Reporting Impl to 3.2.0

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

michaelo pushed a commit to branch SUREFIRE-2129
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 118d7806f5c1995308163fb45c10584402a2f82f
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat Dec 3 13:18:38 2022 +0100

    [SUREFIRE-2129] Upgrade Maven Reporting API to 3.1.1/Maven Reporting Impl to 3.2.0
    
    This closes #579
---
 maven-surefire-report-plugin/pom.xml               | 23 ++++++++++++++++++++++
 .../surefire/report/SurefireReportGenerator.java   |  3 +--
 pom.xml                                            |  4 ++--
 .../surefire/its/fixture/HelperAssertions.java     |  4 ++--
 4 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/maven-surefire-report-plugin/pom.xml b/maven-surefire-report-plugin/pom.xml
index 5788b1f9c..b5fcd2612 100644
--- a/maven-surefire-report-plugin/pom.xml
+++ b/maven-surefire-report-plugin/pom.xml
@@ -46,6 +46,10 @@
         <maven>${mavenVersion}</maven>
     </prerequisites>
 
+    <properties>
+      <doxiaVersion>1.11.1</doxiaVersion>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.maven.surefire</groupId>
@@ -57,6 +61,11 @@
             <artifactId>maven-core</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-model</artifactId>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>org.apache.maven</groupId>
             <artifactId>maven-plugin-api</artifactId>
@@ -67,6 +76,20 @@
             <artifactId>maven-plugin-annotations</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+          <groupId>org.apache.maven.doxia</groupId>
+          <artifactId>doxia-sink-api</artifactId>
+          <version>${doxiaVersion}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.maven.doxia</groupId>
+          <artifactId>doxia-core</artifactId>
+          <version>${doxiaVersion}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.reporting</groupId>
+            <artifactId>maven-reporting-api</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.maven.reporting</groupId>
             <artifactId>maven-reporting-impl</artifactId>
diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
index b4d9d2436..ee28d0899 100644
--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
+++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
@@ -36,7 +36,6 @@ import static org.apache.maven.doxia.sink.Sink.JUSTIFY_LEFT;
 import static org.apache.maven.doxia.sink.SinkEventAttributes.CLASS;
 import static org.apache.maven.doxia.sink.SinkEventAttributes.HREF;
 import static org.apache.maven.doxia.sink.SinkEventAttributes.ID;
-import static org.apache.maven.doxia.sink.SinkEventAttributes.NAME;
 import static org.apache.maven.doxia.sink.SinkEventAttributes.STYLE;
 import static org.apache.maven.doxia.sink.SinkEventAttributes.TYPE;
 
@@ -725,7 +724,7 @@ public final class SurefireReportGenerator
     {
         // Dollar '$' for nested classes is not valid character in sink.anchor() and therefore it is ignored
         // https://issues.apache.org/jira/browse/SUREFIRE-1443
-        sink.unknown( A.toString(), TAG_TYPE_START, new SinkEventAttributeSet( NAME, anchor ) );
+        sink.unknown( A.toString(), TAG_TYPE_START, new SinkEventAttributeSet( ID, anchor ) );
         sink.unknown( A.toString(), TAG_TYPE_END, null );
     }
 
diff --git a/pom.xml b/pom.xml
index 01c55e157..8608387fc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,7 +127,7 @@
       <dependency>
         <groupId>org.apache.maven.reporting</groupId>
         <artifactId>maven-reporting-api</artifactId>
-        <version>3.1.0</version>
+        <version>3.1.1</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
@@ -170,7 +170,7 @@
       <dependency>
         <groupId>org.apache.maven.reporting</groupId>
         <artifactId>maven-reporting-impl</artifactId>
-        <version>3.1.0</version>
+        <version>3.2.0</version>
         <exclusions>
           <exclusion>
             <groupId>org.apache.maven</groupId>
diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
index 27f671bbe..dbfa5ff84 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
@@ -146,7 +146,7 @@ public final class HelperAssertions
             reportsDirs.add( reportsDir );
         }
         ConsoleLogger logger = new PrintStreamLogger( System.out );
-        SurefireReportParser parser = new SurefireReportParser( reportsDirs, Locale.getDefault(), logger );
+        SurefireReportParser parser = new SurefireReportParser( reportsDirs, Locale.ROOT, logger );
         try
         {
             return parser.parseXMLReportFiles();
@@ -167,7 +167,7 @@ public final class HelperAssertions
             reportsDirs.add( reportsDir );
         }
         ConsoleLogger logger = new PrintStreamLogger( System.out );
-        SurefireReportParser parser = new SurefireReportParser( reportsDirs, Locale.getDefault(), logger );
+        SurefireReportParser parser = new SurefireReportParser( reportsDirs, Locale.ROOT, logger );
         try
         {
             return parser.parseXMLReportFiles();