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/06/06 20:43:04 UTC
[maven-surefire] 01/02: Prepare for Doxia 2.0.0
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-surefire.git
commit b254ac576fe8898bb836ce68256b54e6aa6743e1
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun May 7 01:34:04 2023 +0200
Prepare for Doxia 2.0.0
---
maven-failsafe-plugin/pom.xml | 2 +-
maven-surefire-common/pom.xml | 2 +-
maven-surefire-plugin/pom.xml | 2 +-
maven-surefire-report-plugin/pom.xml | 6 +-
.../report/AbstractSurefireReportMojo.java | 10 +-
.../surefire/report/SurefireReportRenderer.java | 58 +++-------
.../plugins/surefire/report/JUnit4SuiteTest.java | 2 +-
.../plugins/surefire/report/Surefire597Test.java | 20 ++--
...ReportMojoTest.java => SurefireReportTest.java} | 126 ++++++++++++---------
...nProjectStub2.java => AnchorTestCasesStub.java} | 17 +--
...RepMavenProjectStub2.java => EnclosedStub.java} | 17 +--
...tStub2.java => EnclosedTrimStackTraceStub.java} | 17 +--
...venProjectStub2.java => LinkXrefFalseStub.java} | 17 +--
...MavenProjectStub2.java => NestedClassStub.java} | 17 +--
...ub2.java => NestedClassTrimStackTraceStub.java} | 17 +--
...pMavenProjectStub2.java => ReportTestStub.java} | 17 +--
...venProjectStub2.java => ReportingNullStub.java} | 8 +-
...MavenProjectStub2.java => SingleErrorStub.java} | 17 +--
...avenProjectStub2.java => SuccessFalseStub.java} | 17 +--
...avenProjectStub2.java => Surefire1183Stub.java} | 17 +--
...ub.java => SurefireReportMavenProjectStub.java} | 28 ++++-
.../plugin-config.xml | 3 +-
.../plugin-config.xml | 3 +-
.../plugin-config.xml | 3 +-
.../plugin-config.xml | 3 +-
.../basic-surefire-report-test/plugin-config.xml | 3 +-
.../resources/unit/surefire-1183/plugin-config.xml | 3 +-
.../plugin-config.xml | 3 +-
.../surefire-report-enclosed/plugin-config.xml | 3 +-
.../plugin-config.xml | 3 +-
.../surefire-report-nestedClass/plugin-config.xml | 3 +-
.../surefire-report-single-error/plugin-config.xml | 3 +-
pom.xml | 24 +---
surefire-api/pom.xml | 2 +-
surefire-booter/pom.xml | 2 +-
surefire-extensions-api/pom.xml | 2 +-
surefire-extensions-spi/pom.xml | 2 +-
surefire-grouper/pom.xml | 2 +-
surefire-its/pom.xml | 2 +-
.../surefire-260-testWithIdenticalNames/pom.xml | 4 +-
surefire-logger-api/pom.xml | 2 +-
surefire-providers/common-java5/pom.xml | 2 +-
surefire-providers/common-junit3/pom.xml | 2 +-
surefire-providers/common-junit4/pom.xml | 2 +-
surefire-providers/common-junit48/pom.xml | 2 +-
surefire-providers/pom.xml | 2 +-
surefire-providers/surefire-junit-platform/pom.xml | 2 +-
surefire-providers/surefire-junit3/pom.xml | 2 +-
surefire-providers/surefire-junit4/pom.xml | 2 +-
surefire-providers/surefire-junit47/pom.xml | 2 +-
surefire-providers/surefire-testng-utils/pom.xml | 2 +-
surefire-providers/surefire-testng/pom.xml | 2 +-
surefire-report-parser/pom.xml | 2 +-
surefire-shadefire/pom.xml | 2 +-
surefire-shared-utils/pom.xml | 2 +-
55 files changed, 202 insertions(+), 335 deletions(-)
diff --git a/maven-failsafe-plugin/pom.xml b/maven-failsafe-plugin/pom.xml
index 7b3d54288..78fca61e4 100644
--- a/maven-failsafe-plugin/pom.xml
+++ b/maven-failsafe-plugin/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/maven-surefire-common/pom.xml b/maven-surefire-common/pom.xml
index 5604a4d4c..6f32ec897 100644
--- a/maven-surefire-common/pom.xml
+++ b/maven-surefire-common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>maven-surefire-common</artifactId>
diff --git a/maven-surefire-plugin/pom.xml b/maven-surefire-plugin/pom.xml
index 232bab44f..24dbc7714 100644
--- a/maven-surefire-plugin/pom.xml
+++ b/maven-surefire-plugin/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/maven-surefire-report-plugin/pom.xml b/maven-surefire-report-plugin/pom.xml
index 70f7d9a11..69e70a79d 100644
--- a/maven-surefire-report-plugin/pom.xml
+++ b/maven-surefire-report-plugin/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
@@ -46,7 +46,7 @@
</prerequisites>
<properties>
- <doxiaVersion>1.11.1</doxiaVersion>
+ <doxiaVersion>2.0.0-M6</doxiaVersion>
<aetherVersion>1.0.0.v20140518</aetherVersion>
</properties>
@@ -89,10 +89,12 @@
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-api</artifactId>
+ <version>4.0.0-M6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
+ <version>4.0.0-M8</version>
</dependency>
<dependency>
<groupId>org.fusesource.jansi</groupId>
diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java
index 3ec4928f9..d827363cc 100644
--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java
+++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java
@@ -77,12 +77,6 @@ public abstract class AbstractSurefireReportMojo extends AbstractMavenReport {
@Parameter
private File reportsDirectory;
- /**
- * The projects in the reactor for aggregation report.
- */
- @Parameter(defaultValue = "${reactorProjects}", readonly = true)
- private List<MavenProject> reactorProjects;
-
/**
* Location of the Xrefs to link.
*/
@@ -345,6 +339,10 @@ public abstract class AbstractSurefireReportMojo extends AbstractMavenReport {
return project;
}
+ protected List<MavenProject> getReactorProjects() {
+ return reactorProjects;
+ }
+
// TODO Review, especially Locale.getDefault()
private static class CustomI18N implements I18N {
private final MavenProject project;
diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportRenderer.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportRenderer.java
index 75ca805e2..8442d28cb 100644
--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportRenderer.java
+++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportRenderer.java
@@ -112,11 +112,7 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
public void renderBody() {
javaScript(javascriptToggleDisplayCode());
- sink.section1();
- sink.sectionTitle1();
- sink.text(getTitle());
- sink.sectionTitle1_();
- sink.section1_();
+ startSection(getTitle());
renderSectionSummary();
@@ -125,16 +121,14 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
renderSectionTestCases();
renderSectionFailureDetails();
+
+ endSection();
}
private void renderSectionSummary() {
Map<String, Object> summary = parser.getSummary(testSuites);
- sink.section1();
- sinkAnchor("Summary");
- sink.sectionTitle1();
- sink.text(getI18nString("surefire", "label.summary"));
- sink.sectionTitle1_();
+ startSection(getI18nString("surefire", "label.summary"), "Summary");
constructHotLinks();
@@ -168,7 +162,7 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
sink.lineBreak();
- sink.section1_();
+ endSection();
}
private void renderSectionPackages() {
@@ -177,11 +171,7 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
return;
}
- sink.section1();
- sinkAnchor("Package_List");
- sink.sectionTitle1();
- sink.text(getI18nString("surefire", "label.packagelist"));
- sink.sectionTitle1_();
+ startSection(getI18nString("surefire", "label.packagelist"), "Package_List");
constructHotLinks();
@@ -227,11 +217,7 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
List<ReportTestSuite> testSuiteList = entry.getValue();
- sink.section2();
- sinkAnchor(packageName);
- sink.sectionTitle2();
- sink.text(packageName);
- sink.sectionTitle2_();
+ startSection(packageName);
boolean showTable = false;
@@ -266,12 +252,12 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
endTable();
}
- sink.section2_();
+ endSection();
}
sink.lineBreak();
- sink.section1_();
+ endSection();
}
private void renderSectionTestSuite(ReportTestSuite suite) {
@@ -320,11 +306,7 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
return;
}
- sink.section1();
- sinkAnchor("Test_Cases");
- sink.sectionTitle1();
- sink.text(getI18nString("surefire", "label.testcases"));
- sink.sectionTitle1_();
+ startSection(getI18nString("surefire", "label.testcases"), "Test_Cases");
constructHotLinks();
@@ -332,11 +314,7 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
List<ReportTestCase> testCases = suite.getTestCases();
if (!testCases.isEmpty()) {
- sink.section2();
- sinkAnchor(suite.getPackageName() + '.' + suite.getName());
- sink.sectionTitle2();
- sink.text(suite.getName());
- sink.sectionTitle2_();
+ startSection(suite.getName(), suite.getPackageName() + '.' + suite.getName());
boolean showTable = false;
@@ -360,13 +338,13 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
endTable();
}
- sink.section2_();
+ endSection();
}
}
sink.lineBreak();
- sink.section1_();
+ endSection();
}
private void constructTestCaseSection(ReportTestCase testCase) {
@@ -456,7 +434,7 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
}
private String toHtmlId(String id) {
- return DoxiaUtils.isValidId(id) ? id : DoxiaUtils.encodeId(id, true);
+ return DoxiaUtils.isValidId(id) ? id : DoxiaUtils.encodeId(id);
}
private void renderSectionFailureDetails() {
@@ -465,11 +443,7 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
return;
}
- sink.section1();
- sinkAnchor("Failure_Details");
- sink.sectionTitle1();
- sink.text(getI18nString("surefire", "label.failuredetails"));
- sink.sectionTitle1_();
+ startSection(getI18nString("surefire", "label.failuredetails"), "Failure_Details");
constructHotLinks();
@@ -536,7 +510,7 @@ public class SurefireReportRenderer extends AbstractMavenReportRenderer {
sink.lineBreak();
- sink.section1_();
+ endSection();
}
private void constructHotLinks() {
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/JUnit4SuiteTest.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/JUnit4SuiteTest.java
index 74df21fec..fc1eaefd3 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/JUnit4SuiteTest.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/JUnit4SuiteTest.java
@@ -34,7 +34,7 @@ public class JUnit4SuiteTest extends TestCase {
TestSuite suite = new TestSuite();
suite.addTest(new JUnit4TestAdapter(Surefire597Test.class));
suite.addTest(new JUnit4TestAdapter(SurefireSchemaValidationTest.class));
- suite.addTestSuite(SurefireReportMojoTest.class);
+ suite.addTestSuite(SurefireReportTest.class);
return suite;
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/Surefire597Test.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/Surefire597Test.java
index 598c91678..7be7c0a50 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/Surefire597Test.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/Surefire597Test.java
@@ -53,7 +53,7 @@ public class Surefire597Test extends TestCase {
String xml = writer.toString();
assertThat(
xml,
- containsString(toSystemNewLine("<table border=\"0\" class=\"bodyTable\">\n"
+ containsString(toSystemNewLine("<table class=\"bodyTable\">\n"
+ "<tr class=\"a\">\n"
+ "<th>Tests</th>\n"
+ "<th>Errors</th>\n"
@@ -62,7 +62,7 @@ public class Surefire597Test extends TestCase {
+ "<th>Success Rate</th>\n"
+ "<th>Time</th></tr>\n"
+ "<tr class=\"b\">\n"
- + "<td align=\"left\">1</td>\n"
+ + "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
+ "<td>0</td>\n"
@@ -72,7 +72,7 @@ public class Surefire597Test extends TestCase {
+ "</table>")));
assertThat(
xml,
- containsString(toSystemNewLine("<table border=\"0\" class=\"bodyTable\">\n"
+ containsString(toSystemNewLine("<table class=\"bodyTable\">\n"
+ "<tr class=\"a\">\n"
+ "<th>Package</th>\n"
+ "<th>Tests</th>\n"
@@ -82,7 +82,7 @@ public class Surefire597Test extends TestCase {
+ "<th>Success Rate</th>\n"
+ "<th>Time</th></tr>\n"
+ "<tr class=\"b\">\n"
- + "<td align=\"left\"><a href=\"#surefire\">surefire</a></td>\n"
+ + "<td><a href=\"#surefire\">surefire</a></td>\n"
+ "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
@@ -91,7 +91,7 @@ public class Surefire597Test extends TestCase {
+ "<td>0 s</td></tr></table>")));
assertThat(
xml,
- containsString(toSystemNewLine("<table border=\"0\" class=\"bodyTable\">\n"
+ containsString(toSystemNewLine("<table class=\"bodyTable\">\n"
+ "<tr class=\"a\">\n"
+ "<th>-</th>\n"
+ "<th>Class</th>\n"
@@ -102,7 +102,7 @@ public class Surefire597Test extends TestCase {
+ "<th>Success Rate</th>\n"
+ "<th>Time</th></tr>\n"
+ "<tr class=\"b\">\n"
- + "<td align=\"left\"><a href=\"#surefire.MyTest\"><img src=\"images/icon_error_sml.gif\" alt=\"\" /></a></td>\n"
+ + "<td><a href=\"#surefire.MyTest\"><img src=\"images/icon_error_sml.gif\" /></a></td>\n"
+ "<td><a href=\"#surefire.MyTest\">MyTest</a></td>\n"
+ "<td>1</td>\n"
+ "<td>1</td>\n"
@@ -112,15 +112,15 @@ public class Surefire597Test extends TestCase {
+ "<td>0 s</td></tr></table>")));
assertThat(
xml,
- containsString(toSystemNewLine("<table border=\"0\" class=\"bodyTable\">\n"
+ containsString(toSystemNewLine("<table class=\"bodyTable\">\n"
+ "<tr class=\"a\">\n"
- + "<td align=\"left\"><img src=\"images/icon_error_sml.gif\" alt=\"\" /></td>\n"
+ + "<td><img src=\"images/icon_error_sml.gif\" /></td>\n"
+ "<td><a id=\"surefire.MyTest.test\"></a>test</td></tr>\n"
+ "<tr class=\"b\">\n"
- + "<td align=\"left\">-</td>\n"
+ + "<td>-</td>\n"
+ "<td>java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: msg</td></tr>\n"
+ "<tr class=\"a\">\n"
- + "<td align=\"left\">-</td>\n"
+ + "<td>-</td>\n"
+ "<td>\n"
+ "<div id=\"test-error\">surefire.MyTest:13</div></td></tr></table>")));
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportTest.java
similarity index 89%
rename from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
rename to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportTest.java
index 8dab21e86..b930b734d 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportTest.java
@@ -19,16 +19,19 @@
package org.apache.maven.plugins.surefire.report;
import java.io.File;
-import java.io.UnsupportedEncodingException;
-import java.net.URL;
-import java.net.URLDecoder;
-import java.util.Locale;
+import java.util.Collections;
+import java.util.List;
+import org.apache.maven.model.Plugin;
import org.apache.maven.plugin.LegacySupport;
+import org.apache.maven.plugin.MojoExecution;
+import org.apache.maven.plugin.descriptor.MojoDescriptor;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.apache.maven.plugin.testing.ArtifactStubFactory;
import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
import org.apache.maven.plugins.surefire.report.stubs.DependencyArtifactStubFactory;
+import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.utils.io.FileUtils;
import org.eclipse.aether.DefaultRepositorySystemSession;
import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
@@ -42,31 +45,23 @@ import static org.hamcrest.MatcherAssert.assertThat;
* @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
*/
@SuppressWarnings("checkstyle:linelength")
-public class SurefireReportMojoTest extends AbstractMojoTestCase {
+public class SurefireReportTest extends AbstractMojoTestCase {
private ArtifactStubFactory artifactStubFactory;
- // Can be removed with Doxia 2.0.0
- private Locale origLocale;
-
@Override
protected void setUp() throws Exception {
super.setUp();
artifactStubFactory = new DependencyArtifactStubFactory(getTestFile("target"), true, false);
artifactStubFactory.getWorkingDir().mkdirs();
-
- origLocale = Locale.getDefault();
- Locale.setDefault(Locale.ROOT);
}
- @Override
- protected void tearDown() throws Exception {
- Locale.setDefault(origLocale);
- super.tearDown();
+ protected File getPluginXmlFile(String projectDirName) {
+ return new File(getBasedir(), "src/test/resources/unit/" + projectDirName + "/plugin-config.xml");
}
protected SurefireReportMojo createReportMojo(File pluginXmlFile) throws Exception {
SurefireReportMojo mojo = (SurefireReportMojo) lookupMojo("report", pluginXmlFile);
- assertNotNull("Mojo found.", mojo);
+ assertNotNull("Mojo not found.", mojo);
LegacySupport legacySupport = lookup(LegacySupport.class);
legacySupport.setSession(newMavenSession(new MavenProjectStub()));
@@ -75,18 +70,26 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
repoSession.setLocalRepositoryManager(new SimpleLocalRepositoryManagerFactory()
.newInstance(repoSession, new LocalRepository(artifactStubFactory.getWorkingDir())));
- // setVariableValueToObject( mojo, "session", legacySupport.getSession() );
- setVariableValueToObject(mojo, "remoteRepositories", mojo.getProject().getRemoteArtifactRepositories());
+ List<MavenProject> reactorProjects =
+ mojo.getReactorProjects() != null ? mojo.getReactorProjects() : Collections.emptyList();
+
+ setVariableValueToObject(mojo, "mojoExecution", getMockMojoExecution());
+ // setVariableValueToObject(mojo, "session", legacySupport.getSession());
+ setVariableValueToObject(mojo, "repoSession", legacySupport.getRepositorySession());
+ setVariableValueToObject(mojo, "reactorProjects", reactorProjects);
+ setVariableValueToObject(
+ mojo, "remoteProjectRepositories", mojo.getProject().getRemoteProjectRepositories());
+ setVariableValueToObject(
+ mojo, "siteDirectory", new File(mojo.getProject().getBasedir(), "src/site"));
return mojo;
}
public void testBasicSurefireReport() throws Exception {
- File testPom = new File(getUnitBaseDir(), "basic-surefire-report-test/plugin-config.xml");
+ File testPom = getPluginXmlFile("basic-surefire-report-test");
SurefireReportMojo mojo = createReportMojo(testPom);
File outputDir = (File) getVariableValueFromObject(mojo, "outputDirectory");
boolean showSuccess = (Boolean) getVariableValueFromObject(mojo, "showSuccess");
File reportsDir = (File) getVariableValueFromObject(mojo, "reportsDirectory");
- String outputName = (String) getVariableValueFromObject(mojo, "outputName");
File xrefLocation = (File) getVariableValueFromObject(mojo, "xrefLocation");
boolean linkXRef = (Boolean) getVariableValueFromObject(mojo, "linkXRef");
@@ -96,7 +99,6 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
new File(getBasedir() + "/src/test/resources/unit/basic-surefire-report-test/surefire-reports")
.getAbsolutePath(),
reportsDir.getAbsolutePath());
- assertEquals("surefire-report", outputName);
assertEquals(
new File(getBasedir() + "/target/site/unit/basic-surefire-report-test/xref-test").getAbsolutePath(),
xrefLocation.getAbsolutePath());
@@ -111,14 +113,24 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertTrue(idx >= 0);
}
- private File getUnitBaseDir() throws UnsupportedEncodingException {
- URL resource = getClass().getResource("/unit");
- // URLDecoder.decode necessary for JDK 1.5+, where spaces are escaped to %20
- return new File(URLDecoder.decode(resource.getPath(), "UTF-8")).getAbsoluteFile();
+ private MojoExecution getMockMojoExecution() {
+ MojoDescriptor md = new MojoDescriptor();
+ md.setGoal("report");
+
+ MojoExecution me = new MojoExecution(md);
+
+ PluginDescriptor pd = new PluginDescriptor();
+ Plugin p = new Plugin();
+ p.setGroupId("org.apache.maven.plugins");
+ p.setArtifactId("maven-surefire-report-plugin");
+ pd.setPlugin(p);
+ md.setPluginDescriptor(pd);
+
+ return me;
}
public void testBasicSurefireReportIfShowSuccessIsFalse() throws Exception {
- File testPom = new File(getUnitBaseDir(), "basic-surefire-report-success-false/plugin-config.xml");
+ File testPom = getPluginXmlFile("basic-surefire-report-success-false");
SurefireReportMojo mojo = createReportMojo(testPom);
boolean showSuccess = (Boolean) getVariableValueFromObject(mojo, "showSuccess");
assertFalse(showSuccess);
@@ -133,7 +145,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
}
public void testBasicSurefireReportIfLinkXrefIsFalse() throws Exception {
- File testPom = new File(getUnitBaseDir(), "basic-surefire-report-linkxref-false/plugin-config.xml");
+ File testPom = getPluginXmlFile("basic-surefire-report-linkxref-false");
SurefireReportMojo mojo = createReportMojo(testPom);
boolean linkXRef = (Boolean) getVariableValueFromObject(mojo, "linkXRef");
assertFalse(linkXRef);
@@ -148,7 +160,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
}
public void testBasicSurefireReportIfReportingIsNull() throws Exception {
- File testPom = new File(getUnitBaseDir(), "basic-surefire-report-reporting-null/plugin-config.xml");
+ File testPom = getPluginXmlFile("basic-surefire-report-reporting-null");
SurefireReportMojo mojo = createReportMojo(testPom);
mojo.execute();
File report =
@@ -162,7 +174,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
@SuppressWarnings("checkstyle:methodname")
public void testBasicSurefireReport_AnchorTestCases() throws Exception {
- File testPom = new File(getUnitBaseDir(), "basic-surefire-report-anchor-test-cases/plugin-config.xml");
+ File testPom = getPluginXmlFile("basic-surefire-report-anchor-test-cases");
SurefireReportMojo mojo = createReportMojo(testPom);
mojo.execute();
File report =
@@ -179,7 +191,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
}
public void testSurefireReportSingleError() throws Exception {
- File testPom = new File(getUnitBaseDir(), "surefire-report-single-error/plugin-config.xml");
+ File testPom = getPluginXmlFile("surefire-report-single-error");
SurefireReportMojo mojo = createReportMojo(testPom);
mojo.execute();
File report = new File(getBasedir(), "target/site/unit/surefire-report-single-error/surefire-report.html");
@@ -189,7 +201,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\">1</td>\n"
+ + "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
+ "<td>0</td>\n"
@@ -199,7 +211,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\"><a href=\"#surefire\">surefire</a></td>\n"
+ + "<td><a href=\"#surefire\">surefire</a></td>\n"
+ "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
@@ -209,9 +221,9 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\">"
+ + "<td>"
+ "<a href=\"#surefire.MyTest\">"
- + "<img src=\"images/icon_error_sml.gif\" alt=\"\" />"
+ + "<img src=\"images/icon_error_sml.gif\" />"
+ "</a>"
+ "</td>\n"
+ "<td><a href=\"#surefire.MyTest\">MyTest</a></td>\n"
@@ -266,7 +278,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
}
public void testSurefireReportNestedClassTrimStackTrace() throws Exception {
- File testPom = new File(getUnitBaseDir(), "surefire-report-nestedClass-trimStackTrace/plugin-config.xml");
+ File testPom = getPluginXmlFile("surefire-report-nestedClass-trimStackTrace");
SurefireReportMojo mojo = createReportMojo(testPom);
mojo.execute();
File report = new File(
@@ -277,7 +289,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\">1</td>\n"
+ + "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
+ "<td>0</td>\n"
@@ -287,7 +299,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\"><a href=\"#surefire\">surefire</a></td>\n"
+ + "<td><a href=\"#surefire\">surefire</a></td>\n"
+ "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
@@ -297,9 +309,9 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\">"
+ + "<td>"
+ "<a href=\"#surefire.MyTest\">"
- + "<img src=\"images/icon_error_sml.gif\" alt=\"\" />"
+ + "<img src=\"images/icon_error_sml.gif\" />"
+ "</a>"
+ "</td>\n"
+ "<td><a href=\"#surefire.MyTest\">MyTest</a></td>\n"
@@ -330,7 +342,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
}
public void testSurefireReportNestedClass() throws Exception {
- File testPom = new File(getUnitBaseDir(), "surefire-report-nestedClass/plugin-config.xml");
+ File testPom = getPluginXmlFile("surefire-report-nestedClass");
SurefireReportMojo mojo = createReportMojo(testPom);
mojo.execute();
File report = new File(getBasedir(), "target/site/unit/surefire-report-nestedClass/surefire-report.html");
@@ -340,7 +352,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\">1</td>\n"
+ + "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
+ "<td>0</td>\n"
@@ -350,7 +362,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\"><a href=\"#surefire\">surefire</a></td>\n"
+ + "<td><a href=\"#surefire\">surefire</a></td>\n"
+ "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
@@ -360,9 +372,9 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\">"
+ + "<td>"
+ "<a href=\"#surefire.MyTest\">"
- + "<img src=\"images/icon_error_sml.gif\" alt=\"\" />"
+ + "<img src=\"images/icon_error_sml.gif\" />"
+ "</a>"
+ "</td>\n"
+ "<td><a href=\"#surefire.MyTest\">MyTest</a></td>\n"
@@ -417,7 +429,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
}
public void testSurefireReportEnclosedTrimStackTrace() throws Exception {
- File testPom = new File(getUnitBaseDir(), "surefire-report-enclosed-trimStackTrace/plugin-config.xml");
+ File testPom = getPluginXmlFile("surefire-report-enclosed-trimStackTrace");
SurefireReportMojo mojo = createReportMojo(testPom);
mojo.execute();
File report =
@@ -428,7 +440,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\">1</td>\n"
+ + "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
+ "<td>0</td>\n"
@@ -438,7 +450,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\"><a href=\"#surefire\">surefire</a></td>\n"
+ + "<td><a href=\"#surefire\">surefire</a></td>\n"
+ "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
@@ -448,9 +460,9 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\">"
+ + "<td>"
+ "<a href=\"#surefire.MyTest$A\">"
- + "<img src=\"images/icon_error_sml.gif\" alt=\"\" />"
+ + "<img src=\"images/icon_error_sml.gif\" />"
+ "</a>"
+ "</td>\n"
+ "<td><a href=\"#surefire.MyTest$A\">MyTest$A</a></td>\n"
@@ -481,7 +493,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
}
public void testSurefireReportEnclosed() throws Exception {
- File testPom = new File(getUnitBaseDir(), "surefire-report-enclosed/plugin-config.xml");
+ File testPom = getPluginXmlFile("surefire-report-enclosed");
SurefireReportMojo mojo = createReportMojo(testPom);
mojo.execute();
File report = new File(getBasedir(), "target/site/unit/surefire-report-enclosed/surefire-report.html");
@@ -491,7 +503,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\">1</td>\n"
+ + "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
+ "<td>0</td>\n"
@@ -501,7 +513,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\"><a href=\"#surefire\">surefire</a></td>\n"
+ + "<td><a href=\"#surefire\">surefire</a></td>\n"
+ "<td>1</td>\n"
+ "<td>1</td>\n"
+ "<td>0</td>\n"
@@ -511,9 +523,9 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertThat(
htmlContent,
containsString(toSystemNewLine("<tr class=\"b\">\n"
- + "<td align=\"left\">"
+ + "<td>"
+ "<a href=\"#surefire.MyTest$A\">"
- + "<img src=\"images/icon_error_sml.gif\" alt=\"\" />"
+ + "<img src=\"images/icon_error_sml.gif\" />"
+ "</a>"
+ "</td>\n"
+ "<td><a href=\"#surefire.MyTest$A\">MyTest$A</a></td>\n"
@@ -578,7 +590,7 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
}
public void testCustomTitleAndDescriptionReport() throws Exception {
- File testPom = new File(getUnitBaseDir(), "surefire-1183/plugin-config.xml");
+ File testPom = getPluginXmlFile("surefire-1183");
SurefireReportMojo mojo = createReportMojo(testPom);
File outputDir = (File) getVariableValueFromObject(mojo, "outputDirectory");
@@ -599,6 +611,8 @@ public class SurefireReportMojoTest extends AbstractMojoTestCase {
assertTrue(report.exists());
String htmlContent = FileUtils.fileRead(report);
- assertTrue(htmlContent.contains("<h2><a name=\"Acceptance_Test\"></a>Acceptance Test</h2></section>"));
+ assertThat(
+ htmlContent,
+ containsString(toSystemNewLine("<section><a id=\"Acceptance_Test\"></a>\n<h1>Acceptance Test</h1>")));
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/AnchorTestCasesStub.java
similarity index 67%
copy from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
copy to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/AnchorTestCasesStub.java
index 9365879e4..3b69f4ba8 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/AnchorTestCasesStub.java
@@ -18,21 +18,10 @@
*/
package org.apache.maven.plugins.surefire.report.stubs;
-import java.util.ArrayList;
-import java.util.List;
+public class AnchorTestCasesStub extends SurefireReportMavenProjectStub {
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-/**
- * @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
- */
-public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
- /**
- * {@inheritDoc}
- */
@Override
- public List<ReportPlugin> getReportPlugins() {
- return new ArrayList<>();
+ protected String getProjectDirName() {
+ return "basic-surefire-report-anchor-test-cases";
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/EnclosedStub.java
similarity index 67%
copy from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
copy to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/EnclosedStub.java
index 9365879e4..bdcce6b04 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/EnclosedStub.java
@@ -18,21 +18,10 @@
*/
package org.apache.maven.plugins.surefire.report.stubs;
-import java.util.ArrayList;
-import java.util.List;
+public class EnclosedStub extends SurefireReportMavenProjectStub {
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-/**
- * @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
- */
-public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
- /**
- * {@inheritDoc}
- */
@Override
- public List<ReportPlugin> getReportPlugins() {
- return new ArrayList<>();
+ protected String getProjectDirName() {
+ return "surefire-report-enclosed";
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/EnclosedTrimStackTraceStub.java
similarity index 67%
copy from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
copy to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/EnclosedTrimStackTraceStub.java
index 9365879e4..f5ba0e74b 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/EnclosedTrimStackTraceStub.java
@@ -18,21 +18,10 @@
*/
package org.apache.maven.plugins.surefire.report.stubs;
-import java.util.ArrayList;
-import java.util.List;
+public class EnclosedTrimStackTraceStub extends SurefireReportMavenProjectStub {
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-/**
- * @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
- */
-public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
- /**
- * {@inheritDoc}
- */
@Override
- public List<ReportPlugin> getReportPlugins() {
- return new ArrayList<>();
+ protected String getProjectDirName() {
+ return "surefire-report-enclosed-trimStackTrace";
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/LinkXrefFalseStub.java
similarity index 67%
copy from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
copy to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/LinkXrefFalseStub.java
index 9365879e4..7bf7cf44b 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/LinkXrefFalseStub.java
@@ -18,21 +18,10 @@
*/
package org.apache.maven.plugins.surefire.report.stubs;
-import java.util.ArrayList;
-import java.util.List;
+public class LinkXrefFalseStub extends SurefireReportMavenProjectStub {
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-/**
- * @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
- */
-public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
- /**
- * {@inheritDoc}
- */
@Override
- public List<ReportPlugin> getReportPlugins() {
- return new ArrayList<>();
+ protected String getProjectDirName() {
+ return "basic-surefire-report-linkxref-false";
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/NestedClassStub.java
similarity index 67%
copy from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
copy to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/NestedClassStub.java
index 9365879e4..6f1547b37 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/NestedClassStub.java
@@ -18,21 +18,10 @@
*/
package org.apache.maven.plugins.surefire.report.stubs;
-import java.util.ArrayList;
-import java.util.List;
+public class NestedClassStub extends SurefireReportMavenProjectStub {
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-/**
- * @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
- */
-public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
- /**
- * {@inheritDoc}
- */
@Override
- public List<ReportPlugin> getReportPlugins() {
- return new ArrayList<>();
+ protected String getProjectDirName() {
+ return "surefire-report-nestedClass";
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/NestedClassTrimStackTraceStub.java
similarity index 67%
copy from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
copy to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/NestedClassTrimStackTraceStub.java
index 9365879e4..1a30076f5 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/NestedClassTrimStackTraceStub.java
@@ -18,21 +18,10 @@
*/
package org.apache.maven.plugins.surefire.report.stubs;
-import java.util.ArrayList;
-import java.util.List;
+public class NestedClassTrimStackTraceStub extends SurefireReportMavenProjectStub {
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-/**
- * @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
- */
-public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
- /**
- * {@inheritDoc}
- */
@Override
- public List<ReportPlugin> getReportPlugins() {
- return new ArrayList<>();
+ protected String getProjectDirName() {
+ return "surefire-report-nestedClass-trimStackTrace";
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/ReportTestStub.java
similarity index 68%
copy from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
copy to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/ReportTestStub.java
index 9365879e4..d04125a72 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/ReportTestStub.java
@@ -18,21 +18,10 @@
*/
package org.apache.maven.plugins.surefire.report.stubs;
-import java.util.ArrayList;
-import java.util.List;
+public class ReportTestStub extends SurefireReportMavenProjectStub {
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-/**
- * @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
- */
-public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
- /**
- * {@inheritDoc}
- */
@Override
- public List<ReportPlugin> getReportPlugins() {
- return new ArrayList<>();
+ protected String getProjectDirName() {
+ return "basic-surefire-report-test";
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/ReportingNullStub.java
similarity index 86%
copy from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
copy to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/ReportingNullStub.java
index 9365879e4..86b557ab0 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/ReportingNullStub.java
@@ -22,12 +22,11 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
/**
* @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
*/
-public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
+public class ReportingNullStub extends SurefireReportMavenProjectStub {
/**
* {@inheritDoc}
*/
@@ -35,4 +34,9 @@ public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
public List<ReportPlugin> getReportPlugins() {
return new ArrayList<>();
}
+
+ @Override
+ protected String getProjectDirName() {
+ return "basic-surefire-report-reporting-null";
+ }
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SingleErrorStub.java
similarity index 67%
copy from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
copy to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SingleErrorStub.java
index 9365879e4..60e83182e 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SingleErrorStub.java
@@ -18,21 +18,10 @@
*/
package org.apache.maven.plugins.surefire.report.stubs;
-import java.util.ArrayList;
-import java.util.List;
+public class SingleErrorStub extends SurefireReportMavenProjectStub {
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-/**
- * @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
- */
-public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
- /**
- * {@inheritDoc}
- */
@Override
- public List<ReportPlugin> getReportPlugins() {
- return new ArrayList<>();
+ protected String getProjectDirName() {
+ return "surefire-report-single-error";
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SuccessFalseStub.java
similarity index 67%
copy from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
copy to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SuccessFalseStub.java
index 9365879e4..afe355951 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SuccessFalseStub.java
@@ -18,21 +18,10 @@
*/
package org.apache.maven.plugins.surefire.report.stubs;
-import java.util.ArrayList;
-import java.util.List;
+public class SuccessFalseStub extends SurefireReportMavenProjectStub {
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-/**
- * @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
- */
-public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
- /**
- * {@inheritDoc}
- */
@Override
- public List<ReportPlugin> getReportPlugins() {
- return new ArrayList<>();
+ protected String getProjectDirName() {
+ return "basic-surefire-report-success-false";
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/Surefire1183Stub.java
similarity index 67%
rename from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
rename to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/Surefire1183Stub.java
index 9365879e4..e39849618 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/Surefire1183Stub.java
@@ -18,21 +18,10 @@
*/
package org.apache.maven.plugins.surefire.report.stubs;
-import java.util.ArrayList;
-import java.util.List;
+public class Surefire1183Stub extends SurefireReportMavenProjectStub {
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-/**
- * @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
- */
-public class SurefireRepMavenProjectStub2 extends MavenProjectStub {
- /**
- * {@inheritDoc}
- */
@Override
- public List<ReportPlugin> getReportPlugins() {
- return new ArrayList<>();
+ protected String getProjectDirName() {
+ return "surefire-1183";
}
}
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireReportMavenProjectStub.java
similarity index 77%
rename from maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub.java
rename to maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireReportMavenProjectStub.java
index bd4497c24..17b2a9566 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireReportMavenProjectStub.java
@@ -18,22 +18,37 @@
*/
package org.apache.maven.plugins.surefire.report.stubs;
+import java.io.File;
import java.util.Collections;
import java.util.List;
+import org.apache.maven.RepositoryUtils;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
import org.apache.maven.artifact.repository.MavenArtifactRepository;
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import org.apache.maven.model.Model;
import org.apache.maven.model.ReportPlugin;
import org.apache.maven.model.Reporting;
import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.eclipse.aether.repository.RemoteRepository;
/**
* @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
*/
-public class SurefireRepMavenProjectStub extends MavenProjectStub {
+public abstract class SurefireReportMavenProjectStub extends MavenProjectStub {
+
+ protected abstract String getProjectDirName();
+
+ @Override
+ public File getBasedir() {
+ return new File(super.getBasedir() + "/src/test/resources/unit/" + getProjectDirName());
+ }
+
+ @Override
+ public File getFile() {
+ return new File(getBasedir(), "plugin-config.xml");
+ }
+
/**
* {@inheritDoc}
*/
@@ -47,10 +62,6 @@ public class SurefireRepMavenProjectStub extends MavenProjectStub {
reportPlugin.setVersion("2.0-SNAPSHOT");
reporting.addPlugin(reportPlugin);
- Model model = new Model();
-
- model.setReporting(reporting);
-
return reporting.getPlugins();
}
@@ -65,4 +76,9 @@ public class SurefireRepMavenProjectStub extends MavenProjectStub {
return Collections.singletonList(repository);
}
+
+ @Override
+ public List<RemoteRepository> getRemoteProjectRepositories() {
+ return RepositoryUtils.toRepos(getRemoteArtifactRepositories());
+ }
}
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/plugin-config.xml
index 3045dce6d..fe0e78d7f 100644
--- a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/plugin-config.xml
+++ b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/plugin-config.xml
@@ -24,8 +24,7 @@
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>${basedir}/target/site/unit/basic-surefire-report-anchor-test-cases</outputDirectory>
- <localRepository>${localRepository}</localRepository>
- <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+ <project implementation="org.apache.maven.plugins.surefire.report.stubs.AnchorTestCasesStub"/>
<showSuccess>true</showSuccess>
<reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-anchor-test-cases/surefire-reports
</reportsDirectory>
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/plugin-config.xml
index e0586aad1..01f10b34a 100644
--- a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/plugin-config.xml
+++ b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/plugin-config.xml
@@ -24,8 +24,7 @@
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>${basedir}/target/site/unit/basic-surefire-report-linkxref-false</outputDirectory>
- <localRepository>${localRepository}</localRepository>
- <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+ <project implementation="org.apache.maven.plugins.surefire.report.stubs.LinkXrefFalseStub"/>
<showSuccess>true</showSuccess>
<reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-linkxref-false/surefire-reports
</reportsDirectory>
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/plugin-config.xml
index 8aca877bd..f53e5dfea 100644
--- a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/plugin-config.xml
+++ b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/plugin-config.xml
@@ -24,8 +24,7 @@
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>${basedir}/target/site/unit/basic-surefire-report-reporting-null</outputDirectory>
- <localRepository>${localRepository}</localRepository>
- <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub2"/>
+ <project implementation="org.apache.maven.plugins.surefire.report.stubs.ReportingNullStub"/>
<showSuccess>true</showSuccess>
<reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-reporting-null/surefire-reports
</reportsDirectory>
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/plugin-config.xml
index c79859112..27d6b2e38 100644
--- a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/plugin-config.xml
+++ b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/plugin-config.xml
@@ -24,8 +24,7 @@
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>${basedir}/target/site/unit/basic-surefire-report-success-false</outputDirectory>
- <localRepository>${localRepository}</localRepository>
- <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+ <project implementation="org.apache.maven.plugins.surefire.report.stubs.SuccessFalseStub"/>
<showSuccess>false</showSuccess>
<reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-success-false/surefire-reports
</reportsDirectory>
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/plugin-config.xml
index 81e59caf1..782c972c8 100644
--- a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/plugin-config.xml
+++ b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/plugin-config.xml
@@ -24,8 +24,7 @@
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>${basedir}/target/site/unit/basic-surefire-report-test</outputDirectory>
- <localRepository>${localRepository}</localRepository>
- <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+ <project implementation="org.apache.maven.plugins.surefire.report.stubs.ReportTestStub"/>
<showSuccess>true</showSuccess>
<reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-test/surefire-reports
</reportsDirectory>
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/surefire-1183/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/surefire-1183/plugin-config.xml
index 108f58350..c3a82a688 100644
--- a/maven-surefire-report-plugin/src/test/resources/unit/surefire-1183/plugin-config.xml
+++ b/maven-surefire-report-plugin/src/test/resources/unit/surefire-1183/plugin-config.xml
@@ -25,9 +25,8 @@
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<project
- implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+ implementation="org.apache.maven.plugins.surefire.report.stubs.Surefire1183Stub"/>
<outputName>acceptance-test-report</outputName>
- <localRepository>${localRepository}</localRepository>
<customBundle>${basedir}/src/test/resources/unit/surefire-1183/src/site/custom/surefire-report.properties</customBundle>
<outputDirectory>${basedir}/target/site/unit/surefire-1183</outputDirectory>
<reportsDirectory>${basedir}/src/test/resources/unit/surefire-1183/acceptancetest-reports</reportsDirectory>
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-enclosed-trimStackTrace/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-enclosed-trimStackTrace/plugin-config.xml
index 981bb1882..d02fe60da 100644
--- a/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-enclosed-trimStackTrace/plugin-config.xml
+++ b/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-enclosed-trimStackTrace/plugin-config.xml
@@ -24,8 +24,7 @@
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>${basedir}/target/site/unit/surefire-report-enclosed-trimStackTrace</outputDirectory>
- <localRepository>${localRepository}</localRepository>
- <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+ <project implementation="org.apache.maven.plugins.surefire.report.stubs.EnclosedTrimStackTraceStub"/>
<showSuccess>true</showSuccess>
<reportsDirectory>${basedir}/src/test/resources/unit/surefire-report-enclosed-trimStackTrace/surefire-reports
</reportsDirectory>
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-enclosed/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-enclosed/plugin-config.xml
index 26bae34ab..5bb6b5ab6 100644
--- a/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-enclosed/plugin-config.xml
+++ b/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-enclosed/plugin-config.xml
@@ -24,8 +24,7 @@
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>${basedir}/target/site/unit/surefire-report-enclosed</outputDirectory>
- <localRepository>${localRepository}</localRepository>
- <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+ <project implementation="org.apache.maven.plugins.surefire.report.stubs.EnclosedStub"/>
<showSuccess>true</showSuccess>
<reportsDirectory>${basedir}/src/test/resources/unit/surefire-report-enclosed/surefire-reports
</reportsDirectory>
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-nestedClass-trimStackTrace/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-nestedClass-trimStackTrace/plugin-config.xml
index dcf6a9a72..7e6c0a506 100644
--- a/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-nestedClass-trimStackTrace/plugin-config.xml
+++ b/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-nestedClass-trimStackTrace/plugin-config.xml
@@ -24,8 +24,7 @@
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>${basedir}/target/site/unit/surefire-report-nestedClass-trimStackTrace</outputDirectory>
- <localRepository>${localRepository}</localRepository>
- <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+ <project implementation="org.apache.maven.plugins.surefire.report.stubs.NestedClassTrimStackTraceStub"/>
<showSuccess>true</showSuccess>
<reportsDirectory>${basedir}/src/test/resources/unit/surefire-report-nestedClass-trimStackTrace/surefire-reports
</reportsDirectory>
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-nestedClass/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-nestedClass/plugin-config.xml
index 86ff4639b..5b577227c 100644
--- a/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-nestedClass/plugin-config.xml
+++ b/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-nestedClass/plugin-config.xml
@@ -24,8 +24,7 @@
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>${basedir}/target/site/unit/surefire-report-nestedClass</outputDirectory>
- <localRepository>${localRepository}</localRepository>
- <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+ <project implementation="org.apache.maven.plugins.surefire.report.stubs.NestedClassStub"/>
<showSuccess>true</showSuccess>
<reportsDirectory>${basedir}/src/test/resources/unit/surefire-report-nestedClass/surefire-reports
</reportsDirectory>
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-single-error/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-single-error/plugin-config.xml
index e8a3f5889..cfb5505a2 100644
--- a/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-single-error/plugin-config.xml
+++ b/maven-surefire-report-plugin/src/test/resources/unit/surefire-report-single-error/plugin-config.xml
@@ -24,8 +24,7 @@
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>${basedir}/target/site/unit/surefire-report-single-error</outputDirectory>
- <localRepository>${localRepository}</localRepository>
- <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+ <project implementation="org.apache.maven.plugins.surefire.report.stubs.SingleErrorStub"/>
<showSuccess>true</showSuccess>
<reportsDirectory>${basedir}/src/test/resources/unit/surefire-report-single-error/surefire-reports
</reportsDirectory>
diff --git a/pom.xml b/pom.xml
index 8107330c2..fc4331ef1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,7 +15,7 @@
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
- ~ under the License.
+ ~ 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>
@@ -28,7 +28,7 @@
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache Maven Surefire</name>
@@ -125,11 +125,6 @@
<artifactId>commons-io</artifactId>
<version>${commonsIoVersion}</version>
</dependency>
- <dependency>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-api</artifactId>
- <version>3.1.1</version>
- </dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
@@ -168,21 +163,6 @@
<artifactId>maven-shared-utils</artifactId>
<version>${mavenSharedUtilsVersion}</version>
</dependency>
- <dependency>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-impl</artifactId>
- <version>3.2.0</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-common-artifact-filters</artifactId>
diff --git a/surefire-api/pom.xml b/surefire-api/pom.xml
index 6cc06b594..9448134d1 100644
--- a/surefire-api/pom.xml
+++ b/surefire-api/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-api</artifactId>
diff --git a/surefire-booter/pom.xml b/surefire-booter/pom.xml
index dfd819172..f3973d00e 100644
--- a/surefire-booter/pom.xml
+++ b/surefire-booter/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-booter</artifactId>
diff --git a/surefire-extensions-api/pom.xml b/surefire-extensions-api/pom.xml
index 6914865d7..d75eb0e40 100644
--- a/surefire-extensions-api/pom.xml
+++ b/surefire-extensions-api/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-extensions-api</artifactId>
diff --git a/surefire-extensions-spi/pom.xml b/surefire-extensions-spi/pom.xml
index 23748dafe..2c6b2ea0c 100644
--- a/surefire-extensions-spi/pom.xml
+++ b/surefire-extensions-spi/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-extensions-spi</artifactId>
diff --git a/surefire-grouper/pom.xml b/surefire-grouper/pom.xml
index fc91f4849..0210b4004 100644
--- a/surefire-grouper/pom.xml
+++ b/surefire-grouper/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-grouper</artifactId>
diff --git a/surefire-its/pom.xml b/surefire-its/pom.xml
index b9dd5f550..55a3a0e37 100644
--- a/surefire-its/pom.xml
+++ b/surefire-its/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-its</artifactId>
diff --git a/surefire-its/src/test/resources/surefire-260-testWithIdenticalNames/pom.xml b/surefire-its/src/test/resources/surefire-260-testWithIdenticalNames/pom.xml
index 4aa101ba5..aacc9e3ab 100644
--- a/surefire-its/src/test/resources/surefire-260-testWithIdenticalNames/pom.xml
+++ b/surefire-its/src/test/resources/surefire-260-testWithIdenticalNames/pom.xml
@@ -57,7 +57,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
- <version>3.7.1</version>
+ <version>4.0.0-M8</version>
</plugin>
</plugins>
</build>
@@ -67,7 +67,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
- <version>3.0.0</version>
+ <version>4.0.0-M1-SNAPSHOT</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
</configuration>
diff --git a/surefire-logger-api/pom.xml b/surefire-logger-api/pom.xml
index 62bbdf74a..046daafef 100644
--- a/surefire-logger-api/pom.xml
+++ b/surefire-logger-api/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-logger-api</artifactId>
diff --git a/surefire-providers/common-java5/pom.xml b/surefire-providers/common-java5/pom.xml
index 5bd4d833e..55d3ca2a3 100644
--- a/surefire-providers/common-java5/pom.xml
+++ b/surefire-providers/common-java5/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>common-java5</artifactId>
diff --git a/surefire-providers/common-junit3/pom.xml b/surefire-providers/common-junit3/pom.xml
index 4089bc647..7d8525ac9 100644
--- a/surefire-providers/common-junit3/pom.xml
+++ b/surefire-providers/common-junit3/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>common-junit3</artifactId>
diff --git a/surefire-providers/common-junit4/pom.xml b/surefire-providers/common-junit4/pom.xml
index 3466ec559..30bf54e29 100644
--- a/surefire-providers/common-junit4/pom.xml
+++ b/surefire-providers/common-junit4/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>common-junit4</artifactId>
diff --git a/surefire-providers/common-junit48/pom.xml b/surefire-providers/common-junit48/pom.xml
index 036a5a8a4..a6bbf8582 100644
--- a/surefire-providers/common-junit48/pom.xml
+++ b/surefire-providers/common-junit48/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>common-junit48</artifactId>
diff --git a/surefire-providers/pom.xml b/surefire-providers/pom.xml
index 7e0a4bfa3..dd505966f 100644
--- a/surefire-providers/pom.xml
+++ b/surefire-providers/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-providers</artifactId>
diff --git a/surefire-providers/surefire-junit-platform/pom.xml b/surefire-providers/surefire-junit-platform/pom.xml
index b96637118..da589edf4 100644
--- a/surefire-providers/surefire-junit-platform/pom.xml
+++ b/surefire-providers/surefire-junit-platform/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-junit-platform</artifactId>
diff --git a/surefire-providers/surefire-junit3/pom.xml b/surefire-providers/surefire-junit3/pom.xml
index a80209607..9cef9f7bf 100644
--- a/surefire-providers/surefire-junit3/pom.xml
+++ b/surefire-providers/surefire-junit3/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-junit3</artifactId>
diff --git a/surefire-providers/surefire-junit4/pom.xml b/surefire-providers/surefire-junit4/pom.xml
index 00877d8a1..e37427d7b 100644
--- a/surefire-providers/surefire-junit4/pom.xml
+++ b/surefire-providers/surefire-junit4/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-junit4</artifactId>
diff --git a/surefire-providers/surefire-junit47/pom.xml b/surefire-providers/surefire-junit47/pom.xml
index 82a646a0a..42640836f 100644
--- a/surefire-providers/surefire-junit47/pom.xml
+++ b/surefire-providers/surefire-junit47/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-junit47</artifactId>
diff --git a/surefire-providers/surefire-testng-utils/pom.xml b/surefire-providers/surefire-testng-utils/pom.xml
index d88368b35..b309b0448 100644
--- a/surefire-providers/surefire-testng-utils/pom.xml
+++ b/surefire-providers/surefire-testng-utils/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-testng-utils</artifactId>
diff --git a/surefire-providers/surefire-testng/pom.xml b/surefire-providers/surefire-testng/pom.xml
index 328cf7767..de946b19d 100644
--- a/surefire-providers/surefire-testng/pom.xml
+++ b/surefire-providers/surefire-testng/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-providers</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-testng</artifactId>
diff --git a/surefire-report-parser/pom.xml b/surefire-report-parser/pom.xml
index ada0b00e5..c57dd7022 100644
--- a/surefire-report-parser/pom.xml
+++ b/surefire-report-parser/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-report-parser</artifactId>
diff --git a/surefire-shadefire/pom.xml b/surefire-shadefire/pom.xml
index ed2e82938..0c8b467e5 100644
--- a/surefire-shadefire/pom.xml
+++ b/surefire-shadefire/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-shadefire</artifactId>
diff --git a/surefire-shared-utils/pom.xml b/surefire-shared-utils/pom.xml
index 6ea0e9211..e69cbdb3d 100644
--- a/surefire-shared-utils/pom.xml
+++ b/surefire-shared-utils/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>surefire-shared-utils</artifactId>