Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUREFIRE-2012] Use maven-shared-utils instead of surefire-shared-utils in Report Parser. Removed commons-lang in Report Plugin. #470

Merged
merged 1 commit into from Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .editorconfig
Expand Up @@ -6,3 +6,10 @@ indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true

[*.{xml,xsd,vm}]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
4 changes: 0 additions & 4 deletions maven-surefire-report-plugin/pom.xml
Expand Up @@ -71,10 +71,6 @@
<groupId>org.apache.maven.reporting</groupId>
<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>
Expand Down
11 changes: 6 additions & 5 deletions surefire-report-parser/pom.xml
Expand Up @@ -18,7 +18,8 @@
~ 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">
<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>
Expand All @@ -39,9 +40,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-shared-utils</artifactId>
<version>${surefire-shared-utils.version}</version>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-utils</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
Expand Down Expand Up @@ -71,7 +71,8 @@
<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 -->
<version>3.0.0-M4
</version> <!-- ${shadedVersion}, but resolved due to https://issues.apache.org/jira/browse/MRELEASE-799 -->
</dependency>
</dependencies>
<configuration>
Expand Down
Expand Up @@ -19,7 +19,7 @@
* under the License.
*/

import static org.apache.maven.surefire.shared.utils.StringUtils.isNotBlank;
import static org.apache.maven.shared.utils.StringUtils.isNotBlank;

/**
*
Expand Down
Expand Up @@ -33,10 +33,10 @@

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;

/**
*
Expand Down
Expand Up @@ -35,14 +35,14 @@
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;
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;

/**
*
Expand Down Expand Up @@ -138,7 +138,7 @@ public void startElement( String uri, String localName, String qName, Attributes

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 );

Expand Down Expand Up @@ -171,7 +171,7 @@ public void startElement( String uri, String localName, String qName, Attributes
}

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() )
Expand Down