You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2022/02/14 13:04:04 UTC
[maven-surefire] branch SUREFIRE-2012 created (now 6253914)
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a change to branch SUREFIRE-2012
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git.
at 6253914 [SUREFIRE-2012] Use maven-shared-utils instead of surefire-shared-utils in Report Parser. Removed commons-lang in Report Plugin.
This branch includes the following new commits:
new 6253914 [SUREFIRE-2012] Use maven-shared-utils instead of surefire-shared-utils in Report Parser. Removed commons-lang in Report Plugin.
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.
[maven-surefire] 01/01: [SUREFIRE-2012] Use maven-shared-utils instead of surefire-shared-utils in Report Parser. Removed commons-lang in Report Plugin.
Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch SUREFIRE-2012
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit 6253914cdabef3c2e51802ed073b7c6efbe93e0c
Author: tibor.digana <ti...@apache.org>
AuthorDate: Mon Feb 14 14:03:15 2022 +0100
[SUREFIRE-2012] Use maven-shared-utils instead of surefire-shared-utils in Report Parser. Removed commons-lang in Report Plugin.
---
maven-surefire-report-plugin/pom.xml | 4 -
surefire-report-parser/pom.xml | 121 +++++++++++----------
.../plugins/surefire/report/ReportTestCase.java | 2 +-
.../surefire/report/SurefireReportParser.java | 4 +-
.../surefire/report/TestSuiteXmlParser.java | 6 +-
5 files changed, 67 insertions(+), 70 deletions(-)
diff --git a/maven-surefire-report-plugin/pom.xml b/maven-surefire-report-plugin/pom.xml
index dca647b..67707bc 100644
--- a/maven-surefire-report-plugin/pom.xml
+++ b/maven-surefire-report-plugin/pom.xml
@@ -72,10 +72,6 @@
<artifactId>maven-reporting-impl</artifactId>
</dependency>
<dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<scope>provided</scope>
diff --git a/surefire-report-parser/pom.xml b/surefire-report-parser/pom.xml
index c830429..e26a733 100644
--- a/surefire-report-parser/pom.xml
+++ b/surefire-report-parser/pom.xml
@@ -18,69 +18,70 @@
~ under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.maven.surefire</groupId>
- <artifactId>surefire</artifactId>
- <version>3.0.0-M6-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire</artifactId>
+ <version>3.0.0-M6-SNAPSHOT</version>
+ </parent>
- <artifactId>surefire-report-parser</artifactId>
+ <artifactId>surefire-report-parser</artifactId>
- <name>Surefire Report Parser</name>
- <description>Parses report output files from surefire.</description>
+ <name>Surefire Report Parser</name>
+ <description>Parses report output files from surefire.</description>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.surefire</groupId>
- <artifactId>surefire-logger-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.surefire</groupId>
- <artifactId>surefire-shared-utils</artifactId>
- <version>${surefire-shared-utils.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-api</artifactId>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>jacoco-agent</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <propertyName>jacoco.agent</propertyName>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <dependencies>
- <dependency>
+ <dependencies>
+ <dependency>
<groupId>org.apache.maven.surefire</groupId>
- <artifactId>surefire-shadefire</artifactId>
- <version>3.0.0-M4</version> <!-- ${shadedVersion}, but resolved due to https://issues.apache.org/jira/browse/MRELEASE-799 -->
- </dependency>
- </dependencies>
- <configuration>
- <argLine>${jvm.args.tests} ${jacoco.agent}</argLine>
- <includes>
- <include>**/JUnit4SuiteTest.java</include>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <artifactId>surefire-logger-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-shared-utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.reporting</groupId>
+ <artifactId>maven-reporting-api</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jacoco-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <propertyName>jacoco.agent</propertyName>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-shadefire</artifactId>
+ <version>3.0.0-M4
+ </version> <!-- ${shadedVersion}, but resolved due to https://issues.apache.org/jira/browse/MRELEASE-799 -->
+ </dependency>
+ </dependencies>
+ <configuration>
+ <argLine>${jvm.args.tests} ${jacoco.agent}</argLine>
+ <includes>
+ <include>**/JUnit4SuiteTest.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestCase.java b/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestCase.java
index cea9247..bd1429b 100644
--- a/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestCase.java
+++ b/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestCase.java
@@ -19,7 +19,7 @@ package org.apache.maven.plugins.surefire.report;
* under the License.
*/
-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotBlank;
+import static org.apache.maven.shared.utils.StringUtils.isNotBlank;
/**
*
diff --git a/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java b/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java
index 9e0979f..f6e644f 100644
--- a/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java
+++ b/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java
@@ -33,10 +33,10 @@ import javax.xml.parsers.ParserConfigurationException;
import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.surefire.shared.utils.io.DirectoryScanner;
+import org.apache.maven.shared.utils.io.DirectoryScanner;
import org.xml.sax.SAXException;
-import static org.apache.maven.surefire.shared.utils.StringUtils.split;
+import static org.apache.maven.shared.utils.StringUtils.split;
/**
*
diff --git a/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java b/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java
index d190298..e470af2 100644
--- a/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java
+++ b/surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java
@@ -35,7 +35,6 @@ import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
-import org.apache.maven.surefire.shared.utils.StringUtils;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -43,6 +42,7 @@ import org.xml.sax.helpers.DefaultHandler;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Locale.ENGLISH;
+import static org.apache.maven.shared.utils.StringUtils.isBlank;
/**
*
@@ -138,7 +138,7 @@ public final class TestSuiteXmlParser
final String name = attributes.getValue( "name" );
final String group = attributes.getValue( "group" );
- defaultSuite.setFullClassName( StringUtils.isBlank( group )
+ defaultSuite.setFullClassName( isBlank( group )
? /*name is full class name*/ name
: /*group is package name*/ group + "." + name );
@@ -171,7 +171,7 @@ public final class TestSuiteXmlParser
}
String timeAsString = attributes.getValue( "time" );
- Number time = StringUtils.isBlank( timeAsString ) ? 0 : numberFormat.parse( timeAsString );
+ Number time = isBlank( timeAsString ) ? 0 : numberFormat.parse( timeAsString );
testCase.setFullClassName( currentSuite.getFullClassName() )
.setClassName( currentSuite.getName() )