commit 607409f2e6c46eff471ed4969bdb0be709900d2bb75630d071539e8729c96192 Author: Fridrich Strba Date: Mon Nov 4 00:01:00 2024 +0000 OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-surefire?expand=0&rev=49 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Port-to-TestNG-7.4.0.patch b/0001-Port-to-TestNG-7.4.0.patch new file mode 100644 index 0000000..f15d9c4 --- /dev/null +++ b/0001-Port-to-TestNG-7.4.0.patch @@ -0,0 +1,357 @@ +From 71bca819927dcd976ece1aab6cdb9ddd4aab8a09 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Mon, 10 Jul 2017 10:37:50 +0200 +Subject: [PATCH 1/2] Port to TestNG 7.4.0 + +--- + pom.xml | 2 +- + .../surefire-testng-utils/pom.xml | 1 - + .../java/testng/utils/MethodSelectorTest.java | 106 ++++++++++++++++-- + surefire-providers/surefire-testng/pom.xml | 1 - + .../maven/surefire/testng/TestNGReporter.java | 4 - + .../conf/AbstractDirectConfigurator.java | 2 +- + .../testng/conf/TestNGMapConfigurator.java | 9 +- + .../surefire/testng/TestNGReporterTest.java | 4 +- + .../conf/TestNGMapConfiguratorTest.java | 6 +- + 9 files changed, 104 insertions(+), 31 deletions(-) + +diff --git a/pom.xml b/pom.xml +index 432d7ebae..75a61b38e 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -98,7 +98,7 @@ + 3.3.4 + 2.0.9 + 0.8.12 +- 5.11 ++ 7.4.0 + ${project.version} + scm:git:https://gitbox.apache.org/repos/asf/maven-surefire.git + surefire-archives/surefire-LATEST +diff --git a/surefire-providers/surefire-testng-utils/pom.xml b/surefire-providers/surefire-testng-utils/pom.xml +index 2816d9329..fbb357d02 100644 +--- a/surefire-providers/surefire-testng-utils/pom.xml ++++ b/surefire-providers/surefire-testng-utils/pom.xml +@@ -47,7 +47,6 @@ + org.testng + testng + ${testngVersion} +- jdk15 + provided + + +diff --git a/surefire-providers/surefire-testng-utils/src/test/java/testng/utils/MethodSelectorTest.java b/surefire-providers/surefire-testng-utils/src/test/java/testng/utils/MethodSelectorTest.java +index c0e7838bd..5f180624d 100644 +--- a/surefire-providers/surefire-testng-utils/src/test/java/testng/utils/MethodSelectorTest.java ++++ b/surefire-providers/surefire-testng-utils/src/test/java/testng/utils/MethodSelectorTest.java +@@ -19,6 +19,10 @@ + package testng.utils; + + import java.lang.reflect.Method; ++import java.util.Collections; ++import java.util.List; ++import java.util.Map; ++import java.util.concurrent.Callable; + + import junit.framework.TestCase; + import org.apache.maven.surefire.api.testset.TestListResolver; +@@ -27,7 +31,11 @@ + import org.testng.IRetryAnalyzer; + import org.testng.ITestClass; + import org.testng.ITestNGMethod; ++import org.testng.ITestResult; ++import org.testng.internal.ConstructorOrMethod; + import org.testng.internal.DefaultMethodSelectorContext; ++import org.testng.internal.reflect.ReflectionHelper; ++import org.testng.xml.XmlTest; + + /** + * +@@ -65,16 +73,26 @@ public void testInclusionOfMethodFromSubClass() { + } + + private static class FakeTestNGMethod implements ITestNGMethod { ++ private final ConstructorOrMethod consMethod; + private final Class clazz; + private final String methodName; + + FakeTestNGMethod(Class clazz, String methodName) { ++ ConstructorOrMethod temp = null; ++ Method[] methods = ReflectionHelper.getLocalMethods(clazz); ++ for (Method method : methods) { ++ if (method.getName().equalsIgnoreCase(methodName)) { ++ temp = new ConstructorOrMethod(method); ++ break; ++ } ++ } + this.clazz = clazz; + this.methodName = methodName; ++ this.consMethod = temp; + } + + @Override +- public Class getRealClass() { ++ public Class getRealClass() { + return clazz; + } + +@@ -86,19 +104,14 @@ public ITestClass getTestClass() { + @Override + public void setTestClass(ITestClass iTestClass) {} + +- @Override +- public Method getMethod() { +- return null; +- } +- + @Override + public String getMethodName() { + return methodName; + } + + @Override +- public Object[] getInstances() { +- return new Object[0]; ++ public Object getInstance() { ++ return null; + } + + @Override +@@ -202,6 +215,9 @@ public long getTimeOut() { + return 0; + } + ++ @Override ++ public void setTimeOut(long timeOut) {} ++ + @Override + public int getInvocationCount() { + return 0; +@@ -249,11 +265,19 @@ public int getThreadPoolSize() { + @Override + public void setThreadPoolSize(int i) {} + ++ @Override ++ public boolean getEnabled() { ++ return false; ++ } ++ + @Override + public String getDescription() { + return null; + } + ++ @Override ++ public void setDescription(String description) {} ++ + @Override + public void incrementCurrentInvocationCount() {} + +@@ -270,6 +294,14 @@ public int getParameterInvocationCount() { + return 0; + } + ++ @Override ++ public void setMoreInvocationChecker(Callable moreInvocationChecker) {} ++ ++ @Override ++ public boolean hasMoreInvocation() { ++ return false; ++ } ++ + @Override + public ITestNGMethod clone() { + try { +@@ -280,12 +312,17 @@ public ITestNGMethod clone() { + } + + @Override +- public IRetryAnalyzer getRetryAnalyzer() { ++ public IRetryAnalyzer getRetryAnalyzer(ITestResult result) { ++ return null; ++ } ++ ++ @Override ++ public Class getRetryAnalyzerClass() { + return null; + } + + @Override +- public void setRetryAnalyzer(IRetryAnalyzer iRetryAnalyzer) {} ++ public void setRetryAnalyzerClass(Class clazz) {} + + @Override + public boolean skipFailedInvocations() { +@@ -309,8 +346,55 @@ public boolean ignoreMissingDependencies() { + public void setIgnoreMissingDependencies(boolean b) {} + + @Override +- public int compareTo(Object o) { ++ public List getInvocationNumbers() { ++ return Collections.emptyList(); ++ } ++ ++ @Override ++ public void setInvocationNumbers(List numbers) {} ++ ++ @Override ++ public void addFailedInvocationNumber(int number) {} ++ ++ @Override ++ public List getFailedInvocationNumbers() { ++ return Collections.emptyList(); ++ } ++ ++ @Override ++ public int getPriority() { ++ return 0; ++ } ++ ++ @Override ++ public void setPriority(int priority) {} ++ ++ @Override ++ public int getInterceptedPriority() { + return 0; + } ++ ++ @Override ++ public void setInterceptedPriority(int priority) {} ++ ++ @Override ++ public XmlTest getXmlTest() { ++ return null; ++ } ++ ++ @Override ++ public ConstructorOrMethod getConstructorOrMethod() { ++ return consMethod; ++ } ++ ++ @Override ++ public Map findMethodParameters(XmlTest test) { ++ return test.getLocalParameters(); ++ } ++ ++ @Override ++ public String getQualifiedName() { ++ return null; ++ } + } + } +diff --git a/surefire-providers/surefire-testng/pom.xml b/surefire-providers/surefire-testng/pom.xml +index aa23267c3..33b1ef76f 100644 +--- a/surefire-providers/surefire-testng/pom.xml ++++ b/surefire-providers/surefire-testng/pom.xml +@@ -57,7 +57,6 @@ + org.testng + testng + ${testngVersion} +- jdk15 + provided + + +diff --git a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java +index ec887b792..3021a4049 100644 +--- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java ++++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java +@@ -59,10 +59,6 @@ public class TestNGReporter + /** + * Constructs a new instance that will listen to + * test updates from a {@link org.testng.TestNG} class instance. +- *
+- *
It is assumed that the requisite {@link org.testng.TestNG#addListener(ITestListener)} +- * method call has already associated with this instance before the test +- * suite is run. + * + * @param reportManager Instance to report suite status to + */ +diff --git a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java +index b73b9bacd..6ab5a626d 100644 +--- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java ++++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java +@@ -57,7 +57,7 @@ public void configure(TestNG testng, Map options) throws TestSet + testng.setUseDefaultListeners(false); + configureInstance(testng, options); + // TODO: we should have the Profile so that we can decide if this is needed or not +- testng.setListenerClasses(loadListenerClasses(listeners)); ++ testng.setListenerClasses((List) loadListenerClasses(listeners)); + } + + @Override +diff --git a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java +index d91e76afc..4bb4fe0b0 100755 +--- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java ++++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java +@@ -33,12 +33,7 @@ + + /** + * TestNG configurator for 5.3+ versions. TestNG exposes a {@link org.testng.TestNG#configure(java.util.Map)} method. +- * All supported TestNG options are passed in String format, except +- * {@link org.testng.TestNGCommandLineArgs#LISTENER_COMMAND_OPT} which is {@link java.util.List List>Class<}, +- * {@link org.testng.TestNGCommandLineArgs#JUNIT_DEF_OPT} which is a {@link Boolean}, +- * {@link org.testng.TestNGCommandLineArgs#SKIP_FAILED_INVOCATION_COUNT_OPT} which is a {@link Boolean}, +- * {@link org.testng.TestNGCommandLineArgs#OBJECT_FACTORY_COMMAND_OPT} which is a {@link Class}, +- * {@link org.testng.TestNGCommandLineArgs#REPORTERS_LIST} which is a {@link java.util.List List>ReporterConfig<}. ++ * All supported TestNG options are passed in String format. + *
+ * Test classes and/or suite files are not passed along as options parameters, but configured separately. + * +@@ -71,7 +66,7 @@ protected void configureThreadCount(XmlSuite suite, Map options) + protected void configureParallel(XmlSuite suite, Map options) throws TestSetFailedException { + String parallel = options.get(PARALLEL_PROP); + if (parallel != null) { +- suite.setParallel(parallel); ++ suite.setParallel(XmlSuite.ParallelMode.getValidParallel(parallel)); + } + } + +diff --git a/surefire-providers/surefire-testng/src/test/java/org/apache/maven/surefire/testng/TestNGReporterTest.java b/surefire-providers/surefire-testng/src/test/java/org/apache/maven/surefire/testng/TestNGReporterTest.java +index 514ecf9f8..5b201d765 100644 +--- a/surefire-providers/surefire-testng/src/test/java/org/apache/maven/surefire/testng/TestNGReporterTest.java ++++ b/surefire-providers/surefire-testng/src/test/java/org/apache/maven/surefire/testng/TestNGReporterTest.java +@@ -129,7 +129,7 @@ public void testOnTestFailure() { + + ITestResult testResult = mock(ITestResult.class); + when(testResult.getThrowable()).thenReturn(stackTrace); +- when(cls.getRealClass()).thenReturn(getClass()); ++ when((Object) cls.getRealClass()).thenReturn(getClass()); + when(testResult.getTestClass()).thenReturn(cls); + when(testResult.getMethod()).thenReturn(method); + when(testResult.getName()).thenReturn("myTest"); +@@ -200,7 +200,7 @@ public void testOnTestFailedButWithinSuccessPercentage() { + + ITestResult testResult = mock(ITestResult.class); + when(testResult.getThrowable()).thenReturn(stackTrace); +- when(cls.getRealClass()).thenReturn(getClass()); ++ when((Object) cls.getRealClass()).thenReturn(getClass()); + when(testResult.getTestClass()).thenReturn(cls); + when(testResult.getMethod()).thenReturn(method); + when(testResult.getName()).thenReturn("myTest"); +diff --git a/surefire-providers/surefire-testng/src/test/java/org/apache/maven/surefire/testng/conf/TestNGMapConfiguratorTest.java b/surefire-providers/surefire-testng/src/test/java/org/apache/maven/surefire/testng/conf/TestNGMapConfiguratorTest.java +index 097a74d1e..8b34db85d 100755 +--- a/surefire-providers/surefire-testng/src/test/java/org/apache/maven/surefire/testng/conf/TestNGMapConfiguratorTest.java ++++ b/surefire-providers/surefire-testng/src/test/java/org/apache/maven/surefire/testng/conf/TestNGMapConfiguratorTest.java +@@ -24,7 +24,7 @@ + + import junit.framework.TestCase; + import org.apache.maven.surefire.api.testset.TestSetFailedException; +-import org.testng.ReporterConfig; ++import org.testng.internal.ReporterConfig; + + /** + * @author Kristian Rosenvold +@@ -62,8 +62,8 @@ public void testGroupByInstances() throws Exception { + + public void testReporter() throws Exception { + Map convertedOptions = getConvertedOptions("reporter", "classname"); +- List reporter = (List) convertedOptions.get("-reporterslist"); +- ReporterConfig reporterConfig = reporter.get(0); ++ String reporter = (String) convertedOptions.get("-reporterslist"); ++ ReporterConfig reporterConfig = ReporterConfig.deserialize(reporter); + assertEquals("classname", reporterConfig.getClassName()); + } + +-- +2.46.1 + diff --git a/0002-Unshade-surefire.patch b/0002-Unshade-surefire.patch new file mode 100644 index 0000000..7061e9b --- /dev/null +++ b/0002-Unshade-surefire.patch @@ -0,0 +1,1972 @@ +From b29247a68ef70e97651718682b6f66cfb05aeed9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fridrich=20=C5=A0trba?= +Date: Tue, 1 Oct 2024 22:01:47 +0200 +Subject: [PATCH 2/2] Unshade surefire + +--- + maven-failsafe-plugin/pom.xml | 13 +++++--- + .../maven/plugin/failsafe/VerifyMojo.java | 2 +- + .../util/FailsafeSummaryXmlUtils.java | 6 ++-- + maven-surefire-common/pom.xml | 32 +++++++++++++------ + .../plugin/surefire/AbstractSurefireMojo.java | 22 ++++++------- + .../surefire/StartupReportConfiguration.java | 2 +- + .../maven/plugin/surefire/SurefireHelper.java | 2 +- + .../plugin/surefire/SurefireProperties.java | 2 +- + .../maven/plugin/surefire/TestClassPath.java | 2 +- + .../ClasspathForkConfiguration.java | 2 +- + .../DefaultForkConfiguration.java | 2 +- + .../surefire/booterclient/ForkStarter.java | 4 +-- + .../JarManifestForkConfiguration.java | 8 ++--- + .../ModularClasspathForkConfiguration.java | 2 +- + .../lazytestprovider/Commandline.java | 6 ++-- + .../extensions/SurefireForkChannel.java | 4 +-- + .../surefire/report/ConsoleReporter.java | 4 +-- + .../report/DefaultReporterFactory.java | 4 +-- + .../plugin/surefire/report/FileReporter.java | 2 +- + .../surefire/report/FileReporterUtils.java | 2 +- + .../surefire/report/StatelessXmlReporter.java | 8 ++--- + .../plugin/surefire/report/TestSetStats.java | 4 +-- + .../surefire/report/WrappedReportEntry.java | 2 +- + .../plugin/surefire/util/FileScanner.java | 2 +- + .../plugin/surefire/util/ScannerUtil.java | 2 +- + .../surefire/util/SpecificFileFilter.java | 2 +- + .../maven/surefire/stream/EventDecoder.java | 2 +- + .../surefire/AbstractSurefireMojoTest.java | 6 ++-- + .../plugin/surefire/SurefireHelperTest.java | 2 +- + .../booterclient/ForkConfigurationTest.java | 22 ++++++------- + .../booterclient/ForkStarterTest.java | 6 ++-- + .../JarManifestForkConfigurationTest.java | 2 +- + ...ModularClasspathForkConfigurationTest.java | 2 +- + .../lazytestprovider/CommandlineTest.java | 4 +-- + .../report/DefaultReporterFactoryTest.java | 2 +- + .../report/StatelessXmlReporterTest.java | 6 ++-- + .../surefire/report/TestSetStatsTest.java | 2 +- + .../StatelessTestsetInfoReporterTest.java | 2 +- + .../report/ConsoleOutputFileReporterTest.java | 2 +- + maven-surefire-report-plugin/pom.xml | 27 ++++++++++------ + pom.xml | 1 - + surefire-api/pom.xml | 18 ++++++++--- + .../maven/surefire/api/booter/Command.java | 2 +- + .../api/filter/SpecificTestClassFilter.java | 2 +- + .../api/report/CategorizedReportEntry.java | 2 +- + .../report/LegacyPojoStackTraceWriter.java | 2 +- + .../api/stream/AbstractStreamDecoder.java | 2 +- + .../surefire/api/testset/ResolvedTest.java | 14 ++++---- + .../api/testset/TestListResolver.java | 10 +++--- + .../api/util/DefaultDirectoryScanner.java | 4 +-- + .../api/util/internal/ClassMethod.java | 2 +- + .../api/util/internal/ObjectUtils.java | 4 +-- + .../api/util/internal/ObjectUtilsTest.java | 4 +-- + surefire-booter/pom.xml | 28 +++++++++++++--- + .../maven/surefire/booter/CommandReader.java | 4 +-- + .../maven/surefire/booter/ForkedBooter.java | 2 +- + .../maven/surefire/booter/PpidChecker.java | 10 +++--- + .../surefire/booter/ProcessCheckerType.java | 2 +- + .../surefire/booter/PropertiesWrapper.java | 2 +- + .../booter/SurefireBooterForkException.java | 2 +- + .../maven/surefire/booter/SystemUtils.java | 14 ++++---- + .../booter/stream/CommandDecoder.java | 2 +- + .../surefire/booter/ForkedBooterMockTest.java | 2 +- + .../booter/IsolatedClassLoaderTest.java | 2 +- + .../surefire/booter/NewClassLoaderRunner.java | 2 +- + .../surefire/booter/PpidCheckerTest.java | 4 +-- + .../surefire/booter/SystemUtilsTest.java | 12 +++---- + surefire-extensions-api/pom.xml | 14 +++++--- + .../extensions/ConsoleOutputReporter.java | 2 +- + .../extensions/StatelessReporter.java | 2 +- + .../extensions/util/CommandlineExecutor.java | 8 ++--- + .../extensions/CommandlineExecutorTest.java | 4 +-- + surefire-grouper/pom.xml | 4 +-- + surefire-providers/common-java5/pom.xml | 5 ++- + .../report/SmartStackTraceParser.java | 4 +-- + surefire-providers/common-junit4/pom.xml | 9 +++--- + .../junit4/JUnit4RunListenerFactory.java | 2 +- + surefire-providers/common-junit48/pom.xml | 9 +++--- + .../common/junit48/FilterFactory.java | 2 +- + .../common/junit48/FilterFactoryTest.java | 2 +- + .../surefire-junit-platform/pom.xml | 17 +++++++--- + .../junitplatform/JUnitPlatformProvider.java | 4 +-- + .../junitplatform/RunListenerAdapter.java | 2 +- + surefire-providers/surefire-junit3/pom.xml | 11 +++---- + .../surefire/junit/JUnitTestSetTest.java | 4 +-- + surefire-providers/surefire-testng/pom.xml | 9 +++--- + .../testng/TestNGDirectoryTestSuite.java | 2 +- + .../maven/surefire/testng/TestNGExecutor.java | 2 +- + surefire-report-parser/pom.xml | 5 +++ + 89 files changed, 283 insertions(+), 225 deletions(-) + +diff --git a/maven-failsafe-plugin/pom.xml b/maven-failsafe-plugin/pom.xml +index cc4d7c1c5..64d7b29a1 100644 +--- a/maven-failsafe-plugin/pom.xml ++++ b/maven-failsafe-plugin/pom.xml +@@ -45,6 +45,14 @@ + + + ++ ++ org.apache.commons ++ commons-lang3 ++ ++ ++ org.apache.maven.shared ++ maven-shared-utils ++ + + org.apache.maven.surefire + surefire-api +@@ -60,11 +68,6 @@ + surefire-extensions-api + ${project.version} + +- +- org.apache.maven.surefire +- surefire-shared-utils +- ${project.version} +- + + org.apache.maven.surefire + maven-surefire-common +diff --git a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java +index cef6391ec..546d963e8 100644 +--- a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java ++++ b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java +@@ -39,8 +39,8 @@ + import org.codehaus.plexus.logging.Logger; + + import static org.apache.maven.plugin.surefire.SurefireHelper.reportExecution; ++import static org.apache.maven.shared.utils.StringUtils.capitalizeFirstLetter; + import static org.apache.maven.surefire.api.suite.RunResult.noTestsRun; +-import static org.apache.maven.surefire.shared.utils.StringUtils.capitalizeFirstLetter; + + /** + * Verify integration tests ran using Failsafe. +diff --git a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/util/FailsafeSummaryXmlUtils.java b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/util/FailsafeSummaryXmlUtils.java +index ed39cc90a..8cdf31275 100644 +--- a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/util/FailsafeSummaryXmlUtils.java ++++ b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/util/FailsafeSummaryXmlUtils.java +@@ -39,9 +39,9 @@ + import static java.lang.String.format; + import static java.nio.charset.StandardCharsets.UTF_8; + import static javax.xml.xpath.XPathConstants.NODE; +-import static org.apache.maven.surefire.shared.lang3.StringEscapeUtils.escapeXml10; +-import static org.apache.maven.surefire.shared.lang3.StringEscapeUtils.unescapeXml; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; ++import static org.apache.commons.lang3.StringEscapeUtils.escapeXml10; ++import static org.apache.commons.lang3.StringEscapeUtils.unescapeXml; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; + + /** + * @author Tibor Digana (tibor17) +diff --git a/maven-surefire-common/pom.xml b/maven-surefire-common/pom.xml +index c14279b55..759766d67 100644 +--- a/maven-surefire-common/pom.xml ++++ b/maven-surefire-common/pom.xml +@@ -32,6 +32,28 @@ + API used in Surefire and Failsafe MOJO. + + ++ ++ org.powermock ++ powermock-reflect ++ test ++ ++ ++ org.hamcrest ++ hamcrest ++ test ++ ++ ++ org.apache.commons ++ commons-lang3 ++ ++ ++ org.apache.maven.shared ++ maven-shared-utils ++ ++ ++ org.apache.commons ++ commons-compress ++ + + org.apache.maven.surefire + surefire-api +@@ -113,16 +135,6 @@ + org.eclipse.sisu.plexus + provided + +- +- org.fusesource.jansi +- jansi +- provided +- +- +- org.apache.maven.surefire +- surefire-shared-utils +- ${surefire-shared-utils.version} +- + + com.google.code.findbugs + jsr305 +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java +index 67e0cb60f..3d082d6e8 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java +@@ -81,6 +81,7 @@ + import org.apache.maven.plugins.annotations.Parameter; + import org.apache.maven.project.MavenProject; + import org.apache.maven.shared.artifact.filter.PatternIncludesArtifactFilter; ++import org.apache.maven.shared.utils.io.FileUtils; + import org.apache.maven.surefire.api.booter.ProviderParameterNames; + import org.apache.maven.surefire.api.booter.Shutdown; + import org.apache.maven.surefire.api.cli.CommandLineOption; +@@ -110,7 +111,6 @@ + import org.apache.maven.surefire.providerapi.ProviderDetector; + import org.apache.maven.surefire.providerapi.ProviderInfo; + import org.apache.maven.surefire.providerapi.ProviderRequirements; +-import org.apache.maven.surefire.shared.utils.io.FileUtils; + import org.apache.maven.toolchain.DefaultToolchain; + import org.apache.maven.toolchain.Toolchain; + import org.apache.maven.toolchain.ToolchainManager; +@@ -129,12 +129,22 @@ + import static java.util.Collections.emptyList; + import static java.util.Collections.singletonList; + import static java.util.Collections.singletonMap; ++import static org.apache.commons.lang3.JavaVersion.JAVA_RECENT; ++import static org.apache.commons.lang3.StringUtils.substringBeforeLast; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.apache.maven.plugin.surefire.AbstractSurefireMojo.PluginFailureReason.COULD_NOT_RUN_DEFAULT_TESTS; + import static org.apache.maven.plugin.surefire.AbstractSurefireMojo.PluginFailureReason.COULD_NOT_RUN_SPECIFIED_TESTS; + import static org.apache.maven.plugin.surefire.AbstractSurefireMojo.PluginFailureReason.NONE; + import static org.apache.maven.plugin.surefire.SurefireDependencyResolver.isWithinVersionSpec; + import static org.apache.maven.plugin.surefire.SurefireHelper.replaceThreadNumberPlaceholders; + import static org.apache.maven.plugin.surefire.util.DependencyScanner.filter; ++import static org.apache.maven.shared.utils.StringUtils.capitalizeFirstLetter; ++import static org.apache.maven.shared.utils.StringUtils.isEmpty; ++import static org.apache.maven.shared.utils.StringUtils.isNotBlank; ++import static org.apache.maven.shared.utils.StringUtils.isNotEmpty; ++import static org.apache.maven.shared.utils.StringUtils.split; ++import static org.apache.maven.shared.utils.cli.ShutdownHookUtils.addShutDownHook; ++import static org.apache.maven.shared.utils.cli.ShutdownHookUtils.removeShutdownHook; + import static org.apache.maven.surefire.api.booter.ProviderParameterNames.EXCLUDE_JUNIT5_ENGINES_PROP; + import static org.apache.maven.surefire.api.booter.ProviderParameterNames.INCLUDE_JUNIT5_ENGINES_PROP; + import static org.apache.maven.surefire.api.suite.RunResult.failure; +@@ -145,16 +155,6 @@ + import static org.apache.maven.surefire.booter.SystemUtils.isJava9AtLeast; + import static org.apache.maven.surefire.booter.SystemUtils.toJdkHomeFromJvmExec; + import static org.apache.maven.surefire.booter.SystemUtils.toJdkVersionFromReleaseFile; +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_RECENT; +-import static org.apache.maven.surefire.shared.lang3.StringUtils.substringBeforeLast; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS; +-import static org.apache.maven.surefire.shared.utils.StringUtils.capitalizeFirstLetter; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isEmpty; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotBlank; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotEmpty; +-import static org.apache.maven.surefire.shared.utils.StringUtils.split; +-import static org.apache.maven.surefire.shared.utils.cli.ShutdownHookUtils.addShutDownHook; +-import static org.apache.maven.surefire.shared.utils.cli.ShutdownHookUtils.removeShutdownHook; + + /** + * Abstract base class for running tests using Surefire. +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/StartupReportConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/StartupReportConfiguration.java +index 89e6614f3..bffeb11af 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/StartupReportConfiguration.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/StartupReportConfiguration.java +@@ -41,10 +41,10 @@ + import org.apache.maven.surefire.extensions.StatelessTestsetInfoFileReportEventListener; + + import static java.nio.charset.StandardCharsets.UTF_8; ++import static org.apache.commons.lang3.StringUtils.trimToNull; + import static org.apache.maven.plugin.surefire.SurefireHelper.replaceForkThreadsInPath; + import static org.apache.maven.plugin.surefire.report.ConsoleReporter.BRIEF; + import static org.apache.maven.plugin.surefire.report.ConsoleReporter.PLAIN; +-import static org.apache.maven.surefire.shared.lang3.StringUtils.trimToNull; + + /** + * All the parameters used to construct reporters +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java +index 03158be67..1756fe6f2 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java +@@ -38,6 +38,7 @@ + import org.apache.maven.surefire.booter.SurefireBooterForkException; + + import static java.util.Collections.unmodifiableList; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.apache.maven.surefire.api.booter.DumpErrorSingleton.DUMPSTREAM_FILE_EXT; + import static org.apache.maven.surefire.api.booter.DumpErrorSingleton.DUMP_FILE_EXT; + import static org.apache.maven.surefire.api.cli.CommandLineOption.LOGGING_LEVEL_DEBUG; +@@ -46,7 +47,6 @@ + import static org.apache.maven.surefire.api.cli.CommandLineOption.LOGGING_LEVEL_WARN; + import static org.apache.maven.surefire.api.cli.CommandLineOption.SHOW_ERRORS; + import static org.apache.maven.surefire.api.util.internal.DumpFileUtils.newFormattedDateFileName; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS; + + /** + * Helper class for surefire plugins +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java +index 6aeef18f0..5259aff5a 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java +@@ -33,9 +33,9 @@ + import java.util.Properties; + import java.util.Set; + ++import org.apache.maven.shared.utils.StringUtils; + import org.apache.maven.surefire.booter.Classpath; + import org.apache.maven.surefire.booter.KeyValueSource; +-import org.apache.maven.surefire.shared.utils.StringUtils; + + import static java.util.Arrays.asList; + import static java.util.Map.Entry; +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/TestClassPath.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/TestClassPath.java +index d86910342..feb2b6025 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/TestClassPath.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/TestClassPath.java +@@ -28,7 +28,7 @@ + import org.apache.maven.surefire.booter.Classpath; + + import static java.util.Collections.addAll; +-import static org.apache.maven.surefire.shared.utils.StringUtils.split; ++import static org.apache.maven.shared.utils.StringUtils.split; + + final class TestClassPath { + private final Iterable artifacts; +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java +index 16b4800da..3fff286d2 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java +@@ -32,7 +32,7 @@ + import org.apache.maven.surefire.booter.SurefireBooterForkException; + import org.apache.maven.surefire.extensions.ForkNodeFactory; + +-import static org.apache.maven.surefire.shared.utils.StringUtils.join; ++import static org.apache.maven.shared.utils.StringUtils.join; + + /** + * @author Tibor Digana (tibor17) +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java +index d78f6807d..5c9056742 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java +@@ -31,13 +31,13 @@ + import org.apache.maven.plugin.surefire.JdkAttributes; + import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.Commandline; + import org.apache.maven.plugin.surefire.log.api.ConsoleLogger; ++import org.apache.maven.shared.utils.cli.CommandLineException; + import org.apache.maven.surefire.api.util.internal.ImmutableMap; + import org.apache.maven.surefire.booter.AbstractPathConfiguration; + import org.apache.maven.surefire.booter.Classpath; + import org.apache.maven.surefire.booter.StartupConfiguration; + import org.apache.maven.surefire.booter.SurefireBooterForkException; + import org.apache.maven.surefire.extensions.ForkNodeFactory; +-import org.apache.maven.surefire.shared.utils.cli.CommandLineException; + + import static org.apache.maven.plugin.surefire.SurefireHelper.replaceForkThreadsInPath; + import static org.apache.maven.plugin.surefire.SurefireHelper.replaceThreadNumberPlaceholders; +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java +index c612861eb..cf3278fb8 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java +@@ -95,6 +95,8 @@ + import static org.apache.maven.plugin.surefire.booterclient.ForkNumberBucket.drawNumber; + import static org.apache.maven.plugin.surefire.booterclient.ForkNumberBucket.returnNumber; + import static org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestLessInputStream.TestLessInputStreamBuilder; ++import static org.apache.maven.shared.utils.cli.ShutdownHookUtils.addShutDownHook; ++import static org.apache.maven.shared.utils.cli.ShutdownHookUtils.removeShutdownHook; + import static org.apache.maven.surefire.api.cli.CommandLineOption.SHOW_ERRORS; + import static org.apache.maven.surefire.api.suite.RunResult.SUCCESS; + import static org.apache.maven.surefire.api.suite.RunResult.failure; +@@ -104,8 +106,6 @@ + import static org.apache.maven.surefire.api.util.internal.DaemonThreadFactory.newDaemonThreadFactory; + import static org.apache.maven.surefire.api.util.internal.StringUtils.NL; + import static org.apache.maven.surefire.booter.SystemPropertyManager.writePropertiesFile; +-import static org.apache.maven.surefire.shared.utils.cli.ShutdownHookUtils.addShutDownHook; +-import static org.apache.maven.surefire.shared.utils.cli.ShutdownHookUtils.removeShutdownHook; + + /** + * Starts the fork or runs in-process. +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java +index a13de8fb8..3ea47f1cf 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java +@@ -38,6 +38,9 @@ + import java.util.jar.Manifest; + import java.util.zip.Deflater; + ++import org.apache.commons.compress.archivers.zip.Zip64Mode; ++import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; ++import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; + import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.Commandline; + import org.apache.maven.plugin.surefire.booterclient.output.InPluginProcessDumpSingleton; + import org.apache.maven.plugin.surefire.log.api.ConsoleLogger; +@@ -46,17 +49,14 @@ + import org.apache.maven.surefire.booter.StartupConfiguration; + import org.apache.maven.surefire.booter.SurefireBooterForkException; + import org.apache.maven.surefire.extensions.ForkNodeFactory; +-import org.apache.maven.surefire.shared.compress.archivers.zip.Zip64Mode; +-import org.apache.maven.surefire.shared.compress.archivers.zip.ZipArchiveEntry; +-import org.apache.maven.surefire.shared.compress.archivers.zip.ZipArchiveOutputStream; + + import static java.nio.charset.StandardCharsets.UTF_8; + import static java.nio.file.Files.isDirectory; + import static org.apache.maven.plugin.surefire.SurefireHelper.escapeToPlatformPath; + import static org.apache.maven.plugin.surefire.booterclient.JarManifestForkConfiguration.ClasspathElementUri.absolute; + import static org.apache.maven.plugin.surefire.booterclient.JarManifestForkConfiguration.ClasspathElementUri.relative; ++import static org.apache.maven.shared.utils.StringUtils.isNotBlank; + import static org.apache.maven.surefire.api.util.internal.StringUtils.NL; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotBlank; + + /** + * @author Tibor Digana (tibor17) +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java +index 5a2576117..ef13fdb8d 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java +@@ -45,8 +45,8 @@ + + import static java.io.File.pathSeparatorChar; + import static org.apache.maven.plugin.surefire.SurefireHelper.escapeToPlatformPath; ++import static org.apache.maven.shared.utils.StringUtils.replace; + import static org.apache.maven.surefire.api.util.internal.StringUtils.NL; +-import static org.apache.maven.surefire.shared.utils.StringUtils.replace; + + /** + * @author Tibor Digana (tibor17) +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/Commandline.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/Commandline.java +index 651e80ca3..4377d5c40 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/Commandline.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/Commandline.java +@@ -24,16 +24,16 @@ + import java.util.Set; + import java.util.concurrent.ConcurrentLinkedDeque; + +-import org.apache.maven.surefire.shared.utils.cli.CommandLineUtils; ++import org.apache.maven.shared.utils.cli.CommandLineUtils; + + import static java.util.Collections.addAll; + + /** +- * A {@link org.apache.maven.surefire.shared.utils.cli.Commandline} implementation. ++ * A {@link org.apache.maven.shared.utils.cli.Commandline} implementation. + * + * @author Andreas Gudian + */ +-public class Commandline extends org.apache.maven.surefire.shared.utils.cli.Commandline { ++public class Commandline extends org.apache.maven.shared.utils.cli.Commandline { + private final Collection excludedEnvironmentVariables; + private final Set addedEnvironmentVariables; + +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java +index c58d3ee16..03d4b8f41 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java +@@ -55,13 +55,13 @@ + import static java.nio.channels.AsynchronousChannelGroup.withThreadPool; + import static java.nio.channels.AsynchronousServerSocketChannel.open; + import static java.nio.charset.StandardCharsets.US_ASCII; ++import static org.apache.commons.lang3.StringUtils.isBlank; ++import static org.apache.commons.lang3.StringUtils.isNotBlank; + import static org.apache.maven.surefire.api.util.internal.Channels.newBufferedChannel; + import static org.apache.maven.surefire.api.util.internal.Channels.newChannel; + import static org.apache.maven.surefire.api.util.internal.Channels.newInputStream; + import static org.apache.maven.surefire.api.util.internal.Channels.newOutputStream; + import static org.apache.maven.surefire.api.util.internal.DaemonThreadFactory.newDaemonThreadFactory; +-import static org.apache.maven.surefire.shared.lang3.StringUtils.isBlank; +-import static org.apache.maven.surefire.shared.lang3.StringUtils.isNotBlank; + + /** + * The TCP/IP server accepting only one client connection. The forked JVM connects to the server using the +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleReporter.java +index f6645e6ca..325b49719 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleReporter.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleReporter.java +@@ -22,13 +22,13 @@ + + import org.apache.maven.plugin.surefire.log.api.ConsoleLogger; + import org.apache.maven.plugin.surefire.log.api.Level; ++import org.apache.maven.shared.utils.logging.MessageBuilder; + import org.apache.maven.surefire.api.report.TestSetReportEntry; + import org.apache.maven.surefire.extensions.StatelessTestsetInfoConsoleReportEventListener; +-import org.apache.maven.surefire.shared.utils.logging.MessageBuilder; + + import static org.apache.maven.plugin.surefire.log.api.Level.resolveLevel; + import static org.apache.maven.plugin.surefire.report.TestSetStats.concatenateWithTestGroup; +-import static org.apache.maven.surefire.shared.utils.logging.MessageUtils.buffer; ++import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; + + /** + * Base class for console reporters. +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java +index cde479eac..1984912e2 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java +@@ -31,6 +31,7 @@ + import org.apache.maven.plugin.surefire.log.api.ConsoleLogger; + import org.apache.maven.plugin.surefire.log.api.Level; + import org.apache.maven.plugin.surefire.runorder.StatisticsReporter; ++import org.apache.maven.shared.utils.logging.MessageBuilder; + import org.apache.maven.surefire.api.report.ReporterFactory; + import org.apache.maven.surefire.api.report.StackTraceWriter; + import org.apache.maven.surefire.api.report.TestOutputReportEntry; +@@ -41,7 +42,6 @@ + import org.apache.maven.surefire.extensions.StatelessTestsetInfoConsoleReportEventListener; + import org.apache.maven.surefire.extensions.StatelessTestsetInfoFileReportEventListener; + import org.apache.maven.surefire.report.RunStatistics; +-import org.apache.maven.surefire.shared.utils.logging.MessageBuilder; + + import static org.apache.maven.plugin.surefire.log.api.Level.resolveLevel; + import static org.apache.maven.plugin.surefire.report.ConsoleReporter.PLAIN; +@@ -54,8 +54,8 @@ + import static org.apache.maven.plugin.surefire.report.ReportEntryType.ERROR; + import static org.apache.maven.plugin.surefire.report.ReportEntryType.FAILURE; + import static org.apache.maven.plugin.surefire.report.ReportEntryType.SUCCESS; ++import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; + import static org.apache.maven.surefire.api.util.internal.ObjectUtils.useNonNull; +-import static org.apache.maven.surefire.shared.utils.logging.MessageUtils.buffer; + + /** + * Provides reporting modules on the plugin side. +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporter.java +index dfafeb531..8f2c137b7 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporter.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporter.java +@@ -31,7 +31,7 @@ + import org.apache.maven.surefire.extensions.StatelessTestsetInfoFileReportEventListener; + + import static org.apache.maven.plugin.surefire.report.FileReporterUtils.stripIllegalFilenameChars; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotBlank; ++import static org.apache.maven.shared.utils.StringUtils.isNotBlank; + + /** + * Base class for file reporters. +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java +index fb54edaeb..aebd48e01 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java +@@ -18,7 +18,7 @@ + */ + package org.apache.maven.plugin.surefire.report; + +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS; + + /** + * Utils class for file-based reporters +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java +index 7724b1210..ef6a5e9d2 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java +@@ -36,18 +36,18 @@ + import java.util.concurrent.ConcurrentLinkedDeque; + + import org.apache.maven.plugin.surefire.booterclient.output.InPluginProcessDumpSingleton; ++import org.apache.maven.shared.utils.xml.PrettyPrintXMLWriter; ++import org.apache.maven.shared.utils.xml.XMLWriter; + import org.apache.maven.surefire.api.report.SafeThrowable; + import org.apache.maven.surefire.extensions.StatelessReportEventListener; +-import org.apache.maven.surefire.shared.utils.xml.PrettyPrintXMLWriter; +-import org.apache.maven.surefire.shared.utils.xml.XMLWriter; + + import static java.nio.charset.StandardCharsets.UTF_8; + import static org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType; + import static org.apache.maven.plugin.surefire.report.FileReporterUtils.stripIllegalFilenameChars; + import static org.apache.maven.plugin.surefire.report.ReportEntryType.SKIPPED; + import static org.apache.maven.plugin.surefire.report.ReportEntryType.SUCCESS; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotBlank; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.StringUtils.isNotBlank; + + // CHECKSTYLE_OFF: LineLength + /** +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java +index 1431d8fde..e29e4275d 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java +@@ -24,11 +24,11 @@ + import java.util.Queue; + import java.util.concurrent.ConcurrentLinkedQueue; + ++import org.apache.maven.shared.utils.logging.MessageBuilder; + import org.apache.maven.surefire.api.report.ReportEntry; +-import org.apache.maven.surefire.shared.utils.logging.MessageBuilder; + ++import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; + import static org.apache.maven.surefire.api.report.CategorizedReportEntry.GROUP_PREFIX; +-import static org.apache.maven.surefire.shared.utils.logging.MessageUtils.buffer; + + /** + * Maintains per-thread test result state. Not thread safe. +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/WrappedReportEntry.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/WrappedReportEntry.java +index f661a003f..f88fbe6fb 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/WrappedReportEntry.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/WrappedReportEntry.java +@@ -31,8 +31,8 @@ + import org.apache.maven.surefire.api.report.TestSetReportEntry; + + import static java.util.Collections.unmodifiableMap; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; + import static org.apache.maven.surefire.api.util.internal.StringUtils.NL; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; + + /** + * @author Kristian Rosenvold +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/FileScanner.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/FileScanner.java +index 48d72f230..a525edbed 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/FileScanner.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/FileScanner.java +@@ -23,7 +23,7 @@ + + import org.apache.maven.surefire.api.testset.TestFilter; + +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; + + final class FileScanner { + private final File basedir; +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/ScannerUtil.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/ScannerUtil.java +index 7541db72c..004dce86f 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/ScannerUtil.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/ScannerUtil.java +@@ -20,7 +20,7 @@ + + import javax.annotation.Nonnull; + +-import org.apache.maven.surefire.shared.lang3.StringUtils; ++import org.apache.commons.lang3.StringUtils; + + final class ScannerUtil { + +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/SpecificFileFilter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/SpecificFileFilter.java +index 8246180dc..94aced9ee 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/SpecificFileFilter.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/SpecificFileFilter.java +@@ -23,7 +23,7 @@ + import java.util.HashSet; + import java.util.Set; + +-import org.apache.maven.surefire.shared.utils.io.SelectorUtils; ++import org.apache.maven.shared.utils.io.SelectorUtils; + + import static org.apache.maven.plugin.surefire.util.ScannerUtil.convertSlashToSystemFileSeparator; + +diff --git a/maven-surefire-common/src/main/java/org/apache/maven/surefire/stream/EventDecoder.java b/maven-surefire-common/src/main/java/org/apache/maven/surefire/stream/EventDecoder.java +index 0bfc1e26b..f03a83d7a 100644 +--- a/maven-surefire-common/src/main/java/org/apache/maven/surefire/stream/EventDecoder.java ++++ b/maven-surefire-common/src/main/java/org/apache/maven/surefire/stream/EventDecoder.java +@@ -64,6 +64,7 @@ + import org.apache.maven.surefire.api.stream.SegmentType; + + import static java.util.Collections.emptyMap; ++import static org.apache.maven.shared.utils.cli.ShutdownHookUtils.addShutDownHook; + import static org.apache.maven.surefire.api.booter.Constants.MAGIC_NUMBER_FOR_EVENTS_BYTES; + import static org.apache.maven.surefire.api.report.CategorizedReportEntry.reportEntry; + import static org.apache.maven.surefire.api.stream.SegmentType.DATA_INTEGER; +@@ -72,7 +73,6 @@ + import static org.apache.maven.surefire.api.stream.SegmentType.RUN_MODE; + import static org.apache.maven.surefire.api.stream.SegmentType.STRING_ENCODING; + import static org.apache.maven.surefire.api.stream.SegmentType.TEST_RUN_ID; +-import static org.apache.maven.surefire.shared.utils.cli.ShutdownHookUtils.addShutDownHook; + + /** + * +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java +index 1af67c838..da890b8e5 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java +@@ -91,12 +91,12 @@ + import static java.util.Collections.emptyMap; + import static java.util.Collections.singleton; + import static java.util.Collections.singletonList; ++import static org.apache.commons.lang3.JavaVersion.JAVA_9; ++import static org.apache.commons.lang3.JavaVersion.JAVA_RECENT; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.apache.maven.artifact.ArtifactUtils.artifactMapByVersionlessId; + import static org.apache.maven.artifact.versioning.VersionRange.createFromVersion; + import static org.apache.maven.artifact.versioning.VersionRange.createFromVersionSpec; +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_9; +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_RECENT; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.assertj.core.api.Assertions.assertThat; + import static org.codehaus.plexus.languages.java.jpms.ModuleNameSource.MODULEDESCRIPTOR; + import static org.mockito.ArgumentMatchers.any; +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefireHelperTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefireHelperTest.java +index 7e3a64a43..4f03966c9 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefireHelperTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefireHelperTest.java +@@ -37,9 +37,9 @@ + + import static java.util.Collections.addAll; + import static java.util.Collections.singleton; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.apache.maven.plugin.surefire.SurefireHelper.escapeToPlatformPath; + import static org.apache.maven.plugin.surefire.SurefireHelper.reportExecution; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.assertj.core.api.Assertions.assertThat; + import static org.hamcrest.Matchers.containsString; + import static org.junit.Assume.assumeTrue; +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java +index c6d7330ca..de4bc121c 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java +@@ -52,10 +52,10 @@ + import static java.nio.file.Files.readAllBytes; + import static java.util.Collections.singletonList; + import static org.apache.commons.io.FileUtils.getTempDirectory; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.apache.maven.surefire.api.util.internal.StringUtils.NL; + import static org.apache.maven.surefire.booter.Classpath.emptyClasspath; + import static org.apache.maven.surefire.booter.ProcessCheckerType.ALL; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.assertj.core.api.Assertions.assertThat; + import static org.junit.Assert.assertEquals; + import static org.junit.Assert.assertTrue; +@@ -137,8 +137,7 @@ protected void resolveClasspath( + ClassLoaderConfiguration clc = new ClassLoaderConfiguration(true, true); + StartupConfiguration startup = new StartupConfiguration("cls", cpConfig, clc, ALL, providerJpmsArgs); + +- org.apache.maven.surefire.shared.utils.cli.Commandline cli = +- config.createCommandLine(startup, 1, getTempDirectory()); ++ org.apache.maven.shared.utils.cli.Commandline cli = config.createCommandLine(startup, 1, getTempDirectory()); + + assertThat(cli.getEnvironmentVariables()) + .contains("key1=val1", "key2=val2", "key3=val3") +@@ -191,7 +190,7 @@ protected void resolveClasspath( + ClassLoaderConfiguration clc = new ClassLoaderConfiguration(true, true); + StartupConfiguration startup = new StartupConfiguration("cls", cpConfig, clc, ALL, providerJpmsArgs); + +- org.apache.maven.surefire.shared.utils.cli.Commandline cliFork1 = ++ org.apache.maven.shared.utils.cli.Commandline cliFork1 = + config.createCommandLine(startup, 1, getTempDirectory()); + + assertThat(cliFork1.getEnvironmentVariables()) +@@ -199,7 +198,7 @@ protected void resolveClasspath( + .doesNotContain("PATH=") + .doesNotHaveDuplicates(); + +- org.apache.maven.surefire.shared.utils.cli.Commandline cliFork2 = ++ org.apache.maven.shared.utils.cli.Commandline cliFork2 = + config.createCommandLine(startup, 2, getTempDirectory()); + + assertThat(cliFork2.getEnvironmentVariables()) +@@ -241,8 +240,7 @@ public void testCliArgs() throws Exception { + ClassLoaderConfiguration clc = new ClassLoaderConfiguration(true, true); + StartupConfiguration startup = new StartupConfiguration("cls", cpConfig, clc, ALL, providerJpmsArgs); + +- org.apache.maven.surefire.shared.utils.cli.Commandline cli = +- config.createCommandLine(startup, 1, getTempDirectory()); ++ org.apache.maven.shared.utils.cli.Commandline cli = config.createCommandLine(startup, 1, getTempDirectory()); + String cliAsString = cli.toString(); + + assertThat(cliAsString).contains("arg1"); +@@ -316,8 +314,7 @@ protected void resolveClasspath( + + assertThat(startup.isShadefire()).isFalse(); + +- org.apache.maven.surefire.shared.utils.cli.Commandline cli = +- config.createCommandLine(startup, 1, getTempDirectory()); ++ org.apache.maven.shared.utils.cli.Commandline cli = config.createCommandLine(startup, 1, getTempDirectory()); + + assertThat(cli.toString()).contains("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"); + } +@@ -336,8 +333,7 @@ public void testCreateCommandLine_UseSystemClassLoaderForkOnce_ShouldConstructMa + StartupConfiguration startup = + new StartupConfiguration("", cpConfig, clc, ALL, Collections.emptyList()); + +- org.apache.maven.surefire.shared.utils.cli.Commandline cli = +- config.createCommandLine(startup, 1, getTempDirectory()); ++ org.apache.maven.shared.utils.cli.Commandline cli = config.createCommandLine(startup, 1, getTempDirectory()); + + String line = join(" ", cli.getCommandline()); + assertTrue(line.contains("-jar")); +@@ -356,7 +352,7 @@ public void testArglineWithNewline() throws IOException, SurefireBooterForkExcep + StartupConfiguration startup = + new StartupConfiguration("", cpConfig, clc, ALL, Collections.emptyList()); + +- org.apache.maven.surefire.shared.utils.cli.Commandline commandLine = ++ org.apache.maven.shared.utils.cli.Commandline commandLine = + config.createCommandLine(startup, 1, getTempDirectory()); + assertThat(commandLine.toString()).contains(IS_OS_WINDOWS ? "abc def" : "'abc' 'def'"); + } +@@ -372,7 +368,7 @@ public void testCurrentWorkingDirectoryPropagationIncludingForkNumberExpansion() + StartupConfiguration startup = + new StartupConfiguration("", cpConfig, clc, ALL, Collections.emptyList()); + ForkConfiguration config = getForkConfiguration(cwd.getCanonicalFile()); +- org.apache.maven.surefire.shared.utils.cli.Commandline commandLine = ++ org.apache.maven.shared.utils.cli.Commandline commandLine = + config.createCommandLine(startup, 1, getTempDirectory()); + + File forkDirectory = new File(basedir, "fork_1"); +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkStarterTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkStarterTest.java +index b16765038..c7fe40d99 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkStarterTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkStarterTest.java +@@ -29,6 +29,9 @@ + import java.util.jar.Manifest; + import java.util.zip.Deflater; + ++import org.apache.commons.compress.archivers.zip.Zip64Mode; ++import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; ++import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; + import org.apache.maven.plugin.surefire.StartupReportConfiguration; + import org.apache.maven.plugin.surefire.SurefireProperties; + import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractCommandReader; +@@ -53,9 +56,6 @@ + import org.apache.maven.surefire.booter.StartupConfiguration; + import org.apache.maven.surefire.booter.SurefireBooterForkException; + import org.apache.maven.surefire.extensions.ForkNodeFactory; +-import org.apache.maven.surefire.shared.compress.archivers.zip.Zip64Mode; +-import org.apache.maven.surefire.shared.compress.archivers.zip.ZipArchiveEntry; +-import org.apache.maven.surefire.shared.compress.archivers.zip.ZipArchiveOutputStream; + import org.junit.AfterClass; + import org.junit.BeforeClass; + import org.junit.Rule; +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfigurationTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfigurationTest.java +index 9a9bf430f..6c62389ff 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfigurationTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfigurationTest.java +@@ -40,11 +40,11 @@ + import org.powermock.modules.junit4.PowerMockRunnerDelegate; + + import static java.nio.charset.StandardCharsets.UTF_8; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.apache.maven.plugin.surefire.booterclient.JarManifestForkConfiguration.escapeUri; + import static org.apache.maven.plugin.surefire.booterclient.JarManifestForkConfiguration.relativize; + import static org.apache.maven.plugin.surefire.booterclient.JarManifestForkConfiguration.toAbsoluteUri; + import static org.apache.maven.plugin.surefire.booterclient.JarManifestForkConfiguration.toClasspathElementUri; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.assertj.core.api.Assertions.assertThat; + import static org.assertj.core.util.Files.delete; + import static org.assertj.core.util.Files.newTemporaryFolder; +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfigurationTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfigurationTest.java +index fbf3e54fd..addf0fcdd 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfigurationTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfigurationTest.java +@@ -43,8 +43,8 @@ + import static java.nio.file.Files.readAllLines; + import static java.util.Arrays.asList; + import static java.util.Collections.singleton; ++import static org.apache.maven.shared.utils.StringUtils.replace; + import static org.apache.maven.surefire.booter.Classpath.emptyClasspath; +-import static org.apache.maven.surefire.shared.utils.StringUtils.replace; + import static org.assertj.core.api.Assertions.assertThat; + import static org.mockito.Mockito.mock; + +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/CommandlineTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/CommandlineTest.java +index 2ebcd3e85..e89f4dc85 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/CommandlineTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/CommandlineTest.java +@@ -18,11 +18,11 @@ + */ + package org.apache.maven.plugin.surefire.booterclient.lazytestprovider; + +-import org.apache.maven.surefire.shared.utils.cli.CommandLineException; ++import org.apache.maven.shared.utils.cli.CommandLineException; + import org.assertj.core.api.Condition; + import org.junit.Test; + +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.assertj.core.api.Assertions.assertThat; + + /** +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactoryTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactoryTest.java +index 484d71798..23e40892c 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactoryTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactoryTest.java +@@ -32,13 +32,13 @@ + import org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter; + import org.apache.maven.plugin.surefire.log.api.ConsoleLogger; + import org.apache.maven.plugin.surefire.report.DefaultReporterFactory.TestResultType; ++import org.apache.maven.shared.utils.logging.MessageUtils; + import org.apache.maven.surefire.api.report.SafeThrowable; + import org.apache.maven.surefire.api.report.StackTraceWriter; + import org.apache.maven.surefire.api.report.TestOutputReportEntry; + import org.apache.maven.surefire.api.report.TestReportListener; + import org.apache.maven.surefire.api.suite.RunResult; + import org.apache.maven.surefire.report.RunStatistics; +-import org.apache.maven.surefire.shared.utils.logging.MessageUtils; + + import static java.nio.charset.StandardCharsets.UTF_8; + import static java.util.Arrays.asList; +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java +index 362facb15..5501f259c 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java +@@ -34,22 +34,22 @@ + + import junit.framework.TestCase; + import org.apache.maven.plugin.surefire.booterclient.output.DeserializedStacktraceWriter; ++import org.apache.maven.shared.utils.xml.Xpp3Dom; ++import org.apache.maven.shared.utils.xml.Xpp3DomBuilder; + import org.apache.maven.surefire.api.report.ReportEntry; + import org.apache.maven.surefire.api.report.SimpleReportEntry; + import org.apache.maven.surefire.api.report.StackTraceWriter; +-import org.apache.maven.surefire.shared.utils.xml.Xpp3Dom; +-import org.apache.maven.surefire.shared.utils.xml.Xpp3DomBuilder; + + import static java.nio.charset.StandardCharsets.UTF_8; + import static java.nio.file.Files.readAllLines; + import static org.apache.maven.plugin.surefire.report.ReportEntryType.ERROR; + import static org.apache.maven.plugin.surefire.report.ReportEntryType.SKIPPED; + import static org.apache.maven.plugin.surefire.report.ReportEntryType.SUCCESS; ++import static org.apache.maven.shared.utils.StringUtils.isEmpty; + import static org.apache.maven.surefire.api.report.RunMode.NORMAL_RUN; + import static org.apache.maven.surefire.api.report.RunMode.RERUN_TEST_AFTER_FAILURE; + import static org.apache.maven.surefire.api.util.internal.ObjectUtils.systemProps; + import static org.apache.maven.surefire.api.util.internal.StringUtils.NL; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isEmpty; + import static org.assertj.core.api.Assertions.assertThat; + import static org.mockito.Mockito.doThrow; + import static org.mockito.Mockito.mock; +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/TestSetStatsTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/TestSetStatsTest.java +index f7cab66e7..b93e92c57 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/TestSetStatsTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/TestSetStatsTest.java +@@ -25,7 +25,7 @@ + import org.powermock.core.classloader.annotations.PowerMockIgnore; + import org.powermock.modules.junit4.PowerMockRunner; + +-import static org.apache.maven.surefire.shared.utils.logging.MessageUtils.buffer; ++import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; + import static org.assertj.core.api.Assertions.assertThat; + import static org.mockito.Mockito.atLeastOnce; + import static org.mockito.Mockito.times; +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/surefire/extensions/StatelessTestsetInfoReporterTest.java b/maven-surefire-common/src/test/java/org/apache/maven/surefire/extensions/StatelessTestsetInfoReporterTest.java +index 0c2a98a50..66a9cc144 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/surefire/extensions/StatelessTestsetInfoReporterTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/surefire/extensions/StatelessTestsetInfoReporterTest.java +@@ -30,8 +30,8 @@ + import org.apache.maven.plugin.surefire.report.FileReporter; + import org.apache.maven.plugin.surefire.report.TestSetStats; + import org.apache.maven.plugin.surefire.report.WrappedReportEntry; ++import org.apache.maven.shared.utils.logging.MessageUtils; + import org.apache.maven.surefire.api.report.TestSetReportEntry; +-import org.apache.maven.surefire.shared.utils.logging.MessageUtils; + import org.junit.Test; + import org.junit.runner.RunWith; + import org.mockito.ArgumentCaptor; +diff --git a/maven-surefire-common/src/test/java/org/apache/maven/surefire/report/ConsoleOutputFileReporterTest.java b/maven-surefire-common/src/test/java/org/apache/maven/surefire/report/ConsoleOutputFileReporterTest.java +index ca9382fb5..9f671e5be 100644 +--- a/maven-surefire-common/src/test/java/org/apache/maven/surefire/report/ConsoleOutputFileReporterTest.java ++++ b/maven-surefire-common/src/test/java/org/apache/maven/surefire/report/ConsoleOutputFileReporterTest.java +@@ -27,10 +27,10 @@ + + import junit.framework.TestCase; + import org.apache.maven.plugin.surefire.report.ConsoleOutputFileReporter; ++import org.apache.maven.shared.utils.io.FileUtils; + import org.apache.maven.surefire.api.report.SimpleReportEntry; + import org.apache.maven.surefire.api.report.TestOutputReportEntry; + import org.apache.maven.surefire.api.report.TestSetReportEntry; +-import org.apache.maven.surefire.shared.utils.io.FileUtils; + + import static java.nio.charset.StandardCharsets.US_ASCII; + import static org.apache.maven.surefire.api.report.RunMode.NORMAL_RUN; +diff --git a/maven-surefire-report-plugin/pom.xml b/maven-surefire-report-plugin/pom.xml +index d709b6e5c..d96bc29c7 100644 +--- a/maven-surefire-report-plugin/pom.xml ++++ b/maven-surefire-report-plugin/pom.xml +@@ -50,6 +50,24 @@ + + + ++ ++ org.hamcrest ++ hamcrest ++ 3.0 ++ test ++ ++ ++ org.apache.maven.doxia ++ doxia-module-xhtml5 ++ 2.0.0-M12 ++ test ++ ++ ++ org.apache.maven.doxia ++ doxia-integration-tools ++ 2.0.0-M19 ++ test ++ + + org.apache.maven.surefire + surefire-logger-api +@@ -116,10 +134,6 @@ + maven-reporting-impl + 4.0.0-M15 + +- +- org.codehaus.plexus +- plexus-xml +- + + org.codehaus.plexus + plexus-i18n +@@ -130,11 +144,6 @@ + plexus-interpolation + 1.27 + +- +- org.fusesource.jansi +- jansi +- provided +- + + commons-io + commons-io +diff --git a/pom.xml b/pom.xml +index 75a61b38e..a185963ad 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -48,7 +48,6 @@ + + + +- surefire-shared-utils + surefire-logger-api + surefire-api + surefire-extensions-api +diff --git a/surefire-api/pom.xml b/surefire-api/pom.xml +index d302fb2b3..7aae337df 100644 +--- a/surefire-api/pom.xml ++++ b/surefire-api/pom.xml +@@ -33,14 +33,22 @@ + + + +- org.apache.maven.surefire +- surefire-logger-api +- ${project.version} ++ org.hamcrest ++ hamcrest ++ test ++ ++ ++ org.apache.commons ++ commons-lang3 ++ ++ ++ org.apache.maven.shared ++ maven-shared-utils + + + org.apache.maven.surefire +- surefire-shared-utils +- ${surefire-shared-utils.version} ++ surefire-logger-api ++ ${project.version} + + + com.google.code.findbugs +diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/Command.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/Command.java +index df86fee54..9c30bdd8f 100644 +--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/Command.java ++++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/Command.java +@@ -21,7 +21,7 @@ + import java.util.Objects; + + import static java.util.Objects.requireNonNull; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; + + /** + * Encapsulates data and command sent from master to forked process. +diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/filter/SpecificTestClassFilter.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/filter/SpecificTestClassFilter.java +index 5efc91c17..7027b8a79 100644 +--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/filter/SpecificTestClassFilter.java ++++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/filter/SpecificTestClassFilter.java +@@ -22,8 +22,8 @@ + import java.util.HashSet; + import java.util.Set; + ++import org.apache.maven.shared.utils.io.SelectorUtils; + import org.apache.maven.surefire.api.util.ScannerFilter; +-import org.apache.maven.surefire.shared.utils.io.SelectorUtils; + + /** + * Filter for test class files +diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/report/CategorizedReportEntry.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/report/CategorizedReportEntry.java +index 4dc6d7f2a..69ae007e3 100644 +--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/report/CategorizedReportEntry.java ++++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/report/CategorizedReportEntry.java +@@ -25,7 +25,7 @@ + import java.util.Map; + import java.util.Objects; + +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; + + /** + * @author Kristian Rosenvold +diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java +index 21466f41b..219f9bd6f 100644 +--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java ++++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java +@@ -23,7 +23,7 @@ + + import org.apache.maven.surefire.api.util.internal.StringUtils; + +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotEmpty; ++import static org.apache.maven.shared.utils.StringUtils.isNotEmpty; + + /** + * Write the trace out for a POJO test. Java 1.5 compatible. +diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/stream/AbstractStreamDecoder.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/stream/AbstractStreamDecoder.java +index 400f74f6c..744a9c7d5 100644 +--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/stream/AbstractStreamDecoder.java ++++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/stream/AbstractStreamDecoder.java +@@ -43,10 +43,10 @@ + import static java.nio.charset.CodingErrorAction.REPLACE; + import static java.nio.charset.StandardCharsets.US_ASCII; + import static java.util.Arrays.copyOf; ++import static org.apache.commons.lang3.StringUtils.isBlank; + import static org.apache.maven.surefire.api.booter.Constants.DEFAULT_STREAM_ENCODING; + import static org.apache.maven.surefire.api.stream.AbstractStreamDecoder.StreamReadStatus.OVERFLOW; + import static org.apache.maven.surefire.api.stream.AbstractStreamDecoder.StreamReadStatus.UNDERFLOW; +-import static org.apache.maven.surefire.shared.lang3.StringUtils.isBlank; + + /** + * @param message object +diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/testset/ResolvedTest.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/testset/ResolvedTest.java +index 9e976c291..6168ea5db 100644 +--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/testset/ResolvedTest.java ++++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/testset/ResolvedTest.java +@@ -20,16 +20,16 @@ + + import java.util.regex.Pattern; + +-import org.apache.maven.surefire.shared.utils.StringUtils; +-import org.apache.maven.surefire.shared.utils.io.MatchPatterns; ++import org.apache.maven.shared.utils.StringUtils; ++import org.apache.maven.shared.utils.io.MatchPatterns; + + import static java.io.File.separatorChar; + import static java.util.regex.Pattern.compile; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; +-import static org.apache.maven.surefire.shared.utils.io.MatchPatterns.from; +-import static org.apache.maven.surefire.shared.utils.io.SelectorUtils.PATTERN_HANDLER_SUFFIX; +-import static org.apache.maven.surefire.shared.utils.io.SelectorUtils.REGEX_HANDLER_PREFIX; +-import static org.apache.maven.surefire.shared.utils.io.SelectorUtils.matchPath; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.io.MatchPatterns.from; ++import static org.apache.maven.shared.utils.io.SelectorUtils.PATTERN_HANDLER_SUFFIX; ++import static org.apache.maven.shared.utils.io.SelectorUtils.REGEX_HANDLER_PREFIX; ++import static org.apache.maven.shared.utils.io.SelectorUtils.matchPath; + + /** + * Single pattern test filter resolved from multi pattern filter -Dtest=MyTest#test,AnotherTest#otherTest. +diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/testset/TestListResolver.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/testset/TestListResolver.java +index ab8938dc2..3d213410d 100644 +--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/testset/TestListResolver.java ++++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/testset/TestListResolver.java +@@ -26,13 +26,13 @@ + + import static java.util.Collections.singleton; + import static java.util.Collections.unmodifiableSet; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.StringUtils.isNotBlank; ++import static org.apache.maven.shared.utils.StringUtils.split; ++import static org.apache.maven.shared.utils.io.SelectorUtils.PATTERN_HANDLER_SUFFIX; ++import static org.apache.maven.shared.utils.io.SelectorUtils.REGEX_HANDLER_PREFIX; + import static org.apache.maven.surefire.api.testset.ResolvedTest.Type.CLASS; + import static org.apache.maven.surefire.api.testset.ResolvedTest.Type.METHOD; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotBlank; +-import static org.apache.maven.surefire.shared.utils.StringUtils.split; +-import static org.apache.maven.surefire.shared.utils.io.SelectorUtils.PATTERN_HANDLER_SUFFIX; +-import static org.apache.maven.surefire.shared.utils.io.SelectorUtils.REGEX_HANDLER_PREFIX; + + // TODO In Surefire 3.0 see SUREFIRE-1309 and use normal fully qualified class name regex instead. + /** +diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/util/DefaultDirectoryScanner.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/util/DefaultDirectoryScanner.java +index c4d4bb342..12a48e719 100644 +--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/util/DefaultDirectoryScanner.java ++++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/util/DefaultDirectoryScanner.java +@@ -95,8 +95,8 @@ private static Class loadClass(ClassLoader classLoader, String className) { + String[] collectTests() { + String[] tests = EMPTY_STRING_ARRAY; + if (basedir.exists()) { +- org.apache.maven.surefire.shared.utils.io.DirectoryScanner scanner = +- new org.apache.maven.surefire.shared.utils.io.DirectoryScanner(); ++ org.apache.maven.shared.utils.io.DirectoryScanner scanner = ++ new org.apache.maven.shared.utils.io.DirectoryScanner(); + + scanner.setBasedir(basedir); + +diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ClassMethod.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ClassMethod.java +index a4436e702..b88fc6dcb 100644 +--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ClassMethod.java ++++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ClassMethod.java +@@ -20,7 +20,7 @@ + + import java.util.Objects; + +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; + + /** + * Data transfer object of class and method literals. +diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ObjectUtils.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ObjectUtils.java +index 4dda97583..01d24d1e6 100644 +--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ObjectUtils.java ++++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ObjectUtils.java +@@ -21,8 +21,8 @@ + import java.lang.management.ManagementFactory; + import java.util.Map; + +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_17; +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_RECENT; ++import static org.apache.commons.lang3.JavaVersion.JAVA_17; ++import static org.apache.commons.lang3.JavaVersion.JAVA_RECENT; + + /** + * Similar to Java 7 java.util.Objects. +diff --git a/surefire-api/src/test/java/org/apache/maven/surefire/api/util/internal/ObjectUtilsTest.java b/surefire-api/src/test/java/org/apache/maven/surefire/api/util/internal/ObjectUtilsTest.java +index 9e1640b6a..1717b05c0 100644 +--- a/surefire-api/src/test/java/org/apache/maven/surefire/api/util/internal/ObjectUtilsTest.java ++++ b/surefire-api/src/test/java/org/apache/maven/surefire/api/util/internal/ObjectUtilsTest.java +@@ -20,8 +20,8 @@ + + import org.junit.Test; + +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_17; +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_RECENT; ++import static org.apache.commons.lang3.JavaVersion.JAVA_17; ++import static org.apache.commons.lang3.JavaVersion.JAVA_RECENT; + import static org.assertj.core.api.Assertions.assertThat; + + /** +diff --git a/surefire-booter/pom.xml b/surefire-booter/pom.xml +index 85c385adc..4eca6e1fc 100644 +--- a/surefire-booter/pom.xml ++++ b/surefire-booter/pom.xml +@@ -33,18 +33,36 @@ + + + +- org.apache.maven.surefire +- surefire-api +- ${project.version} ++ org.powermock ++ powermock-reflect ++ test ++ ++ ++ org.hamcrest ++ hamcrest ++ test ++ ++ ++ commons-io ++ commons-io ++ test ++ ++ ++ org.apache.commons ++ commons-lang3 ++ ++ ++ org.apache.maven.shared ++ maven-shared-utils + + + org.apache.maven.surefire +- surefire-extensions-spi ++ surefire-api + ${project.version} + + + org.apache.maven.surefire +- surefire-shared-utils ++ surefire-extensions-spi + ${project.version} + + +diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/CommandReader.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/CommandReader.java +index b1dba3bb5..2166eda1d 100644 +--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/CommandReader.java ++++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/CommandReader.java +@@ -48,14 +48,14 @@ + import static java.lang.Thread.State.RUNNABLE; + import static java.lang.Thread.State.TERMINATED; + import static java.util.Objects.requireNonNull; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.StringUtils.isNotBlank; + import static org.apache.maven.surefire.api.booter.Command.toShutdown; + import static org.apache.maven.surefire.api.booter.MasterProcessCommand.BYE_ACK; + import static org.apache.maven.surefire.api.booter.MasterProcessCommand.NOOP; + import static org.apache.maven.surefire.api.booter.MasterProcessCommand.SHUTDOWN; + import static org.apache.maven.surefire.api.booter.MasterProcessCommand.SKIP_SINCE_NEXT_TEST; + import static org.apache.maven.surefire.api.util.internal.DaemonThreadFactory.newDaemonThread; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotBlank; + + /** + * Reader of commands coming from plugin(master) process. +diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java +index 1bcdc8b09..0133fe51c 100644 +--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java ++++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java +@@ -37,6 +37,7 @@ + import java.util.concurrent.atomic.AtomicBoolean; + + import org.apache.maven.plugin.surefire.log.api.ConsoleLogger; ++import org.apache.maven.shared.utils.cli.ShutdownHookUtils; + import org.apache.maven.surefire.api.booter.BaseProviderFactory; + import org.apache.maven.surefire.api.booter.Command; + import org.apache.maven.surefire.api.booter.DumpErrorSingleton; +@@ -51,7 +52,6 @@ + import org.apache.maven.surefire.api.testset.TestSetFailedException; + import org.apache.maven.surefire.booter.spi.LegacyMasterProcessChannelProcessorFactory; + import org.apache.maven.surefire.booter.spi.SurefireMasterProcessChannelProcessorFactory; +-import org.apache.maven.surefire.shared.utils.cli.ShutdownHookUtils; + import org.apache.maven.surefire.spi.MasterProcessChannelProcessorFactory; + + import static java.lang.Thread.currentThread; +diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java +index 2c836ea21..0f22e77ea 100644 +--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java ++++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java +@@ -44,16 +44,16 @@ + import static java.util.concurrent.TimeUnit.HOURS; + import static java.util.concurrent.TimeUnit.MINUTES; + import static java.util.regex.Pattern.compile; ++import static org.apache.commons.lang3.StringUtils.isNotBlank; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_HP_UX; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_LINUX; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_UNIX; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.apache.maven.surefire.api.util.internal.StringUtils.NL; + import static org.apache.maven.surefire.booter.ProcessInfo.ERR_PROCESS_INFO; + import static org.apache.maven.surefire.booter.ProcessInfo.INVALID_PROCESS_INFO; + import static org.apache.maven.surefire.booter.ProcessInfo.unixProcessInfo; + import static org.apache.maven.surefire.booter.ProcessInfo.windowsProcessInfo; +-import static org.apache.maven.surefire.shared.lang3.StringUtils.isNotBlank; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_HP_UX; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_LINUX; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_UNIX; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS; + + /** + * Recognizes PID of Plugin process and determines lifetime. +diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProcessCheckerType.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProcessCheckerType.java +index 9b49055a4..911735fe8 100644 +--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProcessCheckerType.java ++++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProcessCheckerType.java +@@ -18,7 +18,7 @@ + */ + package org.apache.maven.surefire.booter; + +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; + + /** + * +diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java +index 91cdb4f8c..059d1f808 100644 +--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java ++++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java +@@ -23,7 +23,7 @@ + import java.util.List; + import java.util.Map; + +-import org.apache.maven.surefire.shared.utils.StringUtils; ++import org.apache.maven.shared.utils.StringUtils; + + /** + * @author Kristian Rosenvold +diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java +index 56c5e4408..839fe32ab 100644 +--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java ++++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java +@@ -20,7 +20,7 @@ + + import org.apache.maven.surefire.api.suite.RunResult; + +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotBlank; ++import static org.apache.maven.shared.utils.StringUtils.isNotBlank; + + /** + * Encapsulates exceptions thrown during Surefire forking. +diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SystemUtils.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SystemUtils.java +index 3f7b4aa5b..35b90575c 100644 +--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SystemUtils.java ++++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SystemUtils.java +@@ -34,16 +34,16 @@ + + import static java.lang.Thread.currentThread; + import static java.util.Objects.requireNonNull; ++import static org.apache.commons.lang3.JavaVersion.JAVA_9; ++import static org.apache.commons.lang3.JavaVersion.JAVA_RECENT; ++import static org.apache.commons.lang3.StringUtils.isNumeric; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_FREE_BSD; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_LINUX; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_NET_BSD; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_OPEN_BSD; + import static org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodChain; + import static org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray; + import static org.apache.maven.surefire.api.util.ReflectionUtils.tryLoadClass; +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_9; +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_RECENT; +-import static org.apache.maven.surefire.shared.lang3.StringUtils.isNumeric; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_FREE_BSD; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_LINUX; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_NET_BSD; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_OPEN_BSD; + + /** + * JDK 9 support. +diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/stream/CommandDecoder.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/stream/CommandDecoder.java +index 3a48ca92d..d46bb53fc 100644 +--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/stream/CommandDecoder.java ++++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/stream/CommandDecoder.java +@@ -37,6 +37,7 @@ + import org.apache.maven.surefire.api.stream.MalformedChannelException; + import org.apache.maven.surefire.api.stream.SegmentType; + ++import static org.apache.maven.shared.utils.cli.ShutdownHookUtils.addShutDownHook; + import static org.apache.maven.surefire.api.booter.Command.BYE_ACK; + import static org.apache.maven.surefire.api.booter.Command.NOOP; + import static org.apache.maven.surefire.api.booter.Command.SKIP_SINCE_NEXT_TEST; +@@ -48,7 +49,6 @@ + import static org.apache.maven.surefire.api.stream.SegmentType.DATA_STRING; + import static org.apache.maven.surefire.api.stream.SegmentType.END_OF_FRAME; + import static org.apache.maven.surefire.api.stream.SegmentType.STRING_ENCODING; +-import static org.apache.maven.surefire.shared.utils.cli.ShutdownHookUtils.addShutDownHook; + + /** + * +diff --git a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/ForkedBooterMockTest.java b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/ForkedBooterMockTest.java +index 0c5dff743..b5a8be1fb 100644 +--- a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/ForkedBooterMockTest.java ++++ b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/ForkedBooterMockTest.java +@@ -34,6 +34,7 @@ + import java.util.concurrent.FutureTask; + + import org.apache.maven.plugin.surefire.log.api.ConsoleLogger; ++import org.apache.maven.shared.utils.cli.ShutdownHookUtils; + import org.apache.maven.surefire.api.booter.MasterProcessChannelDecoder; + import org.apache.maven.surefire.api.booter.MasterProcessChannelEncoder; + import org.apache.maven.surefire.api.fork.ForkNodeArguments; +@@ -43,7 +44,6 @@ + import org.apache.maven.surefire.booter.spi.EventChannelEncoder; + import org.apache.maven.surefire.booter.spi.LegacyMasterProcessChannelProcessorFactory; + import org.apache.maven.surefire.booter.spi.SurefireMasterProcessChannelProcessorFactory; +-import org.apache.maven.surefire.shared.utils.cli.ShutdownHookUtils; + import org.apache.maven.surefire.spi.MasterProcessChannelProcessorFactory; + import org.junit.Rule; + import org.junit.Test; +diff --git a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/IsolatedClassLoaderTest.java b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/IsolatedClassLoaderTest.java +index ccc1c1f66..c01aa4d7c 100644 +--- a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/IsolatedClassLoaderTest.java ++++ b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/IsolatedClassLoaderTest.java +@@ -21,8 +21,8 @@ + import java.io.File; + import java.net.URL; + ++import org.apache.maven.shared.utils.io.FileUtils; + import org.apache.maven.surefire.api.provider.AbstractProvider; +-import org.apache.maven.surefire.shared.utils.io.FileUtils; + import org.junit.Before; + import org.junit.Test; + +diff --git a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java +index 1bb96440c..37b3d1c4e 100644 +--- a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java ++++ b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java +@@ -28,7 +28,7 @@ + import java.util.HashSet; + import java.util.List; + +-import org.apache.maven.surefire.shared.utils.io.FileUtils; ++import org.apache.maven.shared.utils.io.FileUtils; + import org.junit.After; + import org.junit.Before; + import org.junit.Test; +diff --git a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java +index 78f35716f..83417659b 100644 +--- a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java ++++ b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java +@@ -38,10 +38,10 @@ + import static java.nio.charset.StandardCharsets.US_ASCII; + import static java.nio.file.Files.readAllBytes; + import static java.util.concurrent.TimeUnit.SECONDS; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_UNIX; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.apache.maven.surefire.booter.ProcessInfo.unixProcessInfo; + import static org.apache.maven.surefire.booter.ProcessInfo.windowsProcessInfo; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_UNIX; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.assertj.core.api.Assertions.assertThat; + import static org.hamcrest.CoreMatchers.is; + import static org.hamcrest.CoreMatchers.not; +diff --git a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java +index 6752ba75b..9e2277916 100644 +--- a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java ++++ b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java +@@ -31,12 +31,12 @@ + import org.powermock.modules.junit4.PowerMockRunner; + + import static java.io.File.separator; +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_9; +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_RECENT; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_FREE_BSD; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_LINUX; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_NET_BSD; +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_OPEN_BSD; ++import static org.apache.commons.lang3.JavaVersion.JAVA_9; ++import static org.apache.commons.lang3.JavaVersion.JAVA_RECENT; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_FREE_BSD; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_LINUX; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_NET_BSD; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_OPEN_BSD; + import static org.assertj.core.api.Assertions.assertThat; + import static org.junit.Assume.assumeTrue; + import static org.mockito.Matchers.any; +diff --git a/surefire-extensions-api/pom.xml b/surefire-extensions-api/pom.xml +index 3e3bf6694..20122bfc0 100644 +--- a/surefire-extensions-api/pom.xml ++++ b/surefire-extensions-api/pom.xml +@@ -30,6 +30,15 @@ + Surefire Extensions API + + ++ ++ org.apache.commons ++ commons-lang3 ++ test ++ ++ ++ org.apache.maven.shared ++ maven-shared-utils ++ + + org.apache.maven.surefire + surefire-api +@@ -47,11 +56,6 @@ + jsr305 + provided + +- +- org.apache.maven.surefire +- surefire-shared-utils +- ${surefire-shared-utils.version} +- + + org.mockito + mockito-core +diff --git a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ConsoleOutputReporter.java b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ConsoleOutputReporter.java +index 5f32f9b78..2129e8589 100644 +--- a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ConsoleOutputReporter.java ++++ b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ConsoleOutputReporter.java +@@ -21,7 +21,7 @@ + import java.io.File; + import java.io.PrintStream; + +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; + + /** + * Extension for logger. +diff --git a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StatelessReporter.java b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StatelessReporter.java +index 3cf833daa..9cde28fb4 100644 +--- a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StatelessReporter.java ++++ b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StatelessReporter.java +@@ -20,7 +20,7 @@ + + import org.apache.maven.surefire.api.report.TestSetReportEntry; + +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; + + /** + * Extension for stateless reporter. +diff --git a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/util/CommandlineExecutor.java b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/util/CommandlineExecutor.java +index 737fd5af1..9fa7ade79 100644 +--- a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/util/CommandlineExecutor.java ++++ b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/util/CommandlineExecutor.java +@@ -20,11 +20,11 @@ + + import java.io.Closeable; + +-import org.apache.maven.surefire.shared.utils.cli.CommandLineException; +-import org.apache.maven.surefire.shared.utils.cli.Commandline; ++import org.apache.maven.shared.utils.cli.CommandLineException; ++import org.apache.maven.shared.utils.cli.Commandline; + +-import static org.apache.maven.surefire.shared.utils.cli.ShutdownHookUtils.addShutDownHook; +-import static org.apache.maven.surefire.shared.utils.cli.ShutdownHookUtils.removeShutdownHook; ++import static org.apache.maven.shared.utils.cli.ShutdownHookUtils.addShutDownHook; ++import static org.apache.maven.shared.utils.cli.ShutdownHookUtils.removeShutdownHook; + + /** + * Programming model with this class: +diff --git a/surefire-extensions-api/src/test/java/org/apache/maven/plugin/surefire/extensions/CommandlineExecutorTest.java b/surefire-extensions-api/src/test/java/org/apache/maven/plugin/surefire/extensions/CommandlineExecutorTest.java +index 1443947df..89960a02a 100644 +--- a/surefire-extensions-api/src/test/java/org/apache/maven/plugin/surefire/extensions/CommandlineExecutorTest.java ++++ b/surefire-extensions-api/src/test/java/org/apache/maven/plugin/surefire/extensions/CommandlineExecutorTest.java +@@ -21,17 +21,17 @@ + import java.io.Closeable; + import java.nio.file.Paths; + ++import org.apache.maven.shared.utils.cli.Commandline; + import org.apache.maven.surefire.extensions.EventHandler; + import org.apache.maven.surefire.extensions.util.CommandlineExecutor; + import org.apache.maven.surefire.extensions.util.CommandlineStreams; + import org.apache.maven.surefire.extensions.util.CountdownCloseable; + import org.apache.maven.surefire.extensions.util.LineConsumerThread; +-import org.apache.maven.surefire.shared.utils.cli.Commandline; + import org.junit.After; + import org.junit.Before; + import org.junit.Test; + +-import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS; ++import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS; + import static org.assertj.core.api.Assertions.assertThat; + import static org.assertj.core.util.Files.delete; + import static org.mockito.ArgumentMatchers.contains; +diff --git a/surefire-grouper/pom.xml b/surefire-grouper/pom.xml +index a311b0e9c..2b0c3119e 100644 +--- a/surefire-grouper/pom.xml ++++ b/surefire-grouper/pom.xml +@@ -34,9 +34,9 @@ + + + +- org.javacc.plugin ++ org.codehaus.mojo + javacc-maven-plugin +- 3.0.3 ++ 3.1.0 + + + net.java.dev.javacc +diff --git a/surefire-providers/common-java5/pom.xml b/surefire-providers/common-java5/pom.xml +index ce85bc9ff..dc4bb4fbe 100644 +--- a/surefire-providers/common-java5/pom.xml ++++ b/surefire-providers/common-java5/pom.xml +@@ -33,9 +33,8 @@ + + + +- org.apache.maven.surefire +- surefire-shared-utils +- ${surefire-shared-utils.version} ++ org.apache.maven.shared ++ maven-shared-utils + + + +diff --git a/surefire-providers/common-java5/src/main/java/org/apache/maven/surefire/report/SmartStackTraceParser.java b/surefire-providers/common-java5/src/main/java/org/apache/maven/surefire/report/SmartStackTraceParser.java +index e5c66dde8..171d267f1 100644 +--- a/surefire-providers/common-java5/src/main/java/org/apache/maven/surefire/report/SmartStackTraceParser.java ++++ b/surefire-providers/common-java5/src/main/java/org/apache/maven/surefire/report/SmartStackTraceParser.java +@@ -26,8 +26,8 @@ + + import static java.util.Arrays.asList; + import static java.util.Collections.reverse; +-import static org.apache.maven.surefire.shared.utils.StringUtils.chompLast; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotEmpty; ++import static org.apache.maven.shared.utils.StringUtils.chompLast; ++import static org.apache.maven.shared.utils.StringUtils.isNotEmpty; + + /** + * @author Kristian Rosenvold +diff --git a/surefire-providers/common-junit4/pom.xml b/surefire-providers/common-junit4/pom.xml +index 0fa2fadbd..044fb089c 100644 +--- a/surefire-providers/common-junit4/pom.xml ++++ b/surefire-providers/common-junit4/pom.xml +@@ -32,6 +32,10 @@ + Shared JUnit4 Provider Code + + ++ ++ org.apache.maven.shared ++ maven-shared-utils ++ + + junit + junit +@@ -43,11 +47,6 @@ + surefire-logger-api + ${project.version} + +- +- org.apache.maven.surefire +- surefire-shared-utils +- ${project.version} +- + + org.apache.maven.surefire + common-junit3 +diff --git a/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerFactory.java b/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerFactory.java +index b0a74a4f7..26be9beac 100644 +--- a/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerFactory.java ++++ b/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerFactory.java +@@ -24,7 +24,7 @@ + import org.apache.maven.surefire.api.util.ReflectionUtils; + import org.junit.runner.notification.RunListener; + +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotBlank; ++import static org.apache.maven.shared.utils.StringUtils.isNotBlank; + + /** + * @author Kristian Rosenvold +diff --git a/surefire-providers/common-junit48/pom.xml b/surefire-providers/common-junit48/pom.xml +index 2b95ce3c6..d91532b62 100644 +--- a/surefire-providers/common-junit48/pom.xml ++++ b/surefire-providers/common-junit48/pom.xml +@@ -32,17 +32,16 @@ + Shared JUnit48 Provider Code + + ++ ++ org.apache.maven.shared ++ maven-shared-utils ++ + + junit + junit + 4.8.1 + provided + +- +- org.apache.maven.surefire +- surefire-shared-utils +- ${project.version} +- + + org.apache.maven.surefire + common-junit4 +diff --git a/surefire-providers/common-junit48/src/main/java/org/apache/maven/surefire/common/junit48/FilterFactory.java b/surefire-providers/common-junit48/src/main/java/org/apache/maven/surefire/common/junit48/FilterFactory.java +index 45d21b751..6cdd9c892 100644 +--- a/surefire-providers/common-junit48/src/main/java/org/apache/maven/surefire/common/junit48/FilterFactory.java ++++ b/surefire-providers/common-junit48/src/main/java/org/apache/maven/surefire/common/junit48/FilterFactory.java +@@ -29,9 +29,9 @@ + import org.junit.runner.Description; + import org.junit.runner.manipulation.Filter; + ++import static org.apache.maven.shared.utils.StringUtils.isNotBlank; + import static org.apache.maven.surefire.api.booter.ProviderParameterNames.TESTNG_EXCLUDEDGROUPS_PROP; + import static org.apache.maven.surefire.api.booter.ProviderParameterNames.TESTNG_GROUPS_PROP; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isNotBlank; + + /** + * @author Todd Lipcon +diff --git a/surefire-providers/common-junit48/src/test/java/org/apache/maven/surefire/common/junit48/FilterFactoryTest.java b/surefire-providers/common-junit48/src/test/java/org/apache/maven/surefire/common/junit48/FilterFactoryTest.java +index ddb772ae6..679ef712a 100644 +--- a/surefire-providers/common-junit48/src/test/java/org/apache/maven/surefire/common/junit48/FilterFactoryTest.java ++++ b/surefire-providers/common-junit48/src/test/java/org/apache/maven/surefire/common/junit48/FilterFactoryTest.java +@@ -23,10 +23,10 @@ + import java.util.Collection; + import java.util.Collections; + ++import org.apache.maven.shared.utils.io.MatchPatterns; + import org.apache.maven.surefire.api.testset.ResolvedTest; + import org.apache.maven.surefire.api.testset.TestListResolver; + import org.apache.maven.surefire.common.junit48.tests.pt.PT; +-import org.apache.maven.surefire.shared.utils.io.MatchPatterns; + import org.junit.Test; + import org.junit.runner.Description; + import org.junit.runner.JUnitCore; +diff --git a/surefire-providers/surefire-junit-platform/pom.xml b/surefire-providers/surefire-junit-platform/pom.xml +index 8d806b898..176e20374 100644 +--- a/surefire-providers/surefire-junit-platform/pom.xml ++++ b/surefire-providers/surefire-junit-platform/pom.xml +@@ -85,13 +85,22 @@ + + + +- org.apache.maven.surefire +- common-java5 +- ${project.version} ++ org.opentest4j ++ opentest4j ++ 1.2.0 ++ test ++ ++ ++ org.apache.commons ++ commons-lang3 ++ ++ ++ org.apache.maven.shared ++ maven-shared-utils + + + org.apache.maven.surefire +- surefire-shared-utils ++ common-java5 + ${project.version} + + +diff --git a/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java b/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java +index 5e8255490..684a28f3c 100644 +--- a/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java ++++ b/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java +@@ -30,6 +30,7 @@ + import java.util.Properties; + import java.util.logging.Logger; + ++import org.apache.maven.shared.utils.StringUtils; + import org.apache.maven.surefire.api.provider.AbstractProvider; + import org.apache.maven.surefire.api.provider.ProviderParameters; + import org.apache.maven.surefire.api.report.ReporterException; +@@ -39,7 +40,6 @@ + import org.apache.maven.surefire.api.util.ScanResult; + import org.apache.maven.surefire.api.util.SurefireReflectionException; + import org.apache.maven.surefire.api.util.TestsToRun; +-import org.apache.maven.surefire.shared.utils.StringUtils; + import org.junit.platform.engine.DiscoverySelector; + import org.junit.platform.engine.Filter; + import org.junit.platform.launcher.EngineFilter; +@@ -55,6 +55,7 @@ + import static java.util.Optional.of; + import static java.util.logging.Level.WARNING; + import static java.util.stream.Collectors.toList; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; + import static org.apache.maven.surefire.api.booter.ProviderParameterNames.EXCLUDE_JUNIT5_ENGINES_PROP; + import static org.apache.maven.surefire.api.booter.ProviderParameterNames.INCLUDE_JUNIT5_ENGINES_PROP; + import static org.apache.maven.surefire.api.booter.ProviderParameterNames.TESTNG_EXCLUDEDGROUPS_PROP; +@@ -64,7 +65,6 @@ + import static org.apache.maven.surefire.api.report.RunMode.RERUN_TEST_AFTER_FAILURE; + import static org.apache.maven.surefire.api.testset.TestListResolver.optionallyWildcardFilter; + import static org.apache.maven.surefire.api.util.TestsToRun.fromClass; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; + import static org.junit.platform.engine.discovery.DiscoverySelectors.selectClass; + import static org.junit.platform.engine.discovery.DiscoverySelectors.selectUniqueId; + import static org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.request; +diff --git a/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java b/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java +index 8c274fd1c..9a1ff487e 100644 +--- a/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java ++++ b/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java +@@ -49,8 +49,8 @@ + import static java.util.Collections.emptyMap; + import static java.util.stream.Collectors.joining; + import static java.util.stream.Collectors.toList; ++import static org.apache.commons.lang3.StringUtils.isNotBlank; + import static org.apache.maven.surefire.api.util.internal.ObjectUtils.systemProps; +-import static org.apache.maven.surefire.shared.lang3.StringUtils.isNotBlank; + import static org.junit.platform.engine.TestExecutionResult.Status.FAILED; + + /** +diff --git a/surefire-providers/surefire-junit3/pom.xml b/surefire-providers/surefire-junit3/pom.xml +index b1886524e..8b1df358d 100644 +--- a/surefire-providers/surefire-junit3/pom.xml ++++ b/surefire-providers/surefire-junit3/pom.xml +@@ -32,6 +32,11 @@ + Surefire JUnit3 Runner + + ++ ++ org.apache.commons ++ commons-lang3 ++ test ++ + + junit + junit +@@ -48,12 +53,6 @@ + common-java5 + ${project.version} + +- +- org.apache.maven.surefire +- surefire-shared-utils +- ${project.version} +- test +- + + + +diff --git a/surefire-providers/surefire-junit3/src/test/java/org/apache/maven/surefire/junit/JUnitTestSetTest.java b/surefire-providers/surefire-junit3/src/test/java/org/apache/maven/surefire/junit/JUnitTestSetTest.java +index 35979a1ec..1824cb983 100644 +--- a/surefire-providers/surefire-junit3/src/test/java/org/apache/maven/surefire/junit/JUnitTestSetTest.java ++++ b/surefire-providers/surefire-junit3/src/test/java/org/apache/maven/surefire/junit/JUnitTestSetTest.java +@@ -35,8 +35,8 @@ + import org.apache.maven.surefire.api.testset.TestSetFailedException; + import org.apache.maven.surefire.common.junit3.JUnit3Reflector; + +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_17; +-import static org.apache.maven.surefire.shared.lang3.JavaVersion.JAVA_RECENT; ++import static org.apache.commons.lang3.JavaVersion.JAVA_17; ++import static org.apache.commons.lang3.JavaVersion.JAVA_RECENT; + + /** + * +diff --git a/surefire-providers/surefire-testng/pom.xml b/surefire-providers/surefire-testng/pom.xml +index 33b1ef76f..39c8e9052 100644 +--- a/surefire-providers/surefire-testng/pom.xml ++++ b/surefire-providers/surefire-testng/pom.xml +@@ -32,17 +32,16 @@ + Surefire TestNG Runner + + ++ ++ org.apache.maven.shared ++ maven-shared-utils ++ + + junit + junit + 3.8.2 + provided + +- +- org.apache.maven.surefire +- surefire-shared-utils +- ${project.version} +- + + org.apache.maven.surefire + common-java5 +diff --git a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java +index 871ed9f49..f4a2a9494 100644 +--- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java ++++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java +@@ -32,7 +32,7 @@ + import org.apache.maven.surefire.api.util.TestsToRun; + + import static java.util.Collections.singleton; +-import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank; ++import static org.apache.maven.shared.utils.StringUtils.isBlank; + import static org.apache.maven.surefire.testng.TestNGExecutor.run; + + /** +diff --git a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java +index 96e7170b9..e3662f43e 100644 +--- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java ++++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java +@@ -28,12 +28,12 @@ + import java.util.Map; + import java.util.concurrent.atomic.AtomicInteger; + ++import org.apache.maven.shared.utils.StringUtils; + import org.apache.maven.surefire.api.booter.ProviderParameterNames; + import org.apache.maven.surefire.api.cli.CommandLineOption; + import org.apache.maven.surefire.api.report.RunListener; + import org.apache.maven.surefire.api.testset.TestListResolver; + import org.apache.maven.surefire.api.testset.TestSetFailedException; +-import org.apache.maven.surefire.shared.utils.StringUtils; + import org.apache.maven.surefire.testng.conf.Configurator; + import org.apache.maven.surefire.testng.utils.FailFastEventsSingleton; + import org.apache.maven.surefire.testng.utils.FailFastListener; +diff --git a/surefire-report-parser/pom.xml b/surefire-report-parser/pom.xml +index e616992ff..b29a7c173 100644 +--- a/surefire-report-parser/pom.xml ++++ b/surefire-report-parser/pom.xml +@@ -32,6 +32,11 @@ + Parses report output files from surefire. + + ++ ++ org.hamcrest ++ hamcrest ++ test ++ + + org.apache.maven.surefire + surefire-logger-api +-- +2.46.1 + diff --git a/LICENSE-2.0.txt b/LICENSE-2.0.txt new file mode 100644 index 0000000..81fbaf6 --- /dev/null +++ b/LICENSE-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "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. diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..3bd2cbc --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + maven-surefire-plugins + maven-surefire-provider-junit5 + diff --git a/_service b/_service new file mode 100644 index 0000000..b1b1e47 --- /dev/null +++ b/_service @@ -0,0 +1,17 @@ + + + git + https://github.com/apache/maven-surefire.git + surefire-3.5.2 + surefire-* + @PARENT_TAG@ + surefire-(.*) + **/*.jar + **/*.class + + + *.tar + xz + + + diff --git a/cpl-v10.html b/cpl-v10.html new file mode 100644 index 0000000..25310dd --- /dev/null +++ b/cpl-v10.html @@ -0,0 +1,131 @@ + + + +Common Public License - v 1.0 + + + + + + +

Common Public License - v 1.0 + +

Updated 16 Apr 2009 + +

As of 25 Feb 2009, IBM has assigned the Agreement Steward role for the CPL to the Eclipse Foundation. +Eclipse has designated the Eclipse Public License (EPL) as the follow-on version of the CPL. + +

+

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. +

+

1. DEFINITIONS +

"Contribution" means: + +

    a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
    +b) in the case of each subsequent Contributor:
+ + +
    i) changes to the Program, and
+ + +
    ii) additions to the Program;
+ + +
    where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+ +

+

"Contributor" means any person or entity that distributes the Program. +

+

"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. +

+

"Program" means the Contributions distributed in accordance with this Agreement. +

+

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. +

+

2. GRANT OF RIGHTS + +

    a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+ + +
+ + +
    b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+ + +
+ + +
    c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+ + +
+ + +
    d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+ + +
+ +

3. REQUIREMENTS +

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +

    a) it complies with the terms and conditions of this Agreement; and
+ + +
    b) its license agreement:
+ + +
    i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+ + +
    ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+ + +
    iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+ + +
    iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+ + +
+ +

When the Program is made available in source code form: + +

    a) it must be made available under this Agreement; and
+ + +
    b) a copy of this Agreement must be included with each copy of the Program.
+ +

+

Contributors may not remove or alter any copyright notices contained within the Program. +

+

Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. +

+

4. COMMERCIAL DISTRIBUTION +

Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. +

+

For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. +

+

5. NO WARRANTY +

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. +

+

6. DISCLAIMER OF LIABILITY +

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +

+

7. GENERAL +

If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. +

+

If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. +

+

All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. +

+

Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. +

+

This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. +

+

+ + + + \ No newline at end of file diff --git a/maven-surefire-3.2.5.tar.xz b/maven-surefire-3.2.5.tar.xz new file mode 100644 index 0000000..5a427d4 --- /dev/null +++ b/maven-surefire-3.2.5.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6d25c539061ce3a441a1654a98ae262a05ed324e2eb904d64d17693d2ef9df6 +size 906352 diff --git a/maven-surefire-3.5.1.tar.xz b/maven-surefire-3.5.1.tar.xz new file mode 100644 index 0000000..ca06f5c --- /dev/null +++ b/maven-surefire-3.5.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:842f80efec4d3e2b65b3e43c910a002b3873279d41d6dce1fec8afa738c9f8ad +size 911104 diff --git a/maven-surefire-3.5.2.tar.xz b/maven-surefire-3.5.2.tar.xz new file mode 100644 index 0000000..e76ccb9 --- /dev/null +++ b/maven-surefire-3.5.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e99aa55c0a99f26780d11e0e13b5b417adca7c43f93f427a623e04ea0bf8fbc +size 911400 diff --git a/maven-surefire-bootstrap-resources.patch b/maven-surefire-bootstrap-resources.patch new file mode 100644 index 0000000..64de1ce --- /dev/null +++ b/maven-surefire-bootstrap-resources.patch @@ -0,0 +1,7361 @@ +From 2384dbdd33075fbed6799b8e9e8ca59487e786ec Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fridrich=20=C5=A0trba?= +Date: Tue, 1 Oct 2024 07:32:40 +0200 +Subject: [PATCH] bootstrap resources + +--- + .../maven-failsafe-plugin/plugin-help.xml | 1084 ++++++++++++++ + .../META-INF/maven/plugin.xml | 1308 +++++++++++++++++ + .../maven_failsafe_plugin/HelpMojo.java | 448 ++++++ + .../maven-surefire-plugin/plugin-help.xml | 943 ++++++++++++ + .../META-INF/maven/plugin.xml | 1145 +++++++++++++++ + .../maven_surefire_plugin/HelpMojo.java | 448 ++++++ + .../plugin-help.xml | 496 +++++++ + .../META-INF/maven/plugin.xml | 958 ++++++++++++ + .../HelpMojo.java | 448 ++++++ + 9 files changed, 7278 insertions(+) + create mode 100644 maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-failsafe-plugin/plugin-help.xml + create mode 100644 maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml + create mode 100644 maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/maven_failsafe_plugin/HelpMojo.java + create mode 100644 maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-plugin/plugin-help.xml + create mode 100644 maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml + create mode 100644 maven-surefire-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_plugin/HelpMojo.java + create mode 100644 maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-report-plugin/plugin-help.xml + create mode 100644 maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml + create mode 100644 maven-surefire-report-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_report_plugin/HelpMojo.java + +diff --git a/maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-failsafe-plugin/plugin-help.xml b/maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-failsafe-plugin/plugin-help.xml +new file mode 100644 +index 000000000..3b4bb7649 +--- /dev/null ++++ b/maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-failsafe-plugin/plugin-help.xml +@@ -0,0 +1,1084 @@ ++ ++ ++ ++ ++ ++ ${project.name} ++ ${project.description} ++ ${project.groupId} ++ ${project.artifactId} ++ ${project.version} ++ failsafe ++ ++ ++ help ++ Display help information on maven-failsafe-plugin. ++Call mvn failsafe:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ false ++ false ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.maven_failsafe_plugin.HelpMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ detail ++ boolean ++ false ++ true ++ If true, display all settable properties for each goal. ++ ++ ++ goal ++ java.lang.String ++ false ++ true ++ The name of the goal for which to show help. If unspecified, all goals will be displayed. ++ ++ ++ indentSize ++ int ++ false ++ true ++ The number of spaces per indentation level, should be positive. ++ ++ ++ lineLength ++ int ++ false ++ true ++ The maximum length of a display line, should be positive. ++ ++ ++ ++ ${detail} ++ ${goal} ++ ${indentSize} ++ ${lineLength} ++ ++ ++ ++ integration-test ++ Run integration tests using Surefire. ++ test ++ false ++ true ++ false ++ false ++ false ++ true ++ integration-test ++ org.apache.maven.plugin.failsafe.IntegrationTestMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ additionalClasspathDependencies ++ java.util.List<org.apache.maven.model.Dependency> ++ 3.2 ++ false ++ true ++ Additional Maven dependencies to be added to the test classpath at runtime. Each element supports the parametrization like documented in POM Reference: Dependencies <https://maven.apache.org/pom.html#dependencies>. ++Those dependencies are automatically collected (i.e. have their full dependency tree calculated) and then all underlying artifacts are resolved from the repository (including their transitive dependencies). Afterwards the resolved artifacts are filtered to only contain compile and runtime scoped ones and appended to the test classpath at runtime (after the ones from additionalClasspathElements). ++ ++The following differences to regular project dependency resolving apply: ++ ++* The dependency management from the project is not taken into account. ++* Conflicts between the different items and the project dependencies are not resolved. ++* Only external dependencies (outside the current Maven reactor) are supported. ++ ++ ++ additionalClasspathElements ++ java.lang.String[] ++ 2.4 ++ false ++ true ++ Additional elements to be appended to the test classpath at runtime. Each element must be a file system path to a JAR file or a directory containing classes. No wildcards are allowed here. ++ ++ ++ argLine ++ java.lang.String ++ 2.1 ++ false ++ true ++ Arbitrary JVM options to set on the command line. Only effective for forked executions. ++ ++Since the Version 2.17 using an alternate syntax for argLine, @{...} allows late replacement of properties when the plugin is executed, so properties that have been modified by other plugins will be picked up correctly. See the Frequently Asked Questions page with more details: ++http://maven.apache.org/surefire/maven-surefire-plugin/faq.html <http://maven.apache.org/surefire/maven-surefire-plugin/faq.html> ++http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html <http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html> ++See also: forkCount ++ ++ ++ childDelegation ++ boolean ++ 2.1 ++ false ++ true ++ When false it makes tests run using the standard classloader delegation instead of the default Maven isolated classloader. Only used when forking (forkCount is greater than zero). ++Setting it to false helps with some problems caused by conflicts between xml parsers in the classpath and the Java 5 provider parser. ++ ++ ++ classesDirectory ++ java.io.File ++ false ++ true ++ The path representing project JAR file, if exists; Otherwise the directory containing generated classes of the project being tested. This will be included after the test classes in the test classpath. Defaults to built artifact JAR file or ${project.build.outputDirectory}. ++ ++ ++ classpathDependencyExcludes ++ java.lang.String[] ++ 2.6 ++ false ++ true ++ List of dependencies to exclude from the test classpath at runtime. Each item is passed as pattern to org.apache.maven.shared.artifact.filter.PatternIncludesArtifactFilter. The pattern is matched against the following artifact ids: ++* groupId:artifactId (Short ID) ++* groupId:artifactId:type:classifier (Dependency Conflict ID) ++* groupId:artifactId:type:classifier:version (Full ID) The matching algorithm is described in detail in Advanced Artifact-Matching <https://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html#advanced-artifact-matching-in-includes-and-excludes> for the maven-assembly-plugin. This parameter behaves the same as the excludes pattern described there. The dependency matching is applied to the project dependency IDs (including transitive ones) after resolving, i.e. excluding one dependency will not exclude its transitive dependencies! ++ ++ ++ classpathDependencyScopeExclude ++ java.lang.String ++ 2.6 ++ false ++ true ++ A dependency scope to exclude from the test classpath at runtime. The scope should be one of the scopes defined by org.apache.maven.artifact.Artifact. This includes the following: ++ ++* compile - system, provided, compile ++* runtime - compile, runtime ++* compile+runtime - system, provided, compile, runtime ++* runtime+system - system, compile, runtime ++* test - system, provided, compile, runtime, test ++ ++ ++ consoleOutputReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter ++ false ++ true ++ ++ ++ ++ debugForkedProcess ++ java.lang.String ++ 2.4 ++ false ++ true ++ Attach a debugger to the forked JVM. If set to "true", the process will suspend and wait for a debugger to attach on port 5005. If set to some other string, that string will be appended to the argLine, allowing you to configure arbitrary debugging ability options (without overwriting the other options specified through the argLine parameter). ++ ++ ++ dependenciesToScan ++ java.lang.String[] ++ 2.15 ++ false ++ true ++ List of dependencies to scan for test classes to include in the test run. The child elements of this element must be <dependency> elements, and the contents of each of these elements must be a string which follows the general form: ++groupId[:artifactId[:type[:classifier][:version]]] ++ ++The wildcard character * can be used within the sub parts of those composite identifiers to do glob-like pattern matching. The classifier may be omitted when matching dependencies without a classifier. ++ ++Examples: ++ ++* group or, equivalently, group:* ++* g*p:*rtifac* ++* group:*:jar ++* group:artifact:*:1.0.0 (no classifier) ++* group:*:test-jar:tests ++* *:artifact:*:*:1.0.0 ++Since version 2.22.0 you can scan for test classes from a project dependency of your multi-module project. ++ ++In versions before 3.0.0-M4, only groupId:artifactId is supported. ++ ++ ++ ++ disableXmlReport ++ boolean ++ 2.2 ++ No reason given ++ false ++ true ++ Flag to disable the generation of report files in xml format. Deprecated since 3.0.0-M4. Instead use disable within statelessTestsetReporter since of 3.0.0-M6. ++ ++ ++ enableAssertions ++ boolean ++ 2.3.1 ++ false ++ true ++ By default, Surefire enables JVM assertions for the execution of your test cases. To disable the assertions, set this flag to "false". ++ ++ ++ enableOutErrElements ++ boolean ++ 3.3.1 ++ false ++ true ++ Flag for including/excluding <system-out /> and <system-err /> elements for successfully passed tests in XML reports. Note that the default value may change to false is a future version. ++ ++ ++ enableProcessChecker ++ java.lang.String ++ 3.0.0-M4 ++ false ++ true ++ Since 3.0.0-M4 the process checkers are disabled. You can enable them namely by setting ping and native or all in this parameter. ++The checker is useful in situations when you kill the build on a CI system and you want the Surefire forked JVM to kill the tests asap and free all handlers on the file system been previously used by the JVM and by the tests. ++The ping should be safely used together with ZGC or Shenandoah Garbage Collector. Due to the ping relies on timing of the PING (triggered every 30 seconds), slow GCs may pause the timers and pretend that the parent process of the forked JVM does not exist. ++The native is very fast checker. It is useful mechanism on Unix based systems, Linux distributions and Alpine/BusyBox Linux. See the JIRA SUREFIRE-1631 <https://issues.apache.org/jira/browse/SUREFIRE-1631> for Windows issues. ++Another useful configuration parameter is forkedProcessTimeoutInSeconds. ++See the Frequently Asked Questions page with more details: ++http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#kill-jvm <http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#kill-jvm> ++http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html#kill-jvm <http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html#kill-jvm> ++Example of use: ++mvn test -Dfailsafe.enableProcessChecker=all ++ ++ ++ enablePropertiesElement ++ boolean ++ 3.3.1 ++ false ++ true ++ Flag for including/excluding <properties /> element for successfully passed tests in XML reports. ++ ++ ++ encoding ++ java.lang.String ++ 3.0.0-M1 ++ false ++ true ++ The character encoding scheme to be applied while generating test report files (see target/surefire-reports/yourTestName.txt). The report output files (*-out.txt) are still encoded with JVM's encoding used in standard out/err pipes. ++ ++ ++ environmentVariables ++ java.util.Map<java.lang.String, java.lang.String> ++ 2.1.3 ++ false ++ true ++ Additional environment variables to set on the command line. ++ ++ ++ excludeJUnit5Engines ++ java.lang.String[] ++ 3.0.0-M6 ++ false ++ true ++ Provide the ID/s of an JUnit engine to be excluded in the test run. ++ ++ ++ excludedEnvironmentVariables ++ java.lang.String[] ++ 3.0.0-M4 ++ false ++ true ++ You can selectively exclude individual environment variables by enumerating their keys. ++The environment is a system-dependent mapping from keys to values which is inherited from the Maven process to the forked Surefire processes. The keys must literally (case sensitive) match in order to exclude their environment variable. ++Example to exclude three environment variables: ++mvn test -Dfailsafe.excludedEnvironmentVariables=ACME1,ACME2,ACME3 ++ ++ ++ excludedGroups ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG/JUnit47 provider with JUnit4.8+ only and JUnit5+ provider since 2.22.0) Excluded groups/categories/tags. Any methods/classes/etc with one of the groups/categories/tags specified in this list will specifically not be run. ++For JUnit4, this parameter forces the use of the 4.7 provider. For JUnit5, this parameter forces the use of the JUnit platform provider. ++This parameter is ignored if the suiteXmlFiles parameter is specified. ++Since version 2.18.1 and JUnit 4.12, the @Category annotation type is automatically inherited from superclasses, see @java.lang.annotation.Inherited. Make sure that test class inheritance still makes sense together with @Category annotation of the JUnit 4.12 or higher appeared in superclass. ++ ++ ++ excludes ++ java.util.List<java.lang.String> ++ false ++ true ++ A list of <exclude> elements specifying the tests (by pattern) that should be excluded in testing. When not specified and when the test parameter is not specified, the default excludes will be ++<excludes> <exclude>**/*$*</exclude> </excludes> (which excludes all inner classes). ++This parameter is ignored if the TestNG suiteXmlFiles parameter is specified. ++Each exclude item may also contain a comma-separated sub-list of items, which will be treated as multiple <exclude> entries. ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): <exclude>%regex[pkg.*Slow.*.class], Unstable*</exclude> ++Notice that these values are relative to the directory containing generated test classes of the project being tested. This directory is declared by the parameter testClassesDirectory which defaults to the POM property ${project.build.testOutputDirectory}, typically src/test/java unless overridden. ++ ++ ++ excludesFile ++ java.io.File ++ 2.13 ++ false ++ true ++ A file containing exclude patterns, each in a next line. Blank lines, or lines starting with # are ignored. If excludes are also specified, these patterns are appended. Example with path, simple and regex excludes: */it/* **/DontRunIT.* %regex[.*IT.*|.*Not.*] ++Since 3.0.0-M6, method filtering support is provided in the exclusions file as well, example: pkg.SomeIT#testMethod ++ ++ ++ failIfNoSpecifiedTests ++ boolean ++ 3.0.0-M8 ++ false ++ true ++ Set this to "false" to prevent a failure if none of the tests specified in -Dit.test=... are run. Defaults to "true". Replacing "it.failIfNoSpecifiedTests" to be consistent with surefire plugin. ++ ++ ++ failIfNoSpecifiedTestsDeprecated ++ boolean ++ 2.12 ++ Since 3.0.0-M8, use "failsafe.failIfNoSpecifiedTests" instead. ++ false ++ true ++ Set this to "false" to prevent a failure if none of the tests specified in -Dit.test=... are run. Defaults to "true". ++ ++ ++ failIfNoTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to "true" to cause a failure if there are no tests to run. Defaults to "false". ++ ++ ++ forkCount ++ java.lang.String ++ 2.14 ++ false ++ true ++ Option to specify the number of VMs to fork in parallel in order to execute the tests. When terminated with "C", the number part is multiplied with the number of CPU cores. Floating point value are only accepted together with "C". If set to "0", no VM is forked and all tests are executed within the main process. ++ ++Example values: "1.5C", "4" ++ ++The system properties and the argLine of the forked processes may contain the place holder string ${surefire.forkNumber}, which is replaced with a fixed number for each of the parallel forks, ranging from 1 to the effective value of forkCount times the maximum number of parallel Surefire executions in maven parallel builds, i.e. the effective value of the -T command line argument of maven core. ++ ++ ++ forkNode ++ org.apache.maven.surefire.extensions.ForkNodeFactory ++ 3.0.0-M5 ++ false ++ true ++ This parameter configures the forked node. Currently, you can select the communication protocol, i.e. process pipes or TCP/IP sockets. The plugin uses process pipes by default which will be turned to TCP/IP in the version 3.0.0. Alternatively, you can implement your own factory and SPI. ++See the documentation for more details: ++https://maven.apache.org/plugins/maven-surefire-plugin/examples/process-communication.html <https://maven.apache.org/plugins/maven-surefire-plugin/examples/process-communication.html> ++ ++ ++ forkedProcessExitTimeoutInSeconds ++ int ++ 2.20 ++ false ++ true ++ Forked process is normally terminated without any significant delay after given tests have completed. If the particular tests started non-daemon Thread(s), the process hangs instead of been properly terminated by System.exit(). Use this parameter in order to determine the timeout of terminating the process. see the documentation: http://maven.apache.org/surefire/maven-failsafe-plugin/examples/shutdown.html <http://maven.apache.org/surefire/maven-failsafe-plugin/examples/shutdown.html> ++ ++ ++ forkedProcessTimeoutInSeconds ++ int ++ 2.4 ++ false ++ true ++ Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out. ++ ++ ++ groups ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG/JUnit47 provider with JUnit4.8+ only and JUnit5+ provider since 2.22.0) Groups/categories/tags for this test. Only classes/methods/etc decorated with one of the groups/categories/tags specified here will be included in test run, if specified. ++For JUnit4 tests, this parameter forces the use of the 4.7 provider. For JUnit5 tests, this parameter forces the use of the JUnit platform provider. ++This parameter is ignored if the suiteXmlFiles parameter is specified. ++Since version 2.18.1 and JUnit 4.12, the @Category annotation type is automatically inherited from superclasses, see @java.lang.annotation.Inherited. Make sure that test class inheritance still makes sense together with @Category annotation of the JUnit 4.12 or higher appeared in superclass. ++ ++ ++ includeJUnit5Engines ++ java.lang.String[] ++ 3.0.0-M6 ++ false ++ true ++ Provide the ID/s of an JUnit engine to be included in the test run. ++ ++ ++ includes ++ java.util.List<java.lang.String> ++ false ++ true ++ A list of <include> elements specifying the test filter (by pattern) of tests which should be included in testing. If it is not specified and the test parameter is unspecified as well, the default includes is <includes> <include>**/IT*.java</include> <include>**/*IT.java</include> <include>**/*ITCase.java</include> </includes> ++Each include item may also contain a comma-separated sublist of items, which will be treated as multiple <include> entries. ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): <include>%regex[.*[Cat|Dog].*], Basic????, !Unstable*</include> <include>%regex[.*[Cat|Dog].*], !%regex[pkg.*Slow.*.class], pkg/**/*Fast*.java</include> ++This parameter is ignored if the TestNG suiteXmlFiles parameter is specified. ++ ++Notice that these values are relative to the directory containing generated test classes of the project being tested. This directory is declared by the parameter testClassesDirectory which defaults to the POM property ${project.build.testOutputDirectory}, typically src/test/java unless overridden. ++ ++ ++ includesFile ++ java.io.File ++ 2.13 ++ false ++ true ++ A file containing include patterns, each in a next line. Blank lines, or lines starting with # are ignored. If includes are also specified, these patterns are appended. Example with path, simple and regex includes: */it/* **/NotIncludedByDefault.java %regex[.*IT.*|.*Not.*] ++Since 3.0.0-M6, method filtering support is provided in the inclusions file as well, example: pkg.SomeIT#testMethod ++ ++ ++ jdkToolchain ++ java.util.Map<java.lang.String, java.lang.String> ++ 3.0.0-M5 and Maven 3.3.x ++ false ++ true ++ ++Allow for configuration of the test jvm via maven toolchains. This permits a configuration where the project is built with one jvm and tested with another. This is similar to jvm, but avoids hardcoding paths. The two parameters are mutually exclusive (jvm wins) ++ ++Examples: ++(see Guide to Toolchains <https://maven.apache.org/guides/mini/guide-using-toolchains.html> for more info) <configuration> ... <jdkToolchain> <version>1.11</version> </jdkToolchain> </configuration> <configuration> ... <jdkToolchain> <version>1.8</version> <vendor>zulu</vendor> </jdkToolchain> </configuration> ++ ++ ++ junitArtifactName ++ java.lang.String ++ 2.3.1 ++ false ++ true ++ Allows you to specify the name of the JUnit artifact. If not set, junit:junit will be used. ++ ++ ++ jvm ++ java.lang.String ++ 2.1 ++ false ++ true ++ Option to specify the jvm (or path to the java executable) to use with the forking options. For the default, the jvm will be a new instance of the same VM as the one used to run Maven. JVM settings are not inherited from MAVEN_OPTS. ++ ++ ++ objectFactory ++ java.lang.String ++ 2.5 ++ false ++ true ++ (TestNG only) Define the factory class used to create all test instances. ++ ++ ++ parallel ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG provider) When you use the parameter parallel, TestNG will try to run all your test methods in separate threads, except for methods that depend on each other, which will be run in the same thread in order to respect their order of execution. Supports two values: classes or methods. ++(JUnit 4.7 provider) Supports values classes, methods, both to run in separate threads been controlled by threadCount. ++ ++Since version 2.16 (JUnit 4.7 provider), the value both is DEPRECATED. Use classesAndMethods instead. ++ ++Since version 2.16 (JUnit 4.7 provider), additional vales are available: ++suites, suitesAndClasses, suitesAndMethods, classesAndMethods, all. ++By default, Surefire does not execute tests in parallel. You can set the parameter parallel to none to explicitly disable parallel execution (e.g. when disabling parallel execution in special Maven profiles when executing coverage analysis). ++ ++ ++ parallelOptimized ++ boolean ++ 2.17 ++ false ++ true ++ (JUnit 4.7 / provider only) The thread counts do not exceed the number of parallel suite, class runners and average number of methods per class if set to true. ++True by default. ++ ++ ++ parallelTestsTimeoutForcedInSeconds ++ double ++ 2.16 ++ false ++ true ++ Stop executing queued parallel JUnit tests and interrupt currently running tests after a certain number of seconds. ++Example values: "3.5", "4" ++ ++If set to 0, wait forever, never timing out. Makes sense with specified parallel different from "none". ++ ++ ++ parallelTestsTimeoutInSeconds ++ double ++ 2.16 ++ false ++ true ++ Stop executing queued parallel JUnit tests after a certain number of seconds. ++Example values: "3.5", "4" ++ ++If set to 0, wait forever, never timing out. Makes sense with specified parallel different from "none". ++ ++ ++ perCoreThreadCount ++ boolean ++ 2.5 ++ false ++ true ++ (JUnit 4.7 provider) Indicates that threadCount, threadCountSuites, threadCountClasses, threadCountMethods are per cpu core. ++ ++ ++ printSummary ++ boolean ++ false ++ true ++ Option to print summary of test suites or just print the test cases that have errors. ++ ++ ++ promoteUserPropertiesToSystemProperties ++ boolean ++ 3.4.0 ++ false ++ true ++ If set to true will also pass all user properties exposed via org.apache.maven.execution.MavenSession.getUserProperties() as system properties to a provider. Those always take precedence over same named system properties set via any other means. ++See also: systemPropertyVariables ++ ++ ++ properties ++ java.util.Properties ++ 2.4 ++ false ++ true ++ List of properties for configuring the testing provider. This is the preferred method of configuring TestNG and JUnit platform providers. ++ ++JUnit platform properties may be defined in a configurationParameters element: <properties> <configurationParameters> junit.jupiter.execution.parallel.enabled = true junit.jupiter.execution.parallel.mode.default = concurrent </configurationParameters> </properties> ++TestNG properties may be defined as distinct element blocks: <properties> <property> <name>parallel</name> <value>methods</value> </property> </properties> ++ ++ ++ redirectTestOutputToFile ++ boolean ++ 2.3 ++ false ++ true ++ Set this to "true" to redirect the unit test standard output to a file (found in reportsDirectory/testName-output.txt). ++ ++ ++ reportFormat ++ java.lang.String ++ false ++ true ++ Selects the formatting for the test report to be generated. Can be set as "brief" or "plain". Only applies to the output format of the output files (target/surefire-reports/testName.txt) ++ ++ ++ reportNameSuffix ++ java.lang.String ++ false ++ true ++ Add custom text into report filename: TEST-testClassName-reportNameSuffix.xml, testClassName-reportNameSuffix.txt and testClassName-reportNameSuffix-output.txt. File TEST-testClassName-reportNameSuffix.xml has changed attributes 'testsuite'--'name' and 'testcase'--'classname' - reportNameSuffix is added to the attribute value. ++ ++ ++ reportsDirectory ++ java.io.File ++ false ++ true ++ Base directory where all reports are written to. ++ ++ ++ rerunFailingTestsCount ++ int ++ false ++ true ++ (JUnit 4+ providers and JUnit 5+ providers since 3.0.0-M4) The number of times each failing test will be rerun. If set larger than 0, rerun failing tests immediately after they fail. If a failing test passes in any of those reruns, it will be marked as pass and reported as a "flake". However, all the failing attempts will be recorded. ++ ++ ++ reuseForks ++ boolean ++ 2.13 ++ false ++ true ++ Indicates if forked VMs can be reused. If set to "false", a new VM is forked for each test class to be executed. If set to "true", up to forkCount VMs will be forked and then reused to execute all tests. ++ ++ ++ runOrder ++ java.lang.String ++ 2.7 ++ false ++ true ++ Defines the order the tests will be run in. Supported values are alphabetical, reversealphabetical, random, hourly (alphabetical on even hours, reverse alphabetical on odd hours), failedfirst, balanced and filesystem. ++ ++Odd/Even for hourly is determined at the time the of scanning the classpath, meaning it could change during a multi-module build. ++ ++Failed first will run tests that failed on previous run first, as well as new tests for this run. ++ ++Balanced is only relevant with parallel=classes, and will try to optimize the run-order of the tests reducing the overall execution time. Initially a statistics file is created and every next test run will reorder classes. ++ ++Note that the statistics are stored in a file named .surefire-XXXXXXXXX beside pom.xml and should not be checked into version control. The "XXXXX" is the SHA1 checksum of the entire surefire configuration, so different configurations will have different statistics files, meaning if you change any configuration settings you will re-run once before new statistics data can be established. ++ ++ ++ runOrderRandomSeed ++ java.lang.Long ++ 3.0.0-M6 ++ false ++ true ++ Sets the random seed that will be used to order the tests if failsafe.runOrder is set to random. ++ ++If no seeds are set and failsafe.runOrder is set to random, then the seed used will be outputted (search for "To reproduce ordering use flag -Dfailsafe.runOrder.random.seed"). ++ ++To deterministically reproduce any random test order that was run before, simply set the seed to be the same value. ++ ++ ++ shutdown ++ java.lang.String ++ 2.19 ++ false ++ true ++ After the plugin process is shutdown by sending SIGTERM signal (CTRL+C), SHUTDOWN command is received by every forked JVM. ++The value is set to (shutdown=exit) by default (changed in version 3.0.0-M4). ++The parameter can be configured with other two values testset and kill. ++With(shutdown=testset) the test set may still continue to run in forked JVM. ++Using exit forked JVM executes System.exit(1) after the plugin process has received SIGTERM signal. ++Using kill the JVM executes Runtime.halt(1) and kills itself. ++ ++ ++ skip ++ boolean ++ false ++ true ++ Set this to "true" to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you enable it using the "maven.test.skip" property, because maven.test.skip disables both running the tests and compiling the tests. Consider using the skipTests parameter instead. ++ ++ ++ skipAfterFailureCount ++ int ++ 2.19 ++ false ++ true ++ Set to error/failure count in order to skip remaining tests. Due to race conditions in parallel/forked execution this may not be fully guaranteed. ++Enable with system property -Dfailsafe.skipAfterFailureCount=1 or any number greater than zero. Defaults to "0". ++See the prerequisites and limitations in documentation: ++http://maven.apache.org/plugins/maven-failsafe-plugin/examples/skip-after-failure.html <http://maven.apache.org/plugins/maven-failsafe-plugin/examples/skip-after-failure.html> ++ ++ ++ skipExec ++ boolean ++ 2.3 ++ Use skipTests instead. ++ false ++ true ++ This old parameter is just like skipTests, but bound to the old property "maven.test.skip.exec". ++ ++ ++ skipITs ++ boolean ++ 2.4.3-alpha-2 ++ false ++ true ++ Set this to "true" to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++ ++ ++ skipTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to "true" to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++Failsafe plugin deprecated the parameter skipTests and the parameter will be removed in Failsafe 3.0.0 as it is a source of conflicts between Failsafe and Surefire plugin. ++ ++ ++ statelessTestsetInfoReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter ++ false ++ true ++ ++ ++ ++ statelessTestsetReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter ++ false ++ true ++ Note: use the legacy system property disableXmlReport set to true to disable the report. ++ ++ ++ suiteXmlFiles ++ java.io.File[] ++ 2.2 ++ false ++ true ++ (TestNG) List of <suiteXmlFile> elements specifying TestNG suite xml file locations. Note that suiteXmlFiles is incompatible with several other parameters of this plugin, like includes and excludes. ++This parameter is ignored if the test parameter is specified (allowing you to run a single test instead of an entire suite). ++ ++ ++ summaryFile ++ java.io.File ++ true ++ true ++ The summary file to write integration test results to. ++ ++ ++ systemProperties ++ java.util.Properties ++ Use systemPropertyVariables instead. ++ false ++ true ++ List of System properties to pass to a provider. ++See also: systemPropertyVariables for how the effective provider properties are calculated ++ ++ ++ systemPropertiesFile ++ java.io.File ++ false ++ true ++ Properties file being used as system properties passed to the provider. ++See also: systemPropertyVariables for how the effective provider properties are calculated ++ ++ ++ systemPropertyVariables ++ java.util.Map<java.lang.String, java.lang.String> ++ 2.5 ++ false ++ true ++ List of System properties to pass to a provider. The effective system properties given to a provider are contributed from several sources: ++* properties set via argLine with -D (only for forked executions) ++* systemProperties ++* getSystemPropertiesFile() (set via parameter systemPropertiesFile on some goals) ++* systemPropertyVariables ++* User properties from org.apache.maven.execution.MavenSession.getUserProperties(), usually set via CLI options given with -D on the current Maven process (only used as source if promoteUserPropertiesToSystemProperties is true) Later sources may overwrite same named properties from earlier sources, that means for example that one cannot overwrite user properties with either systemProperties, getSystemPropertiesFile() or systemPropertyVariables. ++Certain properties may only be overwritten via argLine (applicable only for forked executions) because their values are cached and only evaluated at the start of the JRE. Those include: ++ ++* java.library.path ++* file.encoding ++* jdk.map.althashing.threshold ++* line.separator ++See also: systemProperties ++ ++ ++ tempDir ++ java.lang.String ++ 2.20 ++ false ++ true ++ Relative path to temporary-surefire-boot directory containing internal Surefire temporary files. ++The temporary-surefire-boot directory is project.build.directory on most platforms or system default temporary-directory specified by the system property java.io.tmpdir on Windows (see SUREFIRE-1400 <https://issues.apache.org/jira/browse/SUREFIRE-1400>). ++It is deleted after the test set has completed. ++ ++ ++ test ++ java.lang.String ++ false ++ true ++ Specify this parameter to run individual tests by file name, overriding parameter includes and excludes. Each pattern you specify here will be used to create an include pattern formatted like **/${it.test}.java, so you can just type -Dit.test=MyIT to run a single test file called "foo/MyIT.java". The test patterns prefixed with a ! will be excluded. ++This parameter overrides the parameter includes and excludes, and the TestNG parameter suiteXmlFiles. ++Since 2.7.3 You can execute a limited number of methods in the test with adding #myMethod or #my*ethod. E.g. type -Dit.test=MyIT#myMethod supported for junit 4.x and TestNg. ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): "-Dit.test=???IT, !Unstable*, pkg/**/Ci*leIT.java, *IT#test*One+testTwo?????, #fast*+slowTest" or e.g. ++"-Dit.test=Basic*, !%regex[.*.Unstable.*], !%regex[.*.MyIT.class#one.*|two.*], %regex[#fast.*|slow.*]" ++The Parameterized JUnit runner describes test methods using an index in brackets, so the non-regex method pattern would become: #testMethod[*]. If using @Parameters(name="{index}: fib({0})={1}") and selecting the index e.g. 5 in pattern, the non-regex method pattern would become #testMethod[5:*]. ++ ++ ++ testClassesDirectory ++ java.io.File ++ false ++ true ++ The directory containing generated test classes of the project being tested. This will be included at the beginning of the test classpath. ++ ++ ++ testNGArtifactName ++ java.lang.String ++ 2.3.1 ++ false ++ true ++ Allows you to specify the name of the TestNG artifact. If not set, org.testng:testng will be used. ++ ++ ++ testSourceDirectory ++ java.io.File ++ 2.2 ++ false ++ true ++ The test source directory containing test class sources. Important only for TestNG HTML reports. ++ ++ ++ threadCount ++ int ++ 2.2 ++ false ++ true ++ (TestNG/JUnit 4.7 provider) The attribute thread-count allows you to specify how many threads should be allocated for this execution. Only makes sense to use in conjunction with the parallel parameter. ++ ++ ++ threadCountClasses ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test classes, i.e.: ++* number of concurrent classes if threadCount is 0 or unspecified ++* limited classes concurrency if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 30% of threadCount in concurrent classes. ++* as in the previous case but without this leaf thread-count. Example: parallel=suitesAndClasses, threadCount=16, threadCountSuites=5, threadCountClasses is unspecified leaf, the number of concurrent classes is varying from >= 11 to 14 or 15. The threadCountSuites become given number of threads. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ threadCountMethods ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test methods, i.e.: ++* number of concurrent methods if threadCount is 0 or unspecified ++* limited concurrency of methods if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 50% of threadCount which appears in concurrent methods. ++* as in the previous case but without this leaf thread-count. Example: parallel=all, threadCount=16, threadCountSuites=2, threadCountClasses=3, but threadCountMethods is unspecified leaf, the number of concurrent methods is varying from >= 11 to 14 or 15. The threadCountSuites and threadCountClasses become given number of threads. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ threadCountSuites ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test suites, i.e.: ++* number of concurrent suites if threadCount is 0 or unspecified ++* limited suites concurrency if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 20% of threadCount which appeared in concurrent suites. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ trimStackTrace ++ boolean ++ 2.2 ++ false ++ true ++ Whether to trim the stack trace in the reports to just the lines within the test, or show the full trace. ++ ++ ++ useFile ++ boolean ++ false ++ true ++ Option to generate a file test report or just output the test report to the console. ++ ++ ++ useManifestOnlyJar ++ boolean ++ 2.4.3 ++ false ++ true ++ By default, Surefire forks your tests using a manifest-only JAR; set this parameter to "false" to force it to launch your tests with a plain old Java classpath. (See the http://maven.apache.org/plugins/maven-failsafe-plugin/examples/class-loading.html <http://maven.apache.org/plugins/maven-failsafe-plugin/examples/class-loading.html> for a more detailed explanation of manifest-only JARs and their benefits.) ++Beware, setting this to "false" may cause your tests to fail on Windows if your classpath is too long. ++ ++ ++ useModulePath ++ boolean ++ 3.0.0-M2 ++ false ++ true ++ When true, uses the modulepath when executing with JDK 9+ and module-info.java is present. When false, always uses the classpath. ++Defaults to true. ++ ++ ++ useSystemClassLoader ++ boolean ++ 2.3 ++ false ++ true ++ Option to pass dependencies to the system's classloader instead of using an isolated class loader when forking. Prevents problems with JDKs which implement the service provider lookup mechanism by using the system's classloader. ++ ++ ++ useUnlimitedThreads ++ boolean ++ 2.5 ++ false ++ true ++ (JUnit 4.7 provider) Indicates that the thread pool will be unlimited. The parallel parameter and the actual number of classes/methods will decide. Setting this to "true" effectively disables perCoreThreadCount and threadCount. Defaults to "false". ++ ++ ++ workingDirectory ++ java.io.File ++ 2.1.3 ++ false ++ true ++ Command line working directory. ++ ++ ++ ++ ${maven.test.additionalClasspathDependencies} ++ ${maven.test.additionalClasspath} ++ ${argLine} ++ ${childDelegation} ++ ${maven.test.dependency.excludes} ++ ${maven.failsafe.debug} ++ ${dependenciesToScan} ++ ${disableXmlReport} ++ ${enableAssertions} ++ ${enableOutErrElements} ++ ${failsafe.enableProcessChecker} ++ ${enablePropertiesElement} ++ ${encoding} ++ ${failsafe.excludeJUnit5Engines} ++ ${failsafe.excludedEnvironmentVariables} ++ ${excludedGroups} ++ ${failsafe.excludes} ++ ${failsafe.excludesFile} ++ ${failsafe.failIfNoSpecifiedTests} ++ ${it.failIfNoSpecifiedTests} ++ ${failIfNoTests} ++ ${forkCount} ++ ${failsafe.forkNode} ++ ${failsafe.exitTimeout} ++ ${failsafe.timeout} ++ ${groups} ++ ${failsafe.includeJUnit5Engines} ++ ${failsafe.includes} ++ ${failsafe.includesFile} ++ ${junitArtifactName} ++ ${jvm} ++ ${objectFactory} ++ ${parallel} ++ ${parallelOptimized} ++ ${failsafe.parallel.forcedTimeout} ++ ${failsafe.parallel.timeout} ++ ${perCoreThreadCount} ++ ${failsafe.printSummary} ++ ++ ${maven.test.redirectTestOutputToFile} ++ ${failsafe.reportFormat} ++ ${surefire.reportNameSuffix} ++ ++ ${failsafe.rerunFailingTestsCount} ++ ${reuseForks} ++ ${failsafe.runOrder} ++ ${failsafe.runOrder.random.seed} ++ ${failsafe.shutdown} ++ ${maven.test.skip} ++ ${failsafe.skipAfterFailureCount} ++ ${maven.test.skip.exec} ++ ${skipITs} ++ ${skipTests} ++ ${failsafe.suiteXmlFiles} ++ ++ ${failsafe.systemPropertiesFile} ++ ${tempDir} ++ ${it.test} ++ ++ ${testNGArtifactName} ++ ++ ${threadCount} ++ ${threadCountClasses} ++ ${threadCountMethods} ++ ${threadCountSuites} ++ ${trimStackTrace} ++ ${failsafe.useFile} ++ ${failsafe.useManifestOnlyJar} ++ ${failsafe.useModulePath} ++ ${failsafe.useSystemClassLoader} ++ ${useUnlimitedThreads} ++ ${basedir} ++ ++ ++ ++ verify ++ Verify integration tests ran using Failsafe. ++ false ++ true ++ false ++ false ++ false ++ true ++ verify ++ org.apache.maven.plugin.failsafe.VerifyMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ basedir ++ java.io.File ++ false ++ true ++ The base directory of the project being tested. This can be obtained in your unit test by System.getProperty("basedir"). ++ ++ ++ encoding ++ java.lang.String ++ since of 2.20.1 ++ false ++ true ++ The character encoding scheme to be applied. Deprecated since 2.20.1 and used encoding UTF-8 in failsafe-summary.xml. ++ ++ ++ failIfNoTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to "true" to cause a failure if there are no tests to run. Defaults to "false". ++ ++ ++ failOnFlakeCount ++ int ++ 3.0.0-M6 ++ false ++ true ++ Set this to a value greater than 0 to fail the whole test set if the cumulative number of flakes reaches this threshold. Set to 0 to allow an unlimited number of flakes. ++ ++ ++ reportsDirectory ++ java.io.File ++ false ++ true ++ Base directory where all reports are written to. ++ ++ ++ skip ++ boolean ++ false ++ true ++ Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you enable it using the "maven.test.skip" property, because maven.test.skip disables both running the tests and compiling the tests. Consider using the skipTests parameter instead. ++ ++ ++ skipExec ++ boolean ++ 2.3 ++ Use -DskipTests instead. ++ false ++ true ++ This old parameter is just like skipTests, but bound to the old property maven.test.skip.exec. ++ ++ ++ skipITs ++ boolean ++ 2.4.3-alpha-2 ++ false ++ true ++ Set this to 'true' to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++ ++ ++ skipTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to 'true' to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++ ++ ++ summaryFile ++ java.io.File ++ true ++ true ++ The summary file to read integration test results from. ++ ++ ++ summaryFiles ++ java.io.File[] ++ 2.6 ++ false ++ true ++ Additional summary files to read integration test results from. ++ ++ ++ testClassesDirectory ++ java.io.File ++ false ++ true ++ The directory containing generated test classes of the project being tested. This will be included at the beginning the test classpath. ++ ++ ++ testFailureIgnore ++ boolean ++ false ++ true ++ Set this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++ ++ ++ ++ ++ ${encoding} ++ ${failIfNoTests} ++ ${failsafe.failOnFlakeCount} ++ ++ ${maven.test.skip} ++ ${maven.test.skip.exec} ++ ${skipITs} ++ ${skipTests} ++ ++ ++ ${maven.test.failure.ignore} ++ ++ ++ ++ +diff --git a/maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml b/maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml +new file mode 100644 +index 000000000..6fff09c3b +--- /dev/null ++++ b/maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml +@@ -0,0 +1,1308 @@ ++ ++ ++ ++ ++ ++ ${project.name} ++ ${project.description} ++ ${project.groupId} ++ ${project.artifactId} ++ ${project.version} ++ failsafe ++ false ++ true ++ 1.8 ++ 3.6.3 ++ ++ ++ help ++ Display help information on maven-failsafe-plugin. ++Call mvn failsafe:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ false ++ false ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.maven_failsafe_plugin.HelpMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ detail ++ boolean ++ false ++ true ++ If true, display all settable properties for each goal. ++ ++ ++ goal ++ java.lang.String ++ false ++ true ++ The name of the goal for which to show help. If unspecified, all goals will be displayed. ++ ++ ++ indentSize ++ int ++ false ++ true ++ The number of spaces per indentation level, should be positive. ++ ++ ++ lineLength ++ int ++ false ++ true ++ The maximum length of a display line, should be positive. ++ ++ ++ ++ ${detail} ++ ${goal} ++ ${indentSize} ++ ${lineLength} ++ ++ ++ ++ integration-test ++ Run integration tests using Surefire. ++ test ++ false ++ true ++ false ++ false ++ false ++ true ++ integration-test ++ org.apache.maven.plugin.failsafe.IntegrationTestMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ additionalClasspathDependencies ++ java.util.List ++ 3.2 ++ false ++ true ++ Additional Maven dependencies to be added to the test classpath at runtime. Each element supports the parametrization like documented in POM Reference: Dependencies <https://maven.apache.org/pom.html#dependencies>. ++Those dependencies are automatically collected (i.e. have their full dependency tree calculated) and then all underlying artifacts are resolved from the repository (including their transitive dependencies). Afterwards the resolved artifacts are filtered to only contain compile and runtime scoped ones and appended to the test classpath at runtime (after the ones from additionalClasspathElements). ++ ++The following differences to regular project dependency resolving apply: ++ ++* The dependency management from the project is not taken into account. ++* Conflicts between the different items and the project dependencies are not resolved. ++* Only external dependencies (outside the current Maven reactor) are supported. ++ ++ ++ additionalClasspathElements ++ java.lang.String[] ++ 2.4 ++ false ++ true ++ Additional elements to be appended to the test classpath at runtime. Each element must be a file system path to a JAR file or a directory containing classes. No wildcards are allowed here. ++ ++ ++ argLine ++ java.lang.String ++ 2.1 ++ false ++ true ++ Arbitrary JVM options to set on the command line. Only effective for forked executions. ++ ++Since the Version 2.17 using an alternate syntax for argLine, @{...} allows late replacement of properties when the plugin is executed, so properties that have been modified by other plugins will be picked up correctly. See the Frequently Asked Questions page with more details: ++http://maven.apache.org/surefire/maven-surefire-plugin/faq.html <http://maven.apache.org/surefire/maven-surefire-plugin/faq.html> ++http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html <http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html> ++See also: forkCount ++ ++ ++ basedir ++ java.io.File ++ true ++ false ++ The base directory of the project being tested. This can be obtained in your integration test via System.getProperty("basedir"). ++ ++ ++ childDelegation ++ boolean ++ 2.1 ++ false ++ true ++ When false it makes tests run using the standard classloader delegation instead of the default Maven isolated classloader. Only used when forking (forkCount is greater than zero). ++Setting it to false helps with some problems caused by conflicts between xml parsers in the classpath and the Java 5 provider parser. ++ ++ ++ classesDirectory ++ java.io.File ++ false ++ true ++ The path representing project JAR file, if exists; Otherwise the directory containing generated classes of the project being tested. This will be included after the test classes in the test classpath. Defaults to built artifact JAR file or ${project.build.outputDirectory}. ++ ++ ++ classpathDependencyExcludes ++ java.lang.String[] ++ 2.6 ++ false ++ true ++ List of dependencies to exclude from the test classpath at runtime. Each item is passed as pattern to org.apache.maven.shared.artifact.filter.PatternIncludesArtifactFilter. The pattern is matched against the following artifact ids: ++* groupId:artifactId (Short ID) ++* groupId:artifactId:type:classifier (Dependency Conflict ID) ++* groupId:artifactId:type:classifier:version (Full ID) The matching algorithm is described in detail in Advanced Artifact-Matching <https://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html#advanced-artifact-matching-in-includes-and-excludes> for the maven-assembly-plugin. This parameter behaves the same as the excludes pattern described there. The dependency matching is applied to the project dependency IDs (including transitive ones) after resolving, i.e. excluding one dependency will not exclude its transitive dependencies! ++ ++ ++ classpathDependencyScopeExclude ++ java.lang.String ++ 2.6 ++ false ++ true ++ A dependency scope to exclude from the test classpath at runtime. The scope should be one of the scopes defined by org.apache.maven.artifact.Artifact. This includes the following: ++ ++* compile - system, provided, compile ++* runtime - compile, runtime ++* compile+runtime - system, provided, compile, runtime ++* runtime+system - system, compile, runtime ++* test - system, provided, compile, runtime, test ++ ++ ++ consoleOutputReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter ++ false ++ true ++ ++ ++ ++ debugForkedProcess ++ java.lang.String ++ 2.4 ++ false ++ true ++ Attach a debugger to the forked JVM. If set to "true", the process will suspend and wait for a debugger to attach on port 5005. If set to some other string, that string will be appended to the argLine, allowing you to configure arbitrary debugging ability options (without overwriting the other options specified through the argLine parameter). ++ ++ ++ defaultClassesDirectory ++ java.io.File ++ true ++ false ++ ++ ++ ++ dependenciesToScan ++ java.lang.String[] ++ 2.15 ++ false ++ true ++ List of dependencies to scan for test classes to include in the test run. The child elements of this element must be <dependency> elements, and the contents of each of these elements must be a string which follows the general form: ++groupId[:artifactId[:type[:classifier][:version]]] ++ ++The wildcard character * can be used within the sub parts of those composite identifiers to do glob-like pattern matching. The classifier may be omitted when matching dependencies without a classifier. ++ ++Examples: ++ ++* group or, equivalently, group:* ++* g*p:*rtifac* ++* group:*:jar ++* group:artifact:*:1.0.0 (no classifier) ++* group:*:test-jar:tests ++* *:artifact:*:*:1.0.0 ++Since version 2.22.0 you can scan for test classes from a project dependency of your multi-module project. ++ ++In versions before 3.0.0-M4, only groupId:artifactId is supported. ++ ++ ++ ++ disableXmlReport ++ boolean ++ 2.2 ++ No reason given ++ false ++ true ++ Flag to disable the generation of report files in xml format. Deprecated since 3.0.0-M4. Instead use disable within statelessTestsetReporter since of 3.0.0-M6. ++ ++ ++ enableAssertions ++ boolean ++ 2.3.1 ++ false ++ true ++ By default, Surefire enables JVM assertions for the execution of your test cases. To disable the assertions, set this flag to "false". ++ ++ ++ enableOutErrElements ++ boolean ++ 3.3.1 ++ false ++ true ++ Flag for including/excluding <system-out /> and <system-err /> elements for successfully passed tests in XML reports. Note that the default value may change to false is a future version. ++ ++ ++ enableProcessChecker ++ java.lang.String ++ 3.0.0-M4 ++ false ++ true ++ Since 3.0.0-M4 the process checkers are disabled. You can enable them namely by setting ping and native or all in this parameter. ++The checker is useful in situations when you kill the build on a CI system and you want the Surefire forked JVM to kill the tests asap and free all handlers on the file system been previously used by the JVM and by the tests. ++The ping should be safely used together with ZGC or Shenandoah Garbage Collector. Due to the ping relies on timing of the PING (triggered every 30 seconds), slow GCs may pause the timers and pretend that the parent process of the forked JVM does not exist. ++The native is very fast checker. It is useful mechanism on Unix based systems, Linux distributions and Alpine/BusyBox Linux. See the JIRA SUREFIRE-1631 <https://issues.apache.org/jira/browse/SUREFIRE-1631> for Windows issues. ++Another useful configuration parameter is forkedProcessTimeoutInSeconds. ++See the Frequently Asked Questions page with more details: ++http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#kill-jvm <http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#kill-jvm> ++http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html#kill-jvm <http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html#kill-jvm> ++Example of use: ++mvn test -Dfailsafe.enableProcessChecker=all ++ ++ ++ enablePropertiesElement ++ boolean ++ 3.3.1 ++ false ++ true ++ Flag for including/excluding <properties /> element for successfully passed tests in XML reports. ++ ++ ++ encoding ++ java.lang.String ++ 3.0.0-M1 ++ false ++ true ++ The character encoding scheme to be applied while generating test report files (see target/surefire-reports/yourTestName.txt). The report output files (*-out.txt) are still encoded with JVM's encoding used in standard out/err pipes. ++ ++ ++ environmentVariables ++ java.util.Map ++ 2.1.3 ++ false ++ true ++ Additional environment variables to set on the command line. ++ ++ ++ excludeJUnit5Engines ++ java.lang.String[] ++ 3.0.0-M6 ++ false ++ true ++ Provide the ID/s of an JUnit engine to be excluded in the test run. ++ ++ ++ excludedEnvironmentVariables ++ java.lang.String[] ++ 3.0.0-M4 ++ false ++ true ++ You can selectively exclude individual environment variables by enumerating their keys. ++The environment is a system-dependent mapping from keys to values which is inherited from the Maven process to the forked Surefire processes. The keys must literally (case sensitive) match in order to exclude their environment variable. ++Example to exclude three environment variables: ++mvn test -Dfailsafe.excludedEnvironmentVariables=ACME1,ACME2,ACME3 ++ ++ ++ excludedGroups ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG/JUnit47 provider with JUnit4.8+ only and JUnit5+ provider since 2.22.0) Excluded groups/categories/tags. Any methods/classes/etc with one of the groups/categories/tags specified in this list will specifically not be run. ++For JUnit4, this parameter forces the use of the 4.7 provider. For JUnit5, this parameter forces the use of the JUnit platform provider. ++This parameter is ignored if the suiteXmlFiles parameter is specified. ++Since version 2.18.1 and JUnit 4.12, the @Category annotation type is automatically inherited from superclasses, see @java.lang.annotation.Inherited. Make sure that test class inheritance still makes sense together with @Category annotation of the JUnit 4.12 or higher appeared in superclass. ++ ++ ++ excludes ++ java.util.List ++ false ++ true ++ A list of <exclude> elements specifying the tests (by pattern) that should be excluded in testing. When not specified and when the test parameter is not specified, the default excludes will be ++<excludes> <exclude>**/*$*</exclude> </excludes> (which excludes all inner classes). ++This parameter is ignored if the TestNG suiteXmlFiles parameter is specified. ++Each exclude item may also contain a comma-separated sub-list of items, which will be treated as multiple <exclude> entries. ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): <exclude>%regex[pkg.*Slow.*.class], Unstable*</exclude> ++Notice that these values are relative to the directory containing generated test classes of the project being tested. This directory is declared by the parameter testClassesDirectory which defaults to the POM property ${project.build.testOutputDirectory}, typically src/test/java unless overridden. ++ ++ ++ excludesFile ++ java.io.File ++ 2.13 ++ false ++ true ++ A file containing exclude patterns, each in a next line. Blank lines, or lines starting with # are ignored. If excludes are also specified, these patterns are appended. Example with path, simple and regex excludes: */it/* **/DontRunIT.* %regex[.*IT.*|.*Not.*] ++Since 3.0.0-M6, method filtering support is provided in the exclusions file as well, example: pkg.SomeIT#testMethod ++ ++ ++ failIfNoSpecifiedTests ++ boolean ++ 3.0.0-M8 ++ false ++ true ++ Set this to "false" to prevent a failure if none of the tests specified in -Dit.test=... are run. Defaults to "true". Replacing "it.failIfNoSpecifiedTests" to be consistent with surefire plugin. ++ ++ ++ failIfNoSpecifiedTestsDeprecated ++ boolean ++ 2.12 ++ Since 3.0.0-M8, use "failsafe.failIfNoSpecifiedTests" instead. ++ false ++ true ++ Set this to "false" to prevent a failure if none of the tests specified in -Dit.test=... are run. Defaults to "true". ++ ++ ++ failIfNoTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to "true" to cause a failure if there are no tests to run. Defaults to "false". ++ ++ ++ forkCount ++ java.lang.String ++ 2.14 ++ false ++ true ++ Option to specify the number of VMs to fork in parallel in order to execute the tests. When terminated with "C", the number part is multiplied with the number of CPU cores. Floating point value are only accepted together with "C". If set to "0", no VM is forked and all tests are executed within the main process. ++ ++Example values: "1.5C", "4" ++ ++The system properties and the argLine of the forked processes may contain the place holder string ${surefire.forkNumber}, which is replaced with a fixed number for each of the parallel forks, ranging from 1 to the effective value of forkCount times the maximum number of parallel Surefire executions in maven parallel builds, i.e. the effective value of the -T command line argument of maven core. ++ ++ ++ forkNode ++ org.apache.maven.surefire.extensions.ForkNodeFactory ++ 3.0.0-M5 ++ false ++ true ++ This parameter configures the forked node. Currently, you can select the communication protocol, i.e. process pipes or TCP/IP sockets. The plugin uses process pipes by default which will be turned to TCP/IP in the version 3.0.0. Alternatively, you can implement your own factory and SPI. ++See the documentation for more details: ++https://maven.apache.org/plugins/maven-surefire-plugin/examples/process-communication.html <https://maven.apache.org/plugins/maven-surefire-plugin/examples/process-communication.html> ++ ++ ++ forkedProcessExitTimeoutInSeconds ++ int ++ 2.20 ++ false ++ true ++ Forked process is normally terminated without any significant delay after given tests have completed. If the particular tests started non-daemon Thread(s), the process hangs instead of been properly terminated by System.exit(). Use this parameter in order to determine the timeout of terminating the process. see the documentation: http://maven.apache.org/surefire/maven-failsafe-plugin/examples/shutdown.html <http://maven.apache.org/surefire/maven-failsafe-plugin/examples/shutdown.html> ++ ++ ++ forkedProcessTimeoutInSeconds ++ int ++ 2.4 ++ false ++ true ++ Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out. ++ ++ ++ groups ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG/JUnit47 provider with JUnit4.8+ only and JUnit5+ provider since 2.22.0) Groups/categories/tags for this test. Only classes/methods/etc decorated with one of the groups/categories/tags specified here will be included in test run, if specified. ++For JUnit4 tests, this parameter forces the use of the 4.7 provider. For JUnit5 tests, this parameter forces the use of the JUnit platform provider. ++This parameter is ignored if the suiteXmlFiles parameter is specified. ++Since version 2.18.1 and JUnit 4.12, the @Category annotation type is automatically inherited from superclasses, see @java.lang.annotation.Inherited. Make sure that test class inheritance still makes sense together with @Category annotation of the JUnit 4.12 or higher appeared in superclass. ++ ++ ++ includeJUnit5Engines ++ java.lang.String[] ++ 3.0.0-M6 ++ false ++ true ++ Provide the ID/s of an JUnit engine to be included in the test run. ++ ++ ++ includes ++ java.util.List ++ false ++ true ++ A list of <include> elements specifying the test filter (by pattern) of tests which should be included in testing. If it is not specified and the test parameter is unspecified as well, the default includes is <includes> <include>**/IT*.java</include> <include>**/*IT.java</include> <include>**/*ITCase.java</include> </includes> ++Each include item may also contain a comma-separated sublist of items, which will be treated as multiple <include> entries. ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): <include>%regex[.*[Cat|Dog].*], Basic????, !Unstable*</include> <include>%regex[.*[Cat|Dog].*], !%regex[pkg.*Slow.*.class], pkg/**/*Fast*.java</include> ++This parameter is ignored if the TestNG suiteXmlFiles parameter is specified. ++ ++Notice that these values are relative to the directory containing generated test classes of the project being tested. This directory is declared by the parameter testClassesDirectory which defaults to the POM property ${project.build.testOutputDirectory}, typically src/test/java unless overridden. ++ ++ ++ includesFile ++ java.io.File ++ 2.13 ++ false ++ true ++ A file containing include patterns, each in a next line. Blank lines, or lines starting with # are ignored. If includes are also specified, these patterns are appended. Example with path, simple and regex includes: */it/* **/NotIncludedByDefault.java %regex[.*IT.*|.*Not.*] ++Since 3.0.0-M6, method filtering support is provided in the inclusions file as well, example: pkg.SomeIT#testMethod ++ ++ ++ jdkToolchain ++ java.util.Map ++ 3.0.0-M5 and Maven 3.3.x ++ false ++ true ++ ++Allow for configuration of the test jvm via maven toolchains. This permits a configuration where the project is built with one jvm and tested with another. This is similar to jvm, but avoids hardcoding paths. The two parameters are mutually exclusive (jvm wins) ++ ++Examples: ++(see Guide to Toolchains <https://maven.apache.org/guides/mini/guide-using-toolchains.html> for more info) <configuration> ... <jdkToolchain> <version>1.11</version> </jdkToolchain> </configuration> <configuration> ... <jdkToolchain> <version>1.8</version> <vendor>zulu</vendor> </jdkToolchain> </configuration> ++ ++ ++ junitArtifactName ++ java.lang.String ++ 2.3.1 ++ false ++ true ++ Allows you to specify the name of the JUnit artifact. If not set, junit:junit will be used. ++ ++ ++ jvm ++ java.lang.String ++ 2.1 ++ false ++ true ++ Option to specify the jvm (or path to the java executable) to use with the forking options. For the default, the jvm will be a new instance of the same VM as the one used to run Maven. JVM settings are not inherited from MAVEN_OPTS. ++ ++ ++ objectFactory ++ java.lang.String ++ 2.5 ++ false ++ true ++ (TestNG only) Define the factory class used to create all test instances. ++ ++ ++ parallel ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG provider) When you use the parameter parallel, TestNG will try to run all your test methods in separate threads, except for methods that depend on each other, which will be run in the same thread in order to respect their order of execution. Supports two values: classes or methods. ++(JUnit 4.7 provider) Supports values classes, methods, both to run in separate threads been controlled by threadCount. ++ ++Since version 2.16 (JUnit 4.7 provider), the value both is DEPRECATED. Use classesAndMethods instead. ++ ++Since version 2.16 (JUnit 4.7 provider), additional vales are available: ++suites, suitesAndClasses, suitesAndMethods, classesAndMethods, all. ++By default, Surefire does not execute tests in parallel. You can set the parameter parallel to none to explicitly disable parallel execution (e.g. when disabling parallel execution in special Maven profiles when executing coverage analysis). ++ ++ ++ parallelMavenExecution ++ java.lang.Boolean ++ false ++ false ++ Parallel Maven Execution. ++ ++ ++ parallelOptimized ++ boolean ++ 2.17 ++ false ++ true ++ (JUnit 4.7 / provider only) The thread counts do not exceed the number of parallel suite, class runners and average number of methods per class if set to true. ++True by default. ++ ++ ++ parallelTestsTimeoutForcedInSeconds ++ double ++ 2.16 ++ false ++ true ++ Stop executing queued parallel JUnit tests and interrupt currently running tests after a certain number of seconds. ++Example values: "3.5", "4" ++ ++If set to 0, wait forever, never timing out. Makes sense with specified parallel different from "none". ++ ++ ++ parallelTestsTimeoutInSeconds ++ double ++ 2.16 ++ false ++ true ++ Stop executing queued parallel JUnit tests after a certain number of seconds. ++Example values: "3.5", "4" ++ ++If set to 0, wait forever, never timing out. Makes sense with specified parallel different from "none". ++ ++ ++ perCoreThreadCount ++ boolean ++ 2.5 ++ false ++ true ++ (JUnit 4.7 provider) Indicates that threadCount, threadCountSuites, threadCountClasses, threadCountMethods are per cpu core. ++ ++ ++ pluginArtifactMap ++ java.util.Map ++ true ++ false ++ Map of plugin artifacts. ++ ++ ++ pluginDescriptor ++ org.apache.maven.plugin.descriptor.PluginDescriptor ++ 2.12 ++ true ++ false ++ Information about this plugin, mainly used to lookup this plugin's configuration from the currently executing project. ++ ++ ++ printSummary ++ boolean ++ false ++ true ++ Option to print summary of test suites or just print the test cases that have errors. ++ ++ ++ project ++ org.apache.maven.project.MavenProject ++ true ++ false ++ The Maven Project Object. ++ ++ ++ projectArtifactMap ++ java.util.Map ++ true ++ false ++ Map of project artifacts. ++ ++ ++ projectBuildDirectory ++ java.io.File ++ 2.20 ++ true ++ false ++ Read-only parameter with value of Maven property project.build.directory. ++ ++ ++ promoteUserPropertiesToSystemProperties ++ boolean ++ 3.4.0 ++ false ++ true ++ If set to true will also pass all user properties exposed via org.apache.maven.execution.MavenSession.getUserProperties() as system properties to a provider. Those always take precedence over same named system properties set via any other means. ++See also: systemPropertyVariables ++ ++ ++ properties ++ java.util.Properties ++ 2.4 ++ false ++ true ++ List of properties for configuring the testing provider. This is the preferred method of configuring TestNG and JUnit platform providers. ++ ++JUnit platform properties may be defined in a configurationParameters element: <properties> <configurationParameters> junit.jupiter.execution.parallel.enabled = true junit.jupiter.execution.parallel.mode.default = concurrent </configurationParameters> </properties> ++TestNG properties may be defined as distinct element blocks: <properties> <property> <name>parallel</name> <value>methods</value> </property> </properties> ++ ++ ++ redirectTestOutputToFile ++ boolean ++ 2.3 ++ false ++ true ++ Set this to "true" to redirect the unit test standard output to a file (found in reportsDirectory/testName-output.txt). ++ ++ ++ reportFormat ++ java.lang.String ++ false ++ true ++ Selects the formatting for the test report to be generated. Can be set as "brief" or "plain". Only applies to the output format of the output files (target/surefire-reports/testName.txt) ++ ++ ++ reportNameSuffix ++ java.lang.String ++ false ++ true ++ Add custom text into report filename: TEST-testClassName-reportNameSuffix.xml, testClassName-reportNameSuffix.txt and testClassName-reportNameSuffix-output.txt. File TEST-testClassName-reportNameSuffix.xml has changed attributes 'testsuite'--'name' and 'testcase'--'classname' - reportNameSuffix is added to the attribute value. ++ ++ ++ reportsDirectory ++ java.io.File ++ false ++ true ++ Base directory where all reports are written to. ++ ++ ++ rerunFailingTestsCount ++ int ++ false ++ true ++ (JUnit 4+ providers and JUnit 5+ providers since 3.0.0-M4) The number of times each failing test will be rerun. If set larger than 0, rerun failing tests immediately after they fail. If a failing test passes in any of those reruns, it will be marked as pass and reported as a "flake". However, all the failing attempts will be recorded. ++ ++ ++ reuseForks ++ boolean ++ 2.13 ++ false ++ true ++ Indicates if forked VMs can be reused. If set to "false", a new VM is forked for each test class to be executed. If set to "true", up to forkCount VMs will be forked and then reused to execute all tests. ++ ++ ++ runOrder ++ java.lang.String ++ 2.7 ++ false ++ true ++ Defines the order the tests will be run in. Supported values are alphabetical, reversealphabetical, random, hourly (alphabetical on even hours, reverse alphabetical on odd hours), failedfirst, balanced and filesystem. ++ ++Odd/Even for hourly is determined at the time the of scanning the classpath, meaning it could change during a multi-module build. ++ ++Failed first will run tests that failed on previous run first, as well as new tests for this run. ++ ++Balanced is only relevant with parallel=classes, and will try to optimize the run-order of the tests reducing the overall execution time. Initially a statistics file is created and every next test run will reorder classes. ++ ++Note that the statistics are stored in a file named .surefire-XXXXXXXXX beside pom.xml and should not be checked into version control. The "XXXXX" is the SHA1 checksum of the entire surefire configuration, so different configurations will have different statistics files, meaning if you change any configuration settings you will re-run once before new statistics data can be established. ++ ++ ++ runOrderRandomSeed ++ java.lang.Long ++ 3.0.0-M6 ++ false ++ true ++ Sets the random seed that will be used to order the tests if failsafe.runOrder is set to random. ++ ++If no seeds are set and failsafe.runOrder is set to random, then the seed used will be outputted (search for "To reproduce ordering use flag -Dfailsafe.runOrder.random.seed"). ++ ++To deterministically reproduce any random test order that was run before, simply set the seed to be the same value. ++ ++ ++ session ++ org.apache.maven.execution.MavenSession ++ true ++ false ++ The current build session instance. ++ ++ ++ shutdown ++ java.lang.String ++ 2.19 ++ false ++ true ++ After the plugin process is shutdown by sending SIGTERM signal (CTRL+C), SHUTDOWN command is received by every forked JVM. ++The value is set to (shutdown=exit) by default (changed in version 3.0.0-M4). ++The parameter can be configured with other two values testset and kill. ++With(shutdown=testset) the test set may still continue to run in forked JVM. ++Using exit forked JVM executes System.exit(1) after the plugin process has received SIGTERM signal. ++Using kill the JVM executes Runtime.halt(1) and kills itself. ++ ++ ++ skip ++ boolean ++ false ++ true ++ Set this to "true" to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you enable it using the "maven.test.skip" property, because maven.test.skip disables both running the tests and compiling the tests. Consider using the skipTests parameter instead. ++ ++ ++ skipAfterFailureCount ++ int ++ 2.19 ++ false ++ true ++ Set to error/failure count in order to skip remaining tests. Due to race conditions in parallel/forked execution this may not be fully guaranteed. ++Enable with system property -Dfailsafe.skipAfterFailureCount=1 or any number greater than zero. Defaults to "0". ++See the prerequisites and limitations in documentation: ++http://maven.apache.org/plugins/maven-failsafe-plugin/examples/skip-after-failure.html <http://maven.apache.org/plugins/maven-failsafe-plugin/examples/skip-after-failure.html> ++ ++ ++ skipExec ++ boolean ++ 2.3 ++ Use skipTests instead. ++ false ++ true ++ This old parameter is just like skipTests, but bound to the old property "maven.test.skip.exec". ++ ++ ++ skipITs ++ boolean ++ 2.4.3-alpha-2 ++ false ++ true ++ Set this to "true" to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++ ++ ++ skipTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to "true" to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++Failsafe plugin deprecated the parameter skipTests and the parameter will be removed in Failsafe 3.0.0 as it is a source of conflicts between Failsafe and Surefire plugin. ++ ++ ++ statelessTestsetInfoReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter ++ false ++ true ++ ++ ++ ++ statelessTestsetReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter ++ false ++ true ++ Note: use the legacy system property disableXmlReport set to true to disable the report. ++ ++ ++ suiteXmlFiles ++ java.io.File[] ++ 2.2 ++ false ++ true ++ (TestNG) List of <suiteXmlFile> elements specifying TestNG suite xml file locations. Note that suiteXmlFiles is incompatible with several other parameters of this plugin, like includes and excludes. ++This parameter is ignored if the test parameter is specified (allowing you to run a single test instead of an entire suite). ++ ++ ++ summaryFile ++ java.io.File ++ true ++ true ++ The summary file to write integration test results to. ++ ++ ++ systemProperties ++ java.util.Properties ++ Use systemPropertyVariables instead. ++ false ++ true ++ List of System properties to pass to a provider. ++See also: systemPropertyVariables for how the effective provider properties are calculated ++ ++ ++ systemPropertiesFile ++ java.io.File ++ false ++ true ++ Properties file being used as system properties passed to the provider. ++See also: systemPropertyVariables for how the effective provider properties are calculated ++ ++ ++ systemPropertyVariables ++ java.util.Map ++ 2.5 ++ false ++ true ++ List of System properties to pass to a provider. The effective system properties given to a provider are contributed from several sources: ++* properties set via argLine with -D (only for forked executions) ++* systemProperties ++* getSystemPropertiesFile() (set via parameter systemPropertiesFile on some goals) ++* systemPropertyVariables ++* User properties from org.apache.maven.execution.MavenSession.getUserProperties(), usually set via CLI options given with -D on the current Maven process (only used as source if promoteUserPropertiesToSystemProperties is true) Later sources may overwrite same named properties from earlier sources, that means for example that one cannot overwrite user properties with either systemProperties, getSystemPropertiesFile() or systemPropertyVariables. ++Certain properties may only be overwritten via argLine (applicable only for forked executions) because their values are cached and only evaluated at the start of the JRE. Those include: ++ ++* java.library.path ++* file.encoding ++* jdk.map.althashing.threshold ++* line.separator ++See also: systemProperties ++ ++ ++ tempDir ++ java.lang.String ++ 2.20 ++ false ++ true ++ Relative path to temporary-surefire-boot directory containing internal Surefire temporary files. ++The temporary-surefire-boot directory is project.build.directory on most platforms or system default temporary-directory specified by the system property java.io.tmpdir on Windows (see SUREFIRE-1400 <https://issues.apache.org/jira/browse/SUREFIRE-1400>). ++It is deleted after the test set has completed. ++ ++ ++ test ++ java.lang.String ++ false ++ true ++ Specify this parameter to run individual tests by file name, overriding parameter includes and excludes. Each pattern you specify here will be used to create an include pattern formatted like **/${it.test}.java, so you can just type -Dit.test=MyIT to run a single test file called "foo/MyIT.java". The test patterns prefixed with a ! will be excluded. ++This parameter overrides the parameter includes and excludes, and the TestNG parameter suiteXmlFiles. ++Since 2.7.3 You can execute a limited number of methods in the test with adding #myMethod or #my*ethod. E.g. type -Dit.test=MyIT#myMethod supported for junit 4.x and TestNg. ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): "-Dit.test=???IT, !Unstable*, pkg/**/Ci*leIT.java, *IT#test*One+testTwo?????, #fast*+slowTest" or e.g. ++"-Dit.test=Basic*, !%regex[.*.Unstable.*], !%regex[.*.MyIT.class#one.*|two.*], %regex[#fast.*|slow.*]" ++The Parameterized JUnit runner describes test methods using an index in brackets, so the non-regex method pattern would become: #testMethod[*]. If using @Parameters(name="{index}: fib({0})={1}") and selecting the index e.g. 5 in pattern, the non-regex method pattern would become #testMethod[5:*]. ++ ++ ++ testClassesDirectory ++ java.io.File ++ false ++ true ++ The directory containing generated test classes of the project being tested. This will be included at the beginning of the test classpath. ++ ++ ++ testNGArtifactName ++ java.lang.String ++ 2.3.1 ++ false ++ true ++ Allows you to specify the name of the TestNG artifact. If not set, org.testng:testng will be used. ++ ++ ++ testSourceDirectory ++ java.io.File ++ 2.2 ++ false ++ true ++ The test source directory containing test class sources. Important only for TestNG HTML reports. ++ ++ ++ threadCount ++ int ++ 2.2 ++ false ++ true ++ (TestNG/JUnit 4.7 provider) The attribute thread-count allows you to specify how many threads should be allocated for this execution. Only makes sense to use in conjunction with the parallel parameter. ++ ++ ++ threadCountClasses ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test classes, i.e.: ++* number of concurrent classes if threadCount is 0 or unspecified ++* limited classes concurrency if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 30% of threadCount in concurrent classes. ++* as in the previous case but without this leaf thread-count. Example: parallel=suitesAndClasses, threadCount=16, threadCountSuites=5, threadCountClasses is unspecified leaf, the number of concurrent classes is varying from >= 11 to 14 or 15. The threadCountSuites become given number of threads. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ threadCountMethods ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test methods, i.e.: ++* number of concurrent methods if threadCount is 0 or unspecified ++* limited concurrency of methods if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 50% of threadCount which appears in concurrent methods. ++* as in the previous case but without this leaf thread-count. Example: parallel=all, threadCount=16, threadCountSuites=2, threadCountClasses=3, but threadCountMethods is unspecified leaf, the number of concurrent methods is varying from >= 11 to 14 or 15. The threadCountSuites and threadCountClasses become given number of threads. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ threadCountSuites ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test suites, i.e.: ++* number of concurrent suites if threadCount is 0 or unspecified ++* limited suites concurrency if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 20% of threadCount which appeared in concurrent suites. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ trimStackTrace ++ boolean ++ 2.2 ++ false ++ true ++ Whether to trim the stack trace in the reports to just the lines within the test, or show the full trace. ++ ++ ++ useFile ++ boolean ++ false ++ true ++ Option to generate a file test report or just output the test report to the console. ++ ++ ++ useManifestOnlyJar ++ boolean ++ 2.4.3 ++ false ++ true ++ By default, Surefire forks your tests using a manifest-only JAR; set this parameter to "false" to force it to launch your tests with a plain old Java classpath. (See the http://maven.apache.org/plugins/maven-failsafe-plugin/examples/class-loading.html <http://maven.apache.org/plugins/maven-failsafe-plugin/examples/class-loading.html> for a more detailed explanation of manifest-only JARs and their benefits.) ++Beware, setting this to "false" may cause your tests to fail on Windows if your classpath is too long. ++ ++ ++ useModulePath ++ boolean ++ 3.0.0-M2 ++ false ++ true ++ When true, uses the modulepath when executing with JDK 9+ and module-info.java is present. When false, always uses the classpath. ++Defaults to true. ++ ++ ++ useSystemClassLoader ++ boolean ++ 2.3 ++ false ++ true ++ Option to pass dependencies to the system's classloader instead of using an isolated class loader when forking. Prevents problems with JDKs which implement the service provider lookup mechanism by using the system's classloader. ++ ++ ++ useUnlimitedThreads ++ boolean ++ 2.5 ++ false ++ true ++ (JUnit 4.7 provider) Indicates that the thread pool will be unlimited. The parallel parameter and the actual number of classes/methods will decide. Setting this to "true" effectively disables perCoreThreadCount and threadCount. Defaults to "false". ++ ++ ++ workingDirectory ++ java.io.File ++ 2.1.3 ++ false ++ true ++ Command line working directory. ++ ++ ++ ++ ${maven.test.additionalClasspathDependencies} ++ ${maven.test.additionalClasspath} ++ ${argLine} ++ ++ ${childDelegation} ++ ${maven.test.dependency.excludes} ++ ${maven.failsafe.debug} ++ ++ ${dependenciesToScan} ++ ${disableXmlReport} ++ ${enableAssertions} ++ ${enableOutErrElements} ++ ${failsafe.enableProcessChecker} ++ ${enablePropertiesElement} ++ ${encoding} ++ ${failsafe.excludeJUnit5Engines} ++ ${failsafe.excludedEnvironmentVariables} ++ ${excludedGroups} ++ ${failsafe.excludes} ++ ${failsafe.excludesFile} ++ ${failsafe.failIfNoSpecifiedTests} ++ ${it.failIfNoSpecifiedTests} ++ ${failIfNoTests} ++ ${forkCount} ++ ${failsafe.forkNode} ++ ${failsafe.exitTimeout} ++ ${failsafe.timeout} ++ ${groups} ++ ${failsafe.includeJUnit5Engines} ++ ${failsafe.includes} ++ ${failsafe.includesFile} ++ ${junitArtifactName} ++ ${jvm} ++ ${objectFactory} ++ ${parallel} ++ ++ ${parallelOptimized} ++ ${failsafe.parallel.forcedTimeout} ++ ${failsafe.parallel.timeout} ++ ${perCoreThreadCount} ++ ${plugin.artifactMap} ++ ++ ${failsafe.printSummary} ++ ++ ${project.artifactMap} ++ ++ ++ ${maven.test.redirectTestOutputToFile} ++ ${failsafe.reportFormat} ++ ${surefire.reportNameSuffix} ++ ++ ${failsafe.rerunFailingTestsCount} ++ ${reuseForks} ++ ${failsafe.runOrder} ++ ${failsafe.runOrder.random.seed} ++ ++ ${failsafe.shutdown} ++ ${maven.test.skip} ++ ${failsafe.skipAfterFailureCount} ++ ${maven.test.skip.exec} ++ ${skipITs} ++ ${skipTests} ++ ${failsafe.suiteXmlFiles} ++ ++ ${failsafe.systemPropertiesFile} ++ ${tempDir} ++ ${it.test} ++ ++ ${testNGArtifactName} ++ ++ ${threadCount} ++ ${threadCountClasses} ++ ${threadCountMethods} ++ ${threadCountSuites} ++ ${trimStackTrace} ++ ${failsafe.useFile} ++ ${failsafe.useManifestOnlyJar} ++ ${failsafe.useModulePath} ++ ${failsafe.useSystemClassLoader} ++ ${useUnlimitedThreads} ++ ${basedir} ++ ++ ++ ++ org.codehaus.plexus.languages.java.jpms.LocationManager ++ locationManager ++ ++ ++ org.codehaus.plexus.logging.Logger ++ logger ++ ++ ++ org.apache.maven.surefire.providerapi.ProviderDetector ++ providerDetector ++ ++ ++ org.apache.maven.plugin.surefire.SurefireDependencyResolver ++ surefireDependencyResolver ++ ++ ++ org.apache.maven.toolchain.ToolchainManager ++ toolchainManager ++ ++ ++ ++ ++ verify ++ Verify integration tests ran using Failsafe. ++ false ++ true ++ false ++ false ++ false ++ true ++ verify ++ org.apache.maven.plugin.failsafe.VerifyMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ basedir ++ java.io.File ++ false ++ true ++ The base directory of the project being tested. This can be obtained in your unit test by System.getProperty("basedir"). ++ ++ ++ encoding ++ java.lang.String ++ since of 2.20.1 ++ false ++ true ++ The character encoding scheme to be applied. Deprecated since 2.20.1 and used encoding UTF-8 in failsafe-summary.xml. ++ ++ ++ failIfNoTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to "true" to cause a failure if there are no tests to run. Defaults to "false". ++ ++ ++ failOnFlakeCount ++ int ++ 3.0.0-M6 ++ false ++ true ++ Set this to a value greater than 0 to fail the whole test set if the cumulative number of flakes reaches this threshold. Set to 0 to allow an unlimited number of flakes. ++ ++ ++ reportsDirectory ++ java.io.File ++ false ++ true ++ Base directory where all reports are written to. ++ ++ ++ session ++ org.apache.maven.execution.MavenSession ++ false ++ false ++ The current build session instance. ++ ++ ++ skip ++ boolean ++ false ++ true ++ Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you enable it using the "maven.test.skip" property, because maven.test.skip disables both running the tests and compiling the tests. Consider using the skipTests parameter instead. ++ ++ ++ skipExec ++ boolean ++ 2.3 ++ Use -DskipTests instead. ++ false ++ true ++ This old parameter is just like skipTests, but bound to the old property maven.test.skip.exec. ++ ++ ++ skipITs ++ boolean ++ 2.4.3-alpha-2 ++ false ++ true ++ Set this to 'true' to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++ ++ ++ skipTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to 'true' to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++ ++ ++ summaryFile ++ java.io.File ++ true ++ true ++ The summary file to read integration test results from. ++ ++ ++ summaryFiles ++ java.io.File[] ++ 2.6 ++ false ++ true ++ Additional summary files to read integration test results from. ++ ++ ++ testClassesDirectory ++ java.io.File ++ false ++ true ++ The directory containing generated test classes of the project being tested. This will be included at the beginning the test classpath. ++ ++ ++ testFailureIgnore ++ boolean ++ false ++ true ++ Set this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++ ++ ++ ++ ++ ${encoding} ++ ${failIfNoTests} ++ ${failsafe.failOnFlakeCount} ++ ++ ++ ${maven.test.skip} ++ ${maven.test.skip.exec} ++ ${skipITs} ++ ${skipTests} ++ ++ ++ ${maven.test.failure.ignore} ++ ++ ++ ++ org.codehaus.plexus.logging.Logger ++ logger ++ ++ ++ ++ ++ ++ ++ org.apache.maven.surefire ++ surefire-api ++ jar ++ 3.5.0 ++ ++ ++ org.apache.commons ++ commons-lang3 ++ jar ++ 3.16.0 ++ ++ ++ org.apache.maven.surefire ++ surefire-logger-api ++ jar ++ 3.5.0 ++ ++ ++ org.apache.maven.shared ++ maven-shared-utils ++ jar ++ 3.3.4 ++ ++ ++ commons-io ++ commons-io ++ jar ++ 2.16.1 ++ ++ ++ org.apache.maven.surefire ++ surefire-booter ++ jar ++ 3.5.0 ++ ++ ++ org.apache.maven.surefire ++ surefire-extensions-spi ++ jar ++ 3.5.0 ++ ++ ++ org.apache.maven.surefire ++ surefire-extensions-api ++ jar ++ 3.5.0 ++ ++ ++ org.apache.maven.surefire ++ maven-surefire-common ++ jar ++ 3.5.0 ++ ++ ++ org.apache.commons ++ commons-compress ++ jar ++ 1.27.1 ++ ++ ++ commons-codec ++ commons-codec ++ jar ++ 1.16.1 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-util ++ jar ++ 1.4.1 ++ ++ ++ org.apache.maven.shared ++ maven-common-artifact-filters ++ jar ++ 3.4.0 ++ ++ ++ org.codehaus.plexus ++ plexus-java ++ jar ++ 1.2.0 ++ ++ ++ org.ow2.asm ++ asm ++ jar ++ 9.6 ++ ++ ++ com.thoughtworks.qdox ++ qdox ++ jar ++ 2.0.3 ++ ++ ++ org.slf4j ++ slf4j-api ++ jar ++ 1.7.36 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-api ++ jar ++ 1.9.22 ++ ++ ++ +diff --git a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/maven_failsafe_plugin/HelpMojo.java b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/maven_failsafe_plugin/HelpMojo.java +new file mode 100644 +index 000000000..272580024 +--- /dev/null ++++ b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/maven_failsafe_plugin/HelpMojo.java +@@ -0,0 +1,448 @@ ++package org.apache.maven.plugins.maven_failsafe_plugin; ++ ++import org.apache.maven.plugin.AbstractMojo; ++import org.apache.maven.plugin.MojoExecutionException; ++import org.apache.maven.plugins.annotations.Mojo; ++import org.apache.maven.plugins.annotations.Parameter; ++ ++import org.w3c.dom.Document; ++import org.w3c.dom.Element; ++import org.w3c.dom.Node; ++import org.w3c.dom.NodeList; ++import org.xml.sax.SAXException; ++ ++import javax.xml.parsers.DocumentBuilder; ++import javax.xml.parsers.DocumentBuilderFactory; ++import javax.xml.parsers.ParserConfigurationException; ++import java.io.IOException; ++import java.io.InputStream; ++import java.util.ArrayList; ++import java.util.List; ++ ++/** ++ * Display help information on maven-failsafe-plugin.
++ * Call mvn failsafe:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ * @author maven-plugin-tools ++ */ ++@Mojo( name = "help", requiresProject = false, threadSafe = true ) ++public class HelpMojo ++ extends AbstractMojo ++{ ++ /** ++ * If true, display all settable properties for each goal. ++ * ++ */ ++ @Parameter( property = "detail", defaultValue = "false" ) ++ private boolean detail; ++ ++ /** ++ * The name of the goal for which to show help. If unspecified, all goals will be displayed. ++ * ++ */ ++ @Parameter( property = "goal" ) ++ private java.lang.String goal; ++ ++ /** ++ * The maximum length of a display line, should be positive. ++ * ++ */ ++ @Parameter( property = "lineLength", defaultValue = "80" ) ++ private int lineLength; ++ ++ /** ++ * The number of spaces per indentation level, should be positive. ++ * ++ */ ++ @Parameter( property = "indentSize", defaultValue = "2" ) ++ private int indentSize; ++ ++ // /META-INF/maven///plugin-help.xml ++ private static final String PLUGIN_HELP_PATH = ++ "/META-INF/maven/org.apache.maven.plugins/maven-failsafe-plugin/plugin-help.xml"; ++ ++ private static final int DEFAULT_LINE_LENGTH = 80; ++ ++ private Document build() ++ throws MojoExecutionException ++ { ++ getLog().debug( "load plugin-help.xml: " + PLUGIN_HELP_PATH ); ++ try ( InputStream is = getClass().getResourceAsStream( PLUGIN_HELP_PATH ) ) ++ { ++ if ( is == null ) ++ { ++ throw new MojoExecutionException( "Could not find plugin descriptor at " + PLUGIN_HELP_PATH ); ++ } ++ DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); ++ DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); ++ return dBuilder.parse( is ); ++ } ++ catch ( IOException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ catch ( ParserConfigurationException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ catch ( SAXException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ } ++ ++ /** ++ * {@inheritDoc} ++ */ ++ @Override ++ public void execute() ++ throws MojoExecutionException ++ { ++ if ( lineLength <= 0 ) ++ { ++ getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." ); ++ lineLength = DEFAULT_LINE_LENGTH; ++ } ++ if ( indentSize <= 0 ) ++ { ++ getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." ); ++ indentSize = 2; ++ } ++ ++ Document doc = build(); ++ ++ StringBuilder sb = new StringBuilder(); ++ Node plugin = getSingleChild( doc, "plugin" ); ++ ++ ++ String name = getValue( plugin, "name" ); ++ String version = getValue( plugin, "version" ); ++ String id = getValue( plugin, "groupId" ) + ":" + getValue( plugin, "artifactId" ) + ":" + version; ++ if ( isNotEmpty( name ) && !name.contains( id ) ) ++ { ++ append( sb, name + " " + version, 0 ); ++ } ++ else ++ { ++ if ( isNotEmpty( name ) ) ++ { ++ append( sb, name, 0 ); ++ } ++ else ++ { ++ append( sb, id, 0 ); ++ } ++ } ++ append( sb, getValue( plugin, "description" ), 1 ); ++ append( sb, "", 0 ); ++ ++ //plugin ++ String goalPrefix = getValue( plugin, "goalPrefix" ); ++ ++ Node mojos1 = getSingleChild( plugin, "mojos" ); ++ ++ List mojos = findNamedChild( mojos1, "mojo" ); ++ ++ if ( goal == null || goal.length() <= 0 ) ++ { ++ append( sb, "This plugin has " + mojos.size() + ( mojos.size() > 1 ? " goals:" : " goal:" ), 0 ); ++ append( sb, "", 0 ); ++ } ++ ++ for ( Node mojo : mojos ) ++ { ++ writeGoal( sb, goalPrefix, (Element) mojo ); ++ } ++ ++ if ( getLog().isInfoEnabled() ) ++ { ++ getLog().info( sb.toString() ); ++ } ++ } ++ ++ ++ private static boolean isNotEmpty( String string ) ++ { ++ return string != null && string.length() > 0; ++ } ++ ++ private static String getValue( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ return getSingleChild( node, elementName ).getTextContent(); ++ } ++ ++ private static Node getSingleChild( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ List namedChild = findNamedChild( node, elementName ); ++ if ( namedChild.isEmpty() ) ++ { ++ throw new MojoExecutionException( "Could not find " + elementName + " in plugin-help.xml" ); ++ } ++ if ( namedChild.size() > 1 ) ++ { ++ throw new MojoExecutionException( "Multiple " + elementName + " in plugin-help.xml" ); ++ } ++ return namedChild.get( 0 ); ++ } ++ ++ private static List findNamedChild( Node node, String elementName ) ++ { ++ List result = new ArrayList(); ++ NodeList childNodes = node.getChildNodes(); ++ for ( int i = 0; i < childNodes.getLength(); i++ ) ++ { ++ Node item = childNodes.item( i ); ++ if ( elementName.equals( item.getNodeName() ) ) ++ { ++ result.add( item ); ++ } ++ } ++ return result; ++ } ++ ++ private static Node findSingleChild( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ List elementsByTagName = findNamedChild( node, elementName ); ++ if ( elementsByTagName.isEmpty() ) ++ { ++ return null; ++ } ++ if ( elementsByTagName.size() > 1 ) ++ { ++ throw new MojoExecutionException( "Multiple " + elementName + "in plugin-help.xml" ); ++ } ++ return elementsByTagName.get( 0 ); ++ } ++ ++ private void writeGoal( StringBuilder sb, String goalPrefix, Element mojo ) ++ throws MojoExecutionException ++ { ++ String mojoGoal = getValue( mojo, "goal" ); ++ Node configurationElement = findSingleChild( mojo, "configuration" ); ++ Node description = findSingleChild( mojo, "description" ); ++ if ( goal == null || goal.length() <= 0 || mojoGoal.equals( goal ) ) ++ { ++ append( sb, goalPrefix + ":" + mojoGoal, 0 ); ++ Node deprecated = findSingleChild( mojo, "deprecated" ); ++ if ( ( deprecated != null ) && isNotEmpty( deprecated.getTextContent() ) ) ++ { ++ append( sb, "Deprecated. " + deprecated.getTextContent(), 1 ); ++ if ( detail && description != null ) ++ { ++ append( sb, "", 0 ); ++ append( sb, description.getTextContent(), 1 ); ++ } ++ } ++ else if ( description != null ) ++ { ++ append( sb, description.getTextContent(), 1 ); ++ } ++ append( sb, "", 0 ); ++ ++ if ( detail ) ++ { ++ Node parametersNode = getSingleChild( mojo, "parameters" ); ++ List parameters = findNamedChild( parametersNode, "parameter" ); ++ append( sb, "Available parameters:", 1 ); ++ append( sb, "", 0 ); ++ ++ for ( Node parameter : parameters ) ++ { ++ writeParameter( sb, parameter, configurationElement ); ++ } ++ } ++ } ++ } ++ ++ private void writeParameter( StringBuilder sb, Node parameter, Node configurationElement ) ++ throws MojoExecutionException ++ { ++ String parameterName = getValue( parameter, "name" ); ++ String parameterDescription = getValue( parameter, "description" ); ++ ++ Element fieldConfigurationElement = null; ++ if ( configurationElement != null ) ++ { ++ fieldConfigurationElement = (Element) findSingleChild( configurationElement, parameterName ); ++ } ++ ++ String parameterDefaultValue = ""; ++ if ( fieldConfigurationElement != null && fieldConfigurationElement.hasAttribute( "default-value" ) ) ++ { ++ parameterDefaultValue = " (Default: " + fieldConfigurationElement.getAttribute( "default-value" ) + ")"; ++ } ++ append( sb, parameterName + parameterDefaultValue, 2 ); ++ Node deprecated = findSingleChild( parameter, "deprecated" ); ++ if ( ( deprecated != null ) && isNotEmpty( deprecated.getTextContent() ) ) ++ { ++ append( sb, "Deprecated. " + deprecated.getTextContent(), 3 ); ++ append( sb, "", 0 ); ++ } ++ if ( isNotEmpty( parameterDescription ) ) { ++ append( sb, parameterDescription, 3 ); ++ } ++ if ( "true".equals( getValue( parameter, "required" ) ) ) ++ { ++ append( sb, "Required: Yes", 3 ); ++ } ++ if ( ( fieldConfigurationElement != null ) && isNotEmpty( fieldConfigurationElement.getTextContent() ) ) ++ { ++ String property = getPropertyFromExpression( fieldConfigurationElement.getTextContent() ); ++ append( sb, "User property: " + property, 3 ); ++ } ++ ++ append( sb, "", 0 ); ++ } ++ ++ /** ++ *

Repeat a String n times to form a new string.

++ * ++ * @param str String to repeat ++ * @param repeat number of times to repeat str ++ * @return String with repeated String ++ * @throws NegativeArraySizeException if repeat < 0 ++ * @throws NullPointerException if str is null ++ */ ++ private static String repeat( String str, int repeat ) ++ { ++ StringBuilder buffer = new StringBuilder( repeat * str.length() ); ++ ++ for ( int i = 0; i < repeat; i++ ) ++ { ++ buffer.append( str ); ++ } ++ ++ return buffer.toString(); ++ } ++ ++ /** ++ * Append a description to the buffer by respecting the indentSize and lineLength parameters. ++ * Note: The last character is always a new line. ++ * ++ * @param sb The buffer to append the description, not null. ++ * @param description The description, not null. ++ * @param indent The base indentation level of each line, must not be negative. ++ */ ++ private void append( StringBuilder sb, String description, int indent ) ++ { ++ for ( String line : toLines( description, indent, indentSize, lineLength ) ) ++ { ++ sb.append( line ).append( '\n' ); ++ } ++ } ++ ++ /** ++ * Splits the specified text into lines of convenient display length. ++ * ++ * @param text The text to split into lines, must not be null. ++ * @param indent The base indentation level of each line, must not be negative. ++ * @param indentSize The size of each indentation, must not be negative. ++ * @param lineLength The length of the line, must not be negative. ++ * @return The sequence of display lines, never null. ++ * @throws NegativeArraySizeException if indent < 0 ++ */ ++ private static List toLines( String text, int indent, int indentSize, int lineLength ) ++ { ++ List lines = new ArrayList(); ++ ++ String ind = repeat( "\t", indent ); ++ ++ String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" ); ++ ++ for ( String plainLine : plainLines ) ++ { ++ toLines( lines, ind + plainLine, indentSize, lineLength ); ++ } ++ ++ return lines; ++ } ++ ++ /** ++ * Adds the specified line to the output sequence, performing line wrapping if necessary. ++ * ++ * @param lines The sequence of display lines, must not be null. ++ * @param line The line to add, must not be null. ++ * @param indentSize The size of each indentation, must not be negative. ++ * @param lineLength The length of the line, must not be negative. ++ */ ++ private static void toLines( List lines, String line, int indentSize, int lineLength ) ++ { ++ int lineIndent = getIndentLevel( line ); ++ StringBuilder buf = new StringBuilder( 256 ); ++ ++ String[] tokens = line.split( " +" ); ++ ++ for ( String token : tokens ) ++ { ++ if ( buf.length() > 0 ) ++ { ++ if ( buf.length() + token.length() >= lineLength ) ++ { ++ lines.add( buf.toString() ); ++ buf.setLength( 0 ); ++ buf.append( repeat( " ", lineIndent * indentSize ) ); ++ } ++ else ++ { ++ buf.append( ' ' ); ++ } ++ } ++ ++ for ( int j = 0; j < token.length(); j++ ) ++ { ++ char c = token.charAt( j ); ++ if ( c == '\t' ) ++ { ++ buf.append( repeat( " ", indentSize - buf.length() % indentSize ) ); ++ } ++ else if ( c == '\u00A0' ) ++ { ++ buf.append( ' ' ); ++ } ++ else ++ { ++ buf.append( c ); ++ } ++ } ++ } ++ lines.add( buf.toString() ); ++ } ++ ++ /** ++ * Gets the indentation level of the specified line. ++ * ++ * @param line The line whose indentation level should be retrieved, must not be null. ++ * @return The indentation level of the line. ++ */ ++ private static int getIndentLevel( String line ) ++ { ++ int level = 0; ++ for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ ) ++ { ++ level++; ++ } ++ for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ ) ++ { ++ if ( line.charAt( i ) == '\t' ) ++ { ++ level++; ++ break; ++ } ++ } ++ return level; ++ } ++ ++ private static String getPropertyFromExpression( String expression ) ++ { ++ if ( expression != null && expression.startsWith( "${" ) && expression.endsWith( "}" ) ++ && !expression.substring( 2 ).contains( "${" ) ) ++ { ++ // expression="${xxx}" -> property="xxx" ++ return expression.substring( 2, expression.length() - 1 ); ++ } ++ // no property can be extracted ++ return null; ++ } ++} +diff --git a/maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-plugin/plugin-help.xml b/maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-plugin/plugin-help.xml +new file mode 100644 +index 000000000..3d369f203 +--- /dev/null ++++ b/maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-plugin/plugin-help.xml +@@ -0,0 +1,943 @@ ++ ++ ++ ++ ++ ++ ${project.name} ++ ${project.description} ++ ${project.groupId} ++ ${project.artifactId} ++ ${project.version} ++ surefire ++ ++ ++ help ++ Display help information on maven-surefire-plugin. ++Call mvn surefire:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ false ++ false ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.maven_surefire_plugin.HelpMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ detail ++ boolean ++ false ++ true ++ If true, display all settable properties for each goal. ++ ++ ++ goal ++ java.lang.String ++ false ++ true ++ The name of the goal for which to show help. If unspecified, all goals will be displayed. ++ ++ ++ indentSize ++ int ++ false ++ true ++ The number of spaces per indentation level, should be positive. ++ ++ ++ lineLength ++ int ++ false ++ true ++ The maximum length of a display line, should be positive. ++ ++ ++ ++ ${detail} ++ ${goal} ++ ${indentSize} ++ ${lineLength} ++ ++ ++ ++ test ++ Run tests using Surefire. ++ test ++ false ++ true ++ false ++ false ++ false ++ true ++ test ++ org.apache.maven.plugin.surefire.SurefireMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ additionalClasspathDependencies ++ java.util.List<org.apache.maven.model.Dependency> ++ 3.2 ++ false ++ true ++ Additional Maven dependencies to be added to the test classpath at runtime. Each element supports the parametrization like documented in POM Reference: Dependencies <https://maven.apache.org/pom.html#dependencies>. ++Those dependencies are automatically collected (i.e. have their full dependency tree calculated) and then all underlying artifacts are resolved from the repository (including their transitive dependencies). Afterwards the resolved artifacts are filtered to only contain compile and runtime scoped ones and appended to the test classpath at runtime (after the ones from additionalClasspathElements). ++ ++The following differences to regular project dependency resolving apply: ++ ++* The dependency management from the project is not taken into account. ++* Conflicts between the different items and the project dependencies are not resolved. ++* Only external dependencies (outside the current Maven reactor) are supported. ++ ++ ++ additionalClasspathElements ++ java.lang.String[] ++ 2.4 ++ false ++ true ++ Additional elements to be appended to the test classpath at runtime. Each element must be a file system path to a JAR file or a directory containing classes. No wildcards are allowed here. ++ ++ ++ argLine ++ java.lang.String ++ 2.1 ++ false ++ true ++ Arbitrary JVM options to set on the command line. Only effective for forked executions. ++ ++Since the Version 2.17 using an alternate syntax for argLine, @{...} allows late replacement of properties when the plugin is executed, so properties that have been modified by other plugins will be picked up correctly. See the Frequently Asked Questions page with more details: ++http://maven.apache.org/surefire/maven-surefire-plugin/faq.html <http://maven.apache.org/surefire/maven-surefire-plugin/faq.html> ++http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html <http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html> ++See also: forkCount ++ ++ ++ childDelegation ++ boolean ++ 2.1 ++ false ++ true ++ When false it makes tests run using the standard classloader delegation instead of the default Maven isolated classloader. Only used when forking (forkCount is greater than zero). ++Setting it to false helps with some problems caused by conflicts between xml parsers in the classpath and the Java 5 provider parser. ++ ++ ++ classesDirectory ++ java.io.File ++ false ++ true ++ The directory containing generated classes of the project being tested. This will be included after the test classes in the test classpath. ++ ++ ++ classpathDependencyExcludes ++ java.lang.String[] ++ 2.6 ++ false ++ true ++ List of dependencies to exclude from the test classpath at runtime. Each item is passed as pattern to org.apache.maven.shared.artifact.filter.PatternIncludesArtifactFilter. The pattern is matched against the following artifact ids: ++* groupId:artifactId (Short ID) ++* groupId:artifactId:type:classifier (Dependency Conflict ID) ++* groupId:artifactId:type:classifier:version (Full ID) The matching algorithm is described in detail in Advanced Artifact-Matching <https://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html#advanced-artifact-matching-in-includes-and-excludes> for the maven-assembly-plugin. This parameter behaves the same as the excludes pattern described there. The dependency matching is applied to the project dependency IDs (including transitive ones) after resolving, i.e. excluding one dependency will not exclude its transitive dependencies! ++ ++ ++ classpathDependencyScopeExclude ++ java.lang.String ++ 2.6 ++ false ++ true ++ A dependency scope to exclude from the test classpath at runtime. The scope should be one of the scopes defined by org.apache.maven.artifact.Artifact. This includes the following: ++ ++* compile - system, provided, compile ++* runtime - compile, runtime ++* compile+runtime - system, provided, compile, runtime ++* runtime+system - system, compile, runtime ++* test - system, provided, compile, runtime, test ++ ++ ++ consoleOutputReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter ++ false ++ true ++ ++ ++ ++ debugForkedProcess ++ java.lang.String ++ 2.4 ++ false ++ true ++ Attach a debugger to the forked JVM. If set to "true", the process will suspend and wait for a debugger to attach on port 5005. If set to some other string, that string will be appended to the argLine, allowing you to configure arbitrary debuggability options (without overwriting the other options specified through the argLine parameter). ++ ++ ++ dependenciesToScan ++ java.lang.String[] ++ 2.15 ++ false ++ true ++ List of dependencies to scan for test classes to include in the test run. The child elements of this element must be <dependency> elements, and the contents of each of these elements must be a string which follows the general form: ++groupId[:artifactId[:type[:classifier][:version]]] ++ ++The wildcard character * can be used within the sub parts of those composite identifiers to do glob-like pattern matching. The classifier may be omitted when matching dependencies without a classifier. ++ ++Examples: ++ ++* group or, equivalently, group:* ++* g*p:*rtifac* ++* group:*:jar ++* group:artifact:*:1.0.0 (no classifier) ++* group:*:test-jar:tests ++* *:artifact:*:*:1.0.0 ++Since version 2.22.0 you can scan for test classes from a project dependency of your multi-module project. ++ ++In versions before 3.0.0-M4, only groupId:artifactId is supported. ++ ++ ++ ++ disableXmlReport ++ boolean ++ 2.2 ++ No reason given ++ false ++ true ++ Flag to disable the generation of report files in xml format. Deprecated since 3.0.0-M4. Instead use disable within statelessTestsetReporter since of 3.0.0-M6. ++ ++ ++ enableAssertions ++ boolean ++ 2.3.1 ++ false ++ true ++ By default, Surefire enables JVM assertions for the execution of your test cases. To disable the assertions, set this flag to "false". ++ ++ ++ enableOutErrElements ++ boolean ++ 3.3.1 ++ false ++ true ++ Flag for including/excluding <system-out /> and <system-err /> elements for successfully passed tests in XML reports. Note that the default value may change to false is a future version. ++ ++ ++ enableProcessChecker ++ java.lang.String ++ 3.0.0-M4 ++ false ++ true ++ Since 3.0.0-M4 the process checkers are disabled. You can enable them namely by setting ping and native or all in this parameter. ++The checker is useful in situations when you kill the build on a CI system and you want the Surefire forked JVM to kill the tests asap and free all handlers on the file system been previously used by the JVM and by the tests. ++The ping should be safely used together with ZGC or Shenandoah Garbage Collector. Due to the ping relies on timing of the PING (triggered every 30 seconds), slow GCs may pause the timers and pretend that the parent process of the forked JVM does not exist. ++The native is very fast checker. It is useful mechanism on Unix based systems, Linux distributions and Alpine/BusyBox Linux. See the JIRA SUREFIRE-1631 <https://issues.apache.org/jira/browse/SUREFIRE-1631> for Windows issues. ++Another useful configuration parameter is forkedProcessTimeoutInSeconds. ++See the Frequently Asked Questions page with more details: ++http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#kill-jvm <http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#kill-jvm> ++http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html#kill-jvm <http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html#kill-jvm> ++Example of use: ++mvn test -Dsurefire.enableProcessChecker=all ++ ++ ++ enablePropertiesElement ++ boolean ++ 3.3.1 ++ false ++ true ++ Flag for including/excluding <properties /> element for successfully passed tests in XML reports. ++ ++ ++ encoding ++ java.lang.String ++ 3.0.0-M1 ++ false ++ true ++ The character encoding scheme to be applied while generating test report files (see target/surefire-reports/yourTestName.txt). The report output files (*-out.txt) are encoded in UTF-8 if not set otherwise. ++ ++ ++ environmentVariables ++ java.util.Map<java.lang.String, java.lang.String> ++ 2.1.3 ++ false ++ true ++ Additional environment variables to set on the command line. ++ ++ ++ excludeJUnit5Engines ++ java.lang.String[] ++ 3.0.0-M6 ++ false ++ true ++ Provide the ID/s of an JUnit engine to be excluded in the test run. ++ ++ ++ excludedEnvironmentVariables ++ java.lang.String[] ++ 3.0.0-M4 ++ false ++ true ++ You can selectively exclude individual environment variables by enumerating their keys. ++The environment is a system-dependent mapping from keys to values which is inherited from the Maven process to the forked Surefire processes. The keys must literally (case sensitive) match in order to exclude their environment variable. ++Example to exclude three environment variables: ++mvn test -Dsurefire.excludedEnvironmentVariables=ACME1,ACME2,ACME3 ++ ++ ++ excludedGroups ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG/JUnit47 provider with JUnit4.8+ only and JUnit5+ provider since 2.22.0) Excluded groups/categories/tags. Any methods/classes/etc with one of the groups/categories/tags specified in this list will specifically not be run. ++For JUnit4, this parameter forces the use of the 4.7 provider. For JUnit5, this parameter forces the use of the JUnit platform provider. ++This parameter is ignored if the suiteXmlFiles parameter is specified. ++Since version 2.18.1 and JUnit 4.12, the @Category annotation type is automatically inherited from superclasses, see @java.lang.annotation.Inherited. Make sure that test class inheritance still makes sense together with @Category annotation of the JUnit 4.12 or higher appeared in superclass. ++ ++ ++ excludes ++ java.util.List<java.lang.String> ++ false ++ true ++ A list of <exclude> elements specifying the tests (by pattern) that should be excluded in testing. When not specified and when the test parameter is not specified, the default excludes will be ++<excludes> <exclude>**/*$*</exclude> </excludes> (which excludes all inner classes). ++This parameter is ignored if the TestNG suiteXmlFiles parameter is specified. ++Each exclude item may also contain a comma-separated sub-list of items, which will be treated as multiple <exclude> entries. ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): <exclude>%regex[pkg.*Slow.*.class], Unstable*</exclude> ++Notice that these values are relative to the directory containing generated test classes of the project being tested. This directory is declared by the parameter testClassesDirectory which defaults to the POM property ${project.build.testOutputDirectory}, typically src/test/java unless overridden. ++ ++ ++ excludesFile ++ java.io.File ++ 2.13 ++ false ++ true ++ A file containing exclude patterns. Blank lines, or lines starting with # are ignored. If excludes are also specified, these patterns are appended. Example with path, simple and regex excludes: ++*/test/* **/DontRunTest.* %regex[.*Test.*|.*Not.*] Since 3.0.0-M6, method filtering support is provided in the exclusions file as well, example: pkg.SomeTest#testMethod ++ ++ ++ failIfNoSpecifiedTests ++ boolean ++ 2.12 ++ false ++ true ++ Set this to "true" to cause a failure if none of the tests specified in -Dtest=... are run. Defaults to "true". ++ ++ ++ failIfNoTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to "true" to cause a failure if there are no tests to run. Defaults to "false". ++ ++ ++ failOnFlakeCount ++ int ++ 3.0.0-M6 ++ false ++ true ++ Set this to a value greater than 0 to fail the whole test set if the cumulative number of flakes reaches this threshold. Set to 0 to allow an unlimited number of flakes. ++ ++ ++ forkCount ++ java.lang.String ++ 2.14 ++ false ++ true ++ Option to specify the number of VMs to fork in parallel in order to execute the tests. When terminated with "C", the number part is multiplied with the number of CPU cores. Floating point value are only accepted together with "C". If set to "0", no VM is forked and all tests are executed within the main process. ++ ++Example values: "1.5C", "4" ++ ++The system properties and the argLine of the forked processes may contain the place holder string ${surefire.forkNumber}, which is replaced with a fixed number for each of the parallel forks, ranging from 1 to the effective value of forkCount times the maximum number of parallel Surefire executions in maven parallel builds, i.e. the effective value of the -T command line argument of maven core. ++ ++ ++ forkNode ++ org.apache.maven.surefire.extensions.ForkNodeFactory ++ 3.0.0-M5 ++ false ++ true ++ This parameter configures the forked node. Currently, you can select the communication protocol, i.e. process pipes or TCP/IP sockets. The plugin uses process pipes by default which will be turned to TCP/IP in the version 3.0.0. Alternatively, you can implement your own factory and SPI. ++See the documentation for more details: ++https://maven.apache.org/plugins/maven-surefire-plugin/examples/process-communication.html <https://maven.apache.org/plugins/maven-surefire-plugin/examples/process-communication.html> ++ ++ ++ forkedProcessExitTimeoutInSeconds ++ int ++ 2.20 ++ false ++ true ++ Forked process is normally terminated without any significant delay after given tests have completed. If the particular tests started non-daemon Thread(s), the process hangs instead of been properly terminated by System.exit(). Use this parameter in order to determine the timeout of terminating the process. see the documentation: http://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html <http://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html> Turns to default fallback value of 30 seconds if negative integer. ++ ++ ++ forkedProcessTimeoutInSeconds ++ int ++ 2.4 ++ false ++ true ++ Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out. ++ ++ ++ groups ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG/JUnit47 provider with JUnit4.8+ only and JUnit5+ provider since 2.22.0) Groups/categories/tags for this test. Only classes/methods/etc decorated with one of the groups/categories/tags specified here will be included in test run, if specified. ++For JUnit4 tests, this parameter forces the use of the 4.7 provider. For JUnit5 tests, this parameter forces the use of the JUnit platform provider. ++This parameter is ignored if the suiteXmlFiles parameter is specified. ++Since version 2.18.1 and JUnit 4.12, the @Category annotation type is automatically inherited from superclasses, see @java.lang.annotation.Inherited. Make sure that test class inheritance still makes sense together with @Category annotation of the JUnit 4.12 or higher appeared in superclass. ++ ++ ++ includeJUnit5Engines ++ java.lang.String[] ++ 3.0.0-M6 ++ false ++ true ++ Provide the ID/s of an JUnit engine to be included in the test run. ++ ++ ++ includes ++ java.util.List<java.lang.String> ++ false ++ true ++ A list of <include> elements specifying the tests (by pattern) that should be included in testing. When not specified and when the test parameter is not specified, the default includes will be <includes> <include>**/Test*.java</include> <include>**/*Test.java</include> <include>**/*Tests.java</include> <include>**/*TestCase.java</include> </includes> Each include item may also contain a comma-separated sub-list of items, which will be treated as multiple <include> entries. ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): <include>%regex[.*[Cat|Dog].*], Basic????, !Unstable*</include> <include>%regex[.*[Cat|Dog].*], !%regex[pkg.*Slow.*.class], pkg/**/*Fast*.java</include> ++This parameter is ignored if the TestNG suiteXmlFiles parameter is specified. ++ ++Notice that these values are relative to the directory containing generated test classes of the project being tested. This directory is declared by the parameter testClassesDirectory which defaults to the POM property ${project.build.testOutputDirectory}, typically src/test/java unless overridden. ++ ++ ++ includesFile ++ java.io.File ++ 2.13 ++ false ++ true ++ A file containing include patterns. Blank lines, or lines starting with # are ignored. If includes are also specified, these patterns are appended. Example with path, simple and regex includes: */test/* **/NotIncludedByDefault.java %regex[.*Test.*|.*Not.*] ++Since 3.0.0-M6, method filtering support is provided in the inclusions file as well, example: pkg.SomeTest#testMethod ++ ++ ++ jdkToolchain ++ java.util.Map<java.lang.String, java.lang.String> ++ 3.0.0-M5 and Maven 3.3.x ++ false ++ true ++ ++Allow for configuration of the test jvm via maven toolchains. This permits a configuration where the project is built with one jvm and tested with another. This is similar to jvm, but avoids hardcoding paths. The two parameters are mutually exclusive (jvm wins) ++ ++Examples: ++(see Guide to Toolchains <https://maven.apache.org/guides/mini/guide-using-toolchains.html> for more info) <configuration> ... <jdkToolchain> <version>1.11</version> </jdkToolchain> </configuration> <configuration> ... <jdkToolchain> <version>1.8</version> <vendor>zulu</vendor> </jdkToolchain> </configuration> ++ ++ ++ junitArtifactName ++ java.lang.String ++ 2.3.1 ++ false ++ true ++ Allows you to specify the name of the JUnit artifact. If not set, junit:junit will be used. ++ ++ ++ jvm ++ java.lang.String ++ 2.1 ++ false ++ true ++ Option to specify the jvm (or path to the java executable) to use with the forking options. For the default, the jvm will be a new instance of the same VM as the one used to run Maven. JVM settings are not inherited from MAVEN_OPTS. ++ ++ ++ objectFactory ++ java.lang.String ++ 2.5 ++ false ++ true ++ (TestNG only) Define the factory class used to create all test instances. ++ ++ ++ parallel ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG provider) When you use the parameter parallel, TestNG will try to run all your test methods in separate threads, except for methods that depend on each other, which will be run in the same thread in order to respect their order of execution. Supports two values: classes or methods. ++(JUnit 4.7 provider) Supports values classes, methods, both to run in separate threads been controlled by threadCount. ++ ++Since version 2.16 (JUnit 4.7 provider), the value both is DEPRECATED. Use classesAndMethods instead. ++ ++Since version 2.16 (JUnit 4.7 provider), additional vales are available: ++suites, suitesAndClasses, suitesAndMethods, classesAndMethods, all. ++By default, Surefire does not execute tests in parallel. You can set the parameter parallel to none to explicitly disable parallel execution (e.g. when disabling parallel execution in special Maven profiles when executing coverage analysis). ++ ++ ++ parallelOptimized ++ boolean ++ 2.17 ++ false ++ true ++ (JUnit 4.7 / provider only) The thread counts do not exceed the number of parallel suite, class runners and average number of methods per class if set to true. ++True by default. ++ ++ ++ parallelTestsTimeoutForcedInSeconds ++ double ++ 2.16 ++ false ++ true ++ Stop executing queued parallel JUnit tests and interrupt currently running tests after a certain number of seconds. ++Example values: "3.5", "4" ++ ++If set to 0, wait forever, never timing out. Makes sense with specified parallel different from "none". ++ ++ ++ parallelTestsTimeoutInSeconds ++ double ++ 2.16 ++ false ++ true ++ Stop executing queued parallel JUnit tests after a certain number of seconds. ++Example values: "3.5", "4" ++ ++If set to 0, wait forever, never timing out. Makes sense with specified parallel different from "none". ++ ++ ++ perCoreThreadCount ++ boolean ++ 2.5 ++ false ++ true ++ (JUnit 4.7 provider) Indicates that threadCount, threadCountSuites, threadCountClasses, threadCountMethods are per cpu core. ++ ++ ++ printSummary ++ boolean ++ false ++ true ++ Option to print summary of test suites or just print the test cases that have errors. ++ ++ ++ promoteUserPropertiesToSystemProperties ++ boolean ++ 3.4.0 ++ false ++ true ++ If set to true will also pass all user properties exposed via MavenSession#getUserProperties() as system properties to a provider. Those always take precedence over same named system properties set via any other means. ++See also: systemPropertyVariables ++ ++ ++ properties ++ java.util.Properties ++ 2.4 ++ false ++ true ++ List of properties for configuring the testing provider. This is the preferred method of configuring TestNG and JUnit platform providers. ++ ++JUnit platform properties may be defined in a configurationParameters element: <properties> <configurationParameters> junit.jupiter.execution.parallel.enabled = true junit.jupiter.execution.parallel.mode.default = concurrent </configurationParameters> </properties> ++TestNG properties may be defined as distinct element blocks: <properties> <property> <name>parallel</name> <value>methods</value> </property> </properties> ++ ++ ++ redirectTestOutputToFile ++ boolean ++ 2.3 ++ false ++ true ++ Set this to "true" to redirect the unit test standard output to a file (found in reportsDirectory/testName-output.txt). ++ ++ ++ reportFormat ++ java.lang.String ++ false ++ true ++ Selects the formatting for the test report to be generated. Can be set as "brief" or "plain". Only applies to the output format of the output files (target/surefire-reports/testName.txt) ++ ++ ++ reportNameSuffix ++ java.lang.String ++ false ++ true ++ Add custom text into report filename: TEST-testClassName-reportNameSuffix.xml, testClassName-reportNameSuffix.txt and testClassName-reportNameSuffix-output.txt. File TEST-testClassName-reportNameSuffix.xml has changed attributes 'testsuite'--'name' and 'testcase'--'classname' - reportNameSuffix is added to the attribute value. ++ ++ ++ reportsDirectory ++ java.io.File ++ false ++ true ++ Base directory where all reports are written to. ++ ++ ++ rerunFailingTestsCount ++ int ++ false ++ true ++ (JUnit 4+ providers and JUnit 5+ providers since 3.0.0-M4) The number of times each failing test will be rerun. If set larger than 0, rerun failing tests immediately after they fail. If a failing test passes in any of those reruns, it will be marked as pass and reported as a "flake". However, all the failing attempts will be recorded. ++ ++ ++ reuseForks ++ boolean ++ 2.13 ++ false ++ true ++ Indicates if forked VMs can be reused. If set to "false", a new VM is forked for each test class to be executed. If set to "true", up to forkCount VMs will be forked and then reused to execute all tests. ++ ++ ++ runOrder ++ java.lang.String ++ 2.7 ++ false ++ true ++ Defines the order the tests will be run in. Supported values are alphabetical, reversealphabetical, random, hourly (alphabetical on even hours, reverse alphabetical on odd hours), failedfirst, balanced and filesystem. ++ ++Odd/Even for hourly is determined at the time the of scanning the classpath, meaning it could change during a multi-module build. ++ ++Failed first will run tests that failed on previous run first, as well as new tests for this run. ++ ++Balanced is only relevant with parallel=classes, and will try to optimize the run-order of the tests reducing the overall execution time. Initially a statistics file is created and every next test run will reorder classes. ++ ++Note that the statistics are stored in a file named .surefire-XXXXXXXXX beside pom.xml and should not be checked into version control. The "XXXXX" is the SHA1 checksum of the entire surefire configuration, so different configurations will have different statistics files, meaning if you change any configuration settings you will re-run once before new statistics data can be established. ++ ++ ++ runOrderRandomSeed ++ java.lang.Long ++ 3.0.0-M6 ++ false ++ true ++ Sets the random seed that will be used to order the tests if surefire.runOrder is set to random. ++ ++If no seeds are set and surefire.runOrder is set to random, then the seed used will be outputted (search for "To reproduce ordering use flag -Dsurefire.runOrder.random.seed"). ++ ++To deterministically reproduce any random test order that was run before, simply set the seed to be the same value. ++ ++ ++ shutdown ++ java.lang.String ++ 2.19 ++ false ++ true ++ After the plugin process is shutdown by sending SIGTERM signal (CTRL+C), SHUTDOWN command is received by every forked JVM. ++The value is set to (shutdown=exit) by default (changed in version 3.0.0-M4). ++The parameter can be configured with other two values testset and kill. ++With(shutdown=testset) the test set may still continue to run in forked JVM. ++Using exit forked JVM executes System.exit(1) after the plugin process has received SIGTERM signal. ++Using kill the JVM executes Runtime.halt(1) and kills itself. ++ ++ ++ skip ++ boolean ++ false ++ true ++ Set this to "true" to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you enable it using the "maven.test.skip" property, because maven.test.skip disables both running the tests and compiling the tests. Consider using the skipTests parameter instead. ++ ++ ++ skipAfterFailureCount ++ int ++ 2.19 ++ false ++ true ++ Set to error/failure count in order to skip remaining tests. Due to race conditions in parallel/forked execution this may not be fully guaranteed. ++Enable with system property -Dsurefire.skipAfterFailureCount=1 or any number greater than zero. Defaults to "0". ++See the prerequisites and limitations in documentation: ++http://maven.apache.org/plugins/maven-surefire-plugin/examples/skip-after-failure.html <http://maven.apache.org/plugins/maven-surefire-plugin/examples/skip-after-failure.html> ++ ++ ++ skipExec ++ boolean ++ 2.3 ++ Use skipTests instead. ++ false ++ true ++ This old parameter is just like skipTests, but bound to the old property "maven.test.skip.exec". ++ ++ ++ skipTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to "true" to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++Failsafe plugin deprecated the parameter skipTests and the parameter will be removed in Failsafe 3.0.0 as it is a source of conflicts between Failsafe and Surefire plugin. ++ ++ ++ statelessTestsetInfoReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter ++ false ++ true ++ ++ ++ ++ statelessTestsetReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter ++ false ++ true ++ Note: use the legacy system property disableXmlReport set to true to disable the report. ++ ++ ++ suiteXmlFiles ++ java.io.File[] ++ 2.2 ++ false ++ true ++ (TestNG) List of <suiteXmlFile> elements specifying TestNG suite xml file locations. Note that suiteXmlFiles is incompatible with several other parameters of this plugin, like includes and excludes. ++This parameter is ignored if the test parameter is specified (allowing you to run a single test instead of an entire suite). ++ ++ ++ systemProperties ++ java.util.Properties ++ Use systemPropertyVariables instead. ++ false ++ true ++ List of System properties to pass to a provider. ++See also: systemPropertyVariables for how the effective provider properties are calculated ++ ++ ++ systemPropertiesFile ++ java.io.File ++ false ++ true ++ Properties file being used as system properties passed to the provider. ++See also: systemPropertyVariables for how the effective provider properties are calculated ++ ++ ++ systemPropertyVariables ++ java.util.Map<java.lang.String, java.lang.String> ++ 2.5 ++ false ++ true ++ List of System properties to pass to a provider. The effective system properties given to a provider are contributed from several sources: ++* properties set via argLine with -D (only for forked executions) ++* systemProperties ++* getSystemPropertiesFile() (set via parameter systemPropertiesFile on some goals) ++* systemPropertyVariables ++* User properties from MavenSession#getUserProperties(), usually set via CLI options given with -D on the current Maven process (only used as source if promoteUserPropertiesToSystemProperties is true) Later sources may overwrite same named properties from earlier sources, that means for example that one cannot overwrite user properties with either systemProperties, getSystemPropertiesFile() or systemPropertyVariables. ++Certain properties may only be overwritten via argLine (applicable only for forked executions) because their values are cached and only evaluated at the start of the JRE. Those include: ++ ++* java.library.path ++* file.encoding ++* jdk.map.althashing.threshold ++* line.separator ++See also: systemProperties ++ ++ ++ tempDir ++ java.lang.String ++ 2.20 ++ false ++ true ++ Relative path to temporary-surefire-boot directory containing internal Surefire temporary files. ++The temporary-surefire-boot directory is project.build.directory on most platforms or system default temporary-directory specified by the system property java.io.tmpdir on Windows (see SUREFIRE-1400 <https://issues.apache.org/jira/browse/SUREFIRE-1400>). ++It is deleted after the test set has completed. ++ ++ ++ test ++ java.lang.String ++ false ++ true ++ Specify this parameter to run individual tests by file name, overriding the parameter includes and excludes. Each pattern you specify here will be used to create an include pattern formatted like **/${test}.java, so you can just type -Dtest=MyTest to run a single test called "foo/MyTest.java". The test patterns prefixed with a ! will be excluded. ++This parameter overrides the parameter includes, excludes, and the TestNG parameter suiteXmlFiles. ++Since 2.7.3, you can execute a limited number of methods in the test by adding #myMethod or #my*ethod. For example, -Dtest=MyTest#myMethod. This is supported for junit 4.x and TestNg. ++ ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): "-Dtest=???Test, !Unstable*, pkg/**/Ci*leTest.java, *Test#test*One+testTwo?????, #fast*+slowTest" or e.g. "-Dtest=Basic*, !%regex[.*.Unstable.*], !%regex[.*.MyTest.class#one.*|two.*], %regex[#fast.*|slow.*]" ++The Parameterized JUnit runner describes test methods using an index in brackets, so the non-regex method pattern would become: #testMethod[*]. If using @Parameters(name="{index}: fib({0})={1}") and selecting the index e.g. 5 in pattern, the non-regex method pattern would become #testMethod[5:*]. ++ ++ ++ testClassesDirectory ++ java.io.File ++ false ++ true ++ The directory containing generated test classes of the project being tested. This will be included at the beginning of the test classpath. ++ ++ ++ testFailureIgnore ++ boolean ++ false ++ true ++ Set this to "true" to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++ ++ ++ testNGArtifactName ++ java.lang.String ++ 2.3.1 ++ false ++ true ++ Allows you to specify the name of the TestNG artifact. If not set, org.testng:testng will be used. ++ ++ ++ testSourceDirectory ++ java.io.File ++ 2.2 ++ false ++ true ++ The test source directory containing test class sources. Important only for TestNG HTML reports. ++ ++ ++ threadCount ++ int ++ 2.2 ++ false ++ true ++ (TestNG/JUnit 4.7 provider) The attribute thread-count allows you to specify how many threads should be allocated for this execution. Only makes sense to use in conjunction with the parallel parameter. ++ ++ ++ threadCountClasses ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test classes, i.e.: ++* number of concurrent classes if threadCount is 0 or unspecified ++* limited classes concurrency if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 30% of threadCount in concurrent classes. ++* as in the previous case but without this leaf thread-count. Example: parallel=suitesAndClasses, threadCount=16, threadCountSuites=5, threadCountClasses is unspecified leaf, the number of concurrent classes is varying from >= 11 to 14 or 15. The threadCountSuites become given number of threads. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ threadCountMethods ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test methods, i.e.: ++* number of concurrent methods if threadCount is 0 or unspecified ++* limited concurrency of methods if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 50% of threadCount which appears in concurrent methods. ++* as in the previous case but without this leaf thread-count. Example: parallel=all, threadCount=16, threadCountSuites=2, threadCountClasses=3, but threadCountMethods is unspecified leaf, the number of concurrent methods is varying from >= 11 to 14 or 15. The threadCountSuites and threadCountClasses become given number of threads. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ threadCountSuites ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test suites, i.e.: ++* number of concurrent suites if threadCount is 0 or unspecified ++* limited suites concurrency if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 20% of threadCount which appeared in concurrent suites. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ trimStackTrace ++ boolean ++ 2.2 ++ false ++ true ++ Whether to trim the stack trace in the reports to just the lines within the test, or show the full trace. ++ ++ ++ useFile ++ boolean ++ false ++ true ++ Option to generate a file test report or just output the test report to the console. ++ ++ ++ useManifestOnlyJar ++ boolean ++ 2.4.3 ++ false ++ true ++ By default, Surefire forks your tests using a manifest-only JAR; set this parameter to "false" to force it to launch your tests with a plain old Java classpath. (See the http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-loading.html <http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-loading.html> for a more detailed explanation of manifest-only JARs and their benefits.) ++Beware, setting this to "false" may cause your tests to fail on Windows if your classpath is too long. ++ ++ ++ useModulePath ++ boolean ++ 3.0.0-M2 ++ false ++ true ++ When true, uses the modulepath when executing with JDK 9+ and module-info.java is present. When false, always uses the classpath. ++Defaults to true. ++ ++ ++ useSystemClassLoader ++ boolean ++ 2.3 ++ false ++ true ++ Option to pass dependencies to the system's classloader instead of using an isolated class loader when forking. Prevents problems with JDKs which implement the service provider lookup mechanism by using the system's ClassLoader. ++ ++ ++ useUnlimitedThreads ++ boolean ++ 2.5 ++ false ++ true ++ (JUnit 4.7 provider) Indicates that the thread pool will be unlimited. The parallel parameter and the actual number of classes/methods will decide. Setting this to "true" effectively disables perCoreThreadCount and threadCount. Defaults to "false". ++ ++ ++ workingDirectory ++ java.io.File ++ 2.1.3 ++ false ++ true ++ Command line working directory. ++ ++ ++ ++ ${maven.test.additionalClasspathDependencies} ++ ${maven.test.additionalClasspath} ++ ${argLine} ++ ${childDelegation} ++ ++ ${maven.test.dependency.excludes} ++ ${maven.surefire.debug} ++ ${dependenciesToScan} ++ ${disableXmlReport} ++ ${enableAssertions} ++ ${enableOutErrElements} ++ ${surefire.enableProcessChecker} ++ ${enablePropertiesElement} ++ ${surefire.encoding} ++ ${surefire.excludeJUnit5Engines} ++ ${surefire.excludedEnvironmentVariables} ++ ${excludedGroups} ++ ${surefire.excludes} ++ ${surefire.excludesFile} ++ ${surefire.failIfNoSpecifiedTests} ++ ${failIfNoTests} ++ ${surefire.failOnFlakeCount} ++ ${forkCount} ++ ${surefire.forkNode} ++ ${surefire.exitTimeout} ++ ${surefire.timeout} ++ ${groups} ++ ${surefire.includeJUnit5Engines} ++ ${surefire.includes} ++ ${surefire.includesFile} ++ ${junitArtifactName} ++ ${jvm} ++ ${objectFactory} ++ ${parallel} ++ ${parallelOptimized} ++ ${surefire.parallel.forcedTimeout} ++ ${surefire.parallel.timeout} ++ ${perCoreThreadCount} ++ ${surefire.printSummary} ++ ++ ${maven.test.redirectTestOutputToFile} ++ ${surefire.reportFormat} ++ ${surefire.reportNameSuffix} ++ ++ ${surefire.rerunFailingTestsCount} ++ ${reuseForks} ++ ${surefire.runOrder} ++ ${surefire.runOrder.random.seed} ++ ${surefire.shutdown} ++ ${maven.test.skip} ++ ${surefire.skipAfterFailureCount} ++ ${maven.test.skip.exec} ++ ${skipTests} ++ ${surefire.suiteXmlFiles} ++ ${surefire.systemPropertiesFile} ++ ${tempDir} ++ ${test} ++ ++ ${maven.test.failure.ignore} ++ ${testNGArtifactName} ++ ++ ${threadCount} ++ ${threadCountClasses} ++ ${threadCountMethods} ++ ${threadCountSuites} ++ ${trimStackTrace} ++ ${surefire.useFile} ++ ${surefire.useManifestOnlyJar} ++ ${surefire.useModulePath} ++ ${surefire.useSystemClassLoader} ++ ${useUnlimitedThreads} ++ ${basedir} ++ ++ ++ ++ +diff --git a/maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml b/maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml +new file mode 100644 +index 000000000..3a76ee7b9 +--- /dev/null ++++ b/maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml +@@ -0,0 +1,1145 @@ ++ ++ ++ ++ ++ ++ ${project.name} ++ ${project.description} ++ ${project.groupId} ++ ${project.artifactId} ++ ${project.version} ++ surefire ++ false ++ true ++ 1.8 ++ 3.6.3 ++ ++ ++ help ++ Display help information on maven-surefire-plugin. ++Call mvn surefire:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ false ++ false ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.maven_surefire_plugin.HelpMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ detail ++ boolean ++ false ++ true ++ If true, display all settable properties for each goal. ++ ++ ++ goal ++ java.lang.String ++ false ++ true ++ The name of the goal for which to show help. If unspecified, all goals will be displayed. ++ ++ ++ indentSize ++ int ++ false ++ true ++ The number of spaces per indentation level, should be positive. ++ ++ ++ lineLength ++ int ++ false ++ true ++ The maximum length of a display line, should be positive. ++ ++ ++ ++ ${detail} ++ ${goal} ++ ${indentSize} ++ ${lineLength} ++ ++ ++ ++ test ++ Run tests using Surefire. ++ test ++ false ++ true ++ false ++ false ++ false ++ true ++ test ++ org.apache.maven.plugin.surefire.SurefireMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ additionalClasspathDependencies ++ java.util.List ++ 3.2 ++ false ++ true ++ Additional Maven dependencies to be added to the test classpath at runtime. Each element supports the parametrization like documented in POM Reference: Dependencies <https://maven.apache.org/pom.html#dependencies>. ++Those dependencies are automatically collected (i.e. have their full dependency tree calculated) and then all underlying artifacts are resolved from the repository (including their transitive dependencies). Afterwards the resolved artifacts are filtered to only contain compile and runtime scoped ones and appended to the test classpath at runtime (after the ones from additionalClasspathElements). ++ ++The following differences to regular project dependency resolving apply: ++ ++* The dependency management from the project is not taken into account. ++* Conflicts between the different items and the project dependencies are not resolved. ++* Only external dependencies (outside the current Maven reactor) are supported. ++ ++ ++ additionalClasspathElements ++ java.lang.String[] ++ 2.4 ++ false ++ true ++ Additional elements to be appended to the test classpath at runtime. Each element must be a file system path to a JAR file or a directory containing classes. No wildcards are allowed here. ++ ++ ++ argLine ++ java.lang.String ++ 2.1 ++ false ++ true ++ Arbitrary JVM options to set on the command line. Only effective for forked executions. ++ ++Since the Version 2.17 using an alternate syntax for argLine, @{...} allows late replacement of properties when the plugin is executed, so properties that have been modified by other plugins will be picked up correctly. See the Frequently Asked Questions page with more details: ++http://maven.apache.org/surefire/maven-surefire-plugin/faq.html <http://maven.apache.org/surefire/maven-surefire-plugin/faq.html> ++http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html <http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html> ++See also: forkCount ++ ++ ++ basedir ++ java.io.File ++ true ++ false ++ The base directory of the project being tested. This can be obtained in your integration test via System.getProperty("basedir"). ++ ++ ++ childDelegation ++ boolean ++ 2.1 ++ false ++ true ++ When false it makes tests run using the standard classloader delegation instead of the default Maven isolated classloader. Only used when forking (forkCount is greater than zero). ++Setting it to false helps with some problems caused by conflicts between xml parsers in the classpath and the Java 5 provider parser. ++ ++ ++ classesDirectory ++ java.io.File ++ false ++ true ++ The directory containing generated classes of the project being tested. This will be included after the test classes in the test classpath. ++ ++ ++ classpathDependencyExcludes ++ java.lang.String[] ++ 2.6 ++ false ++ true ++ List of dependencies to exclude from the test classpath at runtime. Each item is passed as pattern to org.apache.maven.shared.artifact.filter.PatternIncludesArtifactFilter. The pattern is matched against the following artifact ids: ++* groupId:artifactId (Short ID) ++* groupId:artifactId:type:classifier (Dependency Conflict ID) ++* groupId:artifactId:type:classifier:version (Full ID) The matching algorithm is described in detail in Advanced Artifact-Matching <https://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html#advanced-artifact-matching-in-includes-and-excludes> for the maven-assembly-plugin. This parameter behaves the same as the excludes pattern described there. The dependency matching is applied to the project dependency IDs (including transitive ones) after resolving, i.e. excluding one dependency will not exclude its transitive dependencies! ++ ++ ++ classpathDependencyScopeExclude ++ java.lang.String ++ 2.6 ++ false ++ true ++ A dependency scope to exclude from the test classpath at runtime. The scope should be one of the scopes defined by org.apache.maven.artifact.Artifact. This includes the following: ++ ++* compile - system, provided, compile ++* runtime - compile, runtime ++* compile+runtime - system, provided, compile, runtime ++* runtime+system - system, compile, runtime ++* test - system, provided, compile, runtime, test ++ ++ ++ consoleOutputReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter ++ false ++ true ++ ++ ++ ++ debugForkedProcess ++ java.lang.String ++ 2.4 ++ false ++ true ++ Attach a debugger to the forked JVM. If set to "true", the process will suspend and wait for a debugger to attach on port 5005. If set to some other string, that string will be appended to the argLine, allowing you to configure arbitrary debuggability options (without overwriting the other options specified through the argLine parameter). ++ ++ ++ dependenciesToScan ++ java.lang.String[] ++ 2.15 ++ false ++ true ++ List of dependencies to scan for test classes to include in the test run. The child elements of this element must be <dependency> elements, and the contents of each of these elements must be a string which follows the general form: ++groupId[:artifactId[:type[:classifier][:version]]] ++ ++The wildcard character * can be used within the sub parts of those composite identifiers to do glob-like pattern matching. The classifier may be omitted when matching dependencies without a classifier. ++ ++Examples: ++ ++* group or, equivalently, group:* ++* g*p:*rtifac* ++* group:*:jar ++* group:artifact:*:1.0.0 (no classifier) ++* group:*:test-jar:tests ++* *:artifact:*:*:1.0.0 ++Since version 2.22.0 you can scan for test classes from a project dependency of your multi-module project. ++ ++In versions before 3.0.0-M4, only groupId:artifactId is supported. ++ ++ ++ ++ disableXmlReport ++ boolean ++ 2.2 ++ No reason given ++ false ++ true ++ Flag to disable the generation of report files in xml format. Deprecated since 3.0.0-M4. Instead use disable within statelessTestsetReporter since of 3.0.0-M6. ++ ++ ++ enableAssertions ++ boolean ++ 2.3.1 ++ false ++ true ++ By default, Surefire enables JVM assertions for the execution of your test cases. To disable the assertions, set this flag to "false". ++ ++ ++ enableOutErrElements ++ boolean ++ 3.3.1 ++ false ++ true ++ Flag for including/excluding <system-out /> and <system-err /> elements for successfully passed tests in XML reports. Note that the default value may change to false is a future version. ++ ++ ++ enableProcessChecker ++ java.lang.String ++ 3.0.0-M4 ++ false ++ true ++ Since 3.0.0-M4 the process checkers are disabled. You can enable them namely by setting ping and native or all in this parameter. ++The checker is useful in situations when you kill the build on a CI system and you want the Surefire forked JVM to kill the tests asap and free all handlers on the file system been previously used by the JVM and by the tests. ++The ping should be safely used together with ZGC or Shenandoah Garbage Collector. Due to the ping relies on timing of the PING (triggered every 30 seconds), slow GCs may pause the timers and pretend that the parent process of the forked JVM does not exist. ++The native is very fast checker. It is useful mechanism on Unix based systems, Linux distributions and Alpine/BusyBox Linux. See the JIRA SUREFIRE-1631 <https://issues.apache.org/jira/browse/SUREFIRE-1631> for Windows issues. ++Another useful configuration parameter is forkedProcessTimeoutInSeconds. ++See the Frequently Asked Questions page with more details: ++http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#kill-jvm <http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#kill-jvm> ++http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html#kill-jvm <http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html#kill-jvm> ++Example of use: ++mvn test -Dsurefire.enableProcessChecker=all ++ ++ ++ enablePropertiesElement ++ boolean ++ 3.3.1 ++ false ++ true ++ Flag for including/excluding <properties /> element for successfully passed tests in XML reports. ++ ++ ++ encoding ++ java.lang.String ++ 3.0.0-M1 ++ false ++ true ++ The character encoding scheme to be applied while generating test report files (see target/surefire-reports/yourTestName.txt). The report output files (*-out.txt) are encoded in UTF-8 if not set otherwise. ++ ++ ++ environmentVariables ++ java.util.Map ++ 2.1.3 ++ false ++ true ++ Additional environment variables to set on the command line. ++ ++ ++ excludeJUnit5Engines ++ java.lang.String[] ++ 3.0.0-M6 ++ false ++ true ++ Provide the ID/s of an JUnit engine to be excluded in the test run. ++ ++ ++ excludedEnvironmentVariables ++ java.lang.String[] ++ 3.0.0-M4 ++ false ++ true ++ You can selectively exclude individual environment variables by enumerating their keys. ++The environment is a system-dependent mapping from keys to values which is inherited from the Maven process to the forked Surefire processes. The keys must literally (case sensitive) match in order to exclude their environment variable. ++Example to exclude three environment variables: ++mvn test -Dsurefire.excludedEnvironmentVariables=ACME1,ACME2,ACME3 ++ ++ ++ excludedGroups ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG/JUnit47 provider with JUnit4.8+ only and JUnit5+ provider since 2.22.0) Excluded groups/categories/tags. Any methods/classes/etc with one of the groups/categories/tags specified in this list will specifically not be run. ++For JUnit4, this parameter forces the use of the 4.7 provider. For JUnit5, this parameter forces the use of the JUnit platform provider. ++This parameter is ignored if the suiteXmlFiles parameter is specified. ++Since version 2.18.1 and JUnit 4.12, the @Category annotation type is automatically inherited from superclasses, see @java.lang.annotation.Inherited. Make sure that test class inheritance still makes sense together with @Category annotation of the JUnit 4.12 or higher appeared in superclass. ++ ++ ++ excludes ++ java.util.List ++ false ++ true ++ A list of <exclude> elements specifying the tests (by pattern) that should be excluded in testing. When not specified and when the test parameter is not specified, the default excludes will be ++<excludes> <exclude>**/*$*</exclude> </excludes> (which excludes all inner classes). ++This parameter is ignored if the TestNG suiteXmlFiles parameter is specified. ++Each exclude item may also contain a comma-separated sub-list of items, which will be treated as multiple <exclude> entries. ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): <exclude>%regex[pkg.*Slow.*.class], Unstable*</exclude> ++Notice that these values are relative to the directory containing generated test classes of the project being tested. This directory is declared by the parameter testClassesDirectory which defaults to the POM property ${project.build.testOutputDirectory}, typically src/test/java unless overridden. ++ ++ ++ excludesFile ++ java.io.File ++ 2.13 ++ false ++ true ++ A file containing exclude patterns. Blank lines, or lines starting with # are ignored. If excludes are also specified, these patterns are appended. Example with path, simple and regex excludes: ++*/test/* **/DontRunTest.* %regex[.*Test.*|.*Not.*] Since 3.0.0-M6, method filtering support is provided in the exclusions file as well, example: pkg.SomeTest#testMethod ++ ++ ++ failIfNoSpecifiedTests ++ boolean ++ 2.12 ++ false ++ true ++ Set this to "true" to cause a failure if none of the tests specified in -Dtest=... are run. Defaults to "true". ++ ++ ++ failIfNoTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to "true" to cause a failure if there are no tests to run. Defaults to "false". ++ ++ ++ failOnFlakeCount ++ int ++ 3.0.0-M6 ++ false ++ true ++ Set this to a value greater than 0 to fail the whole test set if the cumulative number of flakes reaches this threshold. Set to 0 to allow an unlimited number of flakes. ++ ++ ++ forkCount ++ java.lang.String ++ 2.14 ++ false ++ true ++ Option to specify the number of VMs to fork in parallel in order to execute the tests. When terminated with "C", the number part is multiplied with the number of CPU cores. Floating point value are only accepted together with "C". If set to "0", no VM is forked and all tests are executed within the main process. ++ ++Example values: "1.5C", "4" ++ ++The system properties and the argLine of the forked processes may contain the place holder string ${surefire.forkNumber}, which is replaced with a fixed number for each of the parallel forks, ranging from 1 to the effective value of forkCount times the maximum number of parallel Surefire executions in maven parallel builds, i.e. the effective value of the -T command line argument of maven core. ++ ++ ++ forkNode ++ org.apache.maven.surefire.extensions.ForkNodeFactory ++ 3.0.0-M5 ++ false ++ true ++ This parameter configures the forked node. Currently, you can select the communication protocol, i.e. process pipes or TCP/IP sockets. The plugin uses process pipes by default which will be turned to TCP/IP in the version 3.0.0. Alternatively, you can implement your own factory and SPI. ++See the documentation for more details: ++https://maven.apache.org/plugins/maven-surefire-plugin/examples/process-communication.html <https://maven.apache.org/plugins/maven-surefire-plugin/examples/process-communication.html> ++ ++ ++ forkedProcessExitTimeoutInSeconds ++ int ++ 2.20 ++ false ++ true ++ Forked process is normally terminated without any significant delay after given tests have completed. If the particular tests started non-daemon Thread(s), the process hangs instead of been properly terminated by System.exit(). Use this parameter in order to determine the timeout of terminating the process. see the documentation: http://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html <http://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html> Turns to default fallback value of 30 seconds if negative integer. ++ ++ ++ forkedProcessTimeoutInSeconds ++ int ++ 2.4 ++ false ++ true ++ Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out. ++ ++ ++ groups ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG/JUnit47 provider with JUnit4.8+ only and JUnit5+ provider since 2.22.0) Groups/categories/tags for this test. Only classes/methods/etc decorated with one of the groups/categories/tags specified here will be included in test run, if specified. ++For JUnit4 tests, this parameter forces the use of the 4.7 provider. For JUnit5 tests, this parameter forces the use of the JUnit platform provider. ++This parameter is ignored if the suiteXmlFiles parameter is specified. ++Since version 2.18.1 and JUnit 4.12, the @Category annotation type is automatically inherited from superclasses, see @java.lang.annotation.Inherited. Make sure that test class inheritance still makes sense together with @Category annotation of the JUnit 4.12 or higher appeared in superclass. ++ ++ ++ includeJUnit5Engines ++ java.lang.String[] ++ 3.0.0-M6 ++ false ++ true ++ Provide the ID/s of an JUnit engine to be included in the test run. ++ ++ ++ includes ++ java.util.List ++ false ++ true ++ A list of <include> elements specifying the tests (by pattern) that should be included in testing. When not specified and when the test parameter is not specified, the default includes will be <includes> <include>**/Test*.java</include> <include>**/*Test.java</include> <include>**/*Tests.java</include> <include>**/*TestCase.java</include> </includes> Each include item may also contain a comma-separated sub-list of items, which will be treated as multiple <include> entries. ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): <include>%regex[.*[Cat|Dog].*], Basic????, !Unstable*</include> <include>%regex[.*[Cat|Dog].*], !%regex[pkg.*Slow.*.class], pkg/**/*Fast*.java</include> ++This parameter is ignored if the TestNG suiteXmlFiles parameter is specified. ++ ++Notice that these values are relative to the directory containing generated test classes of the project being tested. This directory is declared by the parameter testClassesDirectory which defaults to the POM property ${project.build.testOutputDirectory}, typically src/test/java unless overridden. ++ ++ ++ includesFile ++ java.io.File ++ 2.13 ++ false ++ true ++ A file containing include patterns. Blank lines, or lines starting with # are ignored. If includes are also specified, these patterns are appended. Example with path, simple and regex includes: */test/* **/NotIncludedByDefault.java %regex[.*Test.*|.*Not.*] ++Since 3.0.0-M6, method filtering support is provided in the inclusions file as well, example: pkg.SomeTest#testMethod ++ ++ ++ jdkToolchain ++ java.util.Map ++ 3.0.0-M5 and Maven 3.3.x ++ false ++ true ++ ++Allow for configuration of the test jvm via maven toolchains. This permits a configuration where the project is built with one jvm and tested with another. This is similar to jvm, but avoids hardcoding paths. The two parameters are mutually exclusive (jvm wins) ++ ++Examples: ++(see Guide to Toolchains <https://maven.apache.org/guides/mini/guide-using-toolchains.html> for more info) <configuration> ... <jdkToolchain> <version>1.11</version> </jdkToolchain> </configuration> <configuration> ... <jdkToolchain> <version>1.8</version> <vendor>zulu</vendor> </jdkToolchain> </configuration> ++ ++ ++ junitArtifactName ++ java.lang.String ++ 2.3.1 ++ false ++ true ++ Allows you to specify the name of the JUnit artifact. If not set, junit:junit will be used. ++ ++ ++ jvm ++ java.lang.String ++ 2.1 ++ false ++ true ++ Option to specify the jvm (or path to the java executable) to use with the forking options. For the default, the jvm will be a new instance of the same VM as the one used to run Maven. JVM settings are not inherited from MAVEN_OPTS. ++ ++ ++ objectFactory ++ java.lang.String ++ 2.5 ++ false ++ true ++ (TestNG only) Define the factory class used to create all test instances. ++ ++ ++ parallel ++ java.lang.String ++ 2.2 ++ false ++ true ++ (TestNG provider) When you use the parameter parallel, TestNG will try to run all your test methods in separate threads, except for methods that depend on each other, which will be run in the same thread in order to respect their order of execution. Supports two values: classes or methods. ++(JUnit 4.7 provider) Supports values classes, methods, both to run in separate threads been controlled by threadCount. ++ ++Since version 2.16 (JUnit 4.7 provider), the value both is DEPRECATED. Use classesAndMethods instead. ++ ++Since version 2.16 (JUnit 4.7 provider), additional vales are available: ++suites, suitesAndClasses, suitesAndMethods, classesAndMethods, all. ++By default, Surefire does not execute tests in parallel. You can set the parameter parallel to none to explicitly disable parallel execution (e.g. when disabling parallel execution in special Maven profiles when executing coverage analysis). ++ ++ ++ parallelMavenExecution ++ java.lang.Boolean ++ false ++ false ++ Parallel Maven Execution. ++ ++ ++ parallelOptimized ++ boolean ++ 2.17 ++ false ++ true ++ (JUnit 4.7 / provider only) The thread counts do not exceed the number of parallel suite, class runners and average number of methods per class if set to true. ++True by default. ++ ++ ++ parallelTestsTimeoutForcedInSeconds ++ double ++ 2.16 ++ false ++ true ++ Stop executing queued parallel JUnit tests and interrupt currently running tests after a certain number of seconds. ++Example values: "3.5", "4" ++ ++If set to 0, wait forever, never timing out. Makes sense with specified parallel different from "none". ++ ++ ++ parallelTestsTimeoutInSeconds ++ double ++ 2.16 ++ false ++ true ++ Stop executing queued parallel JUnit tests after a certain number of seconds. ++Example values: "3.5", "4" ++ ++If set to 0, wait forever, never timing out. Makes sense with specified parallel different from "none". ++ ++ ++ perCoreThreadCount ++ boolean ++ 2.5 ++ false ++ true ++ (JUnit 4.7 provider) Indicates that threadCount, threadCountSuites, threadCountClasses, threadCountMethods are per cpu core. ++ ++ ++ pluginArtifactMap ++ java.util.Map ++ true ++ false ++ Map of plugin artifacts. ++ ++ ++ pluginDescriptor ++ org.apache.maven.plugin.descriptor.PluginDescriptor ++ 2.12 ++ true ++ false ++ Information about this plugin, mainly used to lookup this plugin's configuration from the currently executing project. ++ ++ ++ printSummary ++ boolean ++ false ++ true ++ Option to print summary of test suites or just print the test cases that have errors. ++ ++ ++ project ++ org.apache.maven.project.MavenProject ++ true ++ false ++ The Maven Project Object. ++ ++ ++ projectArtifactMap ++ java.util.Map ++ true ++ false ++ Map of project artifacts. ++ ++ ++ projectBuildDirectory ++ java.io.File ++ 2.20 ++ true ++ false ++ Read-only parameter with value of Maven property project.build.directory. ++ ++ ++ promoteUserPropertiesToSystemProperties ++ boolean ++ 3.4.0 ++ false ++ true ++ If set to true will also pass all user properties exposed via MavenSession#getUserProperties() as system properties to a provider. Those always take precedence over same named system properties set via any other means. ++See also: systemPropertyVariables ++ ++ ++ properties ++ java.util.Properties ++ 2.4 ++ false ++ true ++ List of properties for configuring the testing provider. This is the preferred method of configuring TestNG and JUnit platform providers. ++ ++JUnit platform properties may be defined in a configurationParameters element: <properties> <configurationParameters> junit.jupiter.execution.parallel.enabled = true junit.jupiter.execution.parallel.mode.default = concurrent </configurationParameters> </properties> ++TestNG properties may be defined as distinct element blocks: <properties> <property> <name>parallel</name> <value>methods</value> </property> </properties> ++ ++ ++ redirectTestOutputToFile ++ boolean ++ 2.3 ++ false ++ true ++ Set this to "true" to redirect the unit test standard output to a file (found in reportsDirectory/testName-output.txt). ++ ++ ++ reportFormat ++ java.lang.String ++ false ++ true ++ Selects the formatting for the test report to be generated. Can be set as "brief" or "plain". Only applies to the output format of the output files (target/surefire-reports/testName.txt) ++ ++ ++ reportNameSuffix ++ java.lang.String ++ false ++ true ++ Add custom text into report filename: TEST-testClassName-reportNameSuffix.xml, testClassName-reportNameSuffix.txt and testClassName-reportNameSuffix-output.txt. File TEST-testClassName-reportNameSuffix.xml has changed attributes 'testsuite'--'name' and 'testcase'--'classname' - reportNameSuffix is added to the attribute value. ++ ++ ++ reportsDirectory ++ java.io.File ++ false ++ true ++ Base directory where all reports are written to. ++ ++ ++ rerunFailingTestsCount ++ int ++ false ++ true ++ (JUnit 4+ providers and JUnit 5+ providers since 3.0.0-M4) The number of times each failing test will be rerun. If set larger than 0, rerun failing tests immediately after they fail. If a failing test passes in any of those reruns, it will be marked as pass and reported as a "flake". However, all the failing attempts will be recorded. ++ ++ ++ reuseForks ++ boolean ++ 2.13 ++ false ++ true ++ Indicates if forked VMs can be reused. If set to "false", a new VM is forked for each test class to be executed. If set to "true", up to forkCount VMs will be forked and then reused to execute all tests. ++ ++ ++ runOrder ++ java.lang.String ++ 2.7 ++ false ++ true ++ Defines the order the tests will be run in. Supported values are alphabetical, reversealphabetical, random, hourly (alphabetical on even hours, reverse alphabetical on odd hours), failedfirst, balanced and filesystem. ++ ++Odd/Even for hourly is determined at the time the of scanning the classpath, meaning it could change during a multi-module build. ++ ++Failed first will run tests that failed on previous run first, as well as new tests for this run. ++ ++Balanced is only relevant with parallel=classes, and will try to optimize the run-order of the tests reducing the overall execution time. Initially a statistics file is created and every next test run will reorder classes. ++ ++Note that the statistics are stored in a file named .surefire-XXXXXXXXX beside pom.xml and should not be checked into version control. The "XXXXX" is the SHA1 checksum of the entire surefire configuration, so different configurations will have different statistics files, meaning if you change any configuration settings you will re-run once before new statistics data can be established. ++ ++ ++ runOrderRandomSeed ++ java.lang.Long ++ 3.0.0-M6 ++ false ++ true ++ Sets the random seed that will be used to order the tests if surefire.runOrder is set to random. ++ ++If no seeds are set and surefire.runOrder is set to random, then the seed used will be outputted (search for "To reproduce ordering use flag -Dsurefire.runOrder.random.seed"). ++ ++To deterministically reproduce any random test order that was run before, simply set the seed to be the same value. ++ ++ ++ session ++ org.apache.maven.execution.MavenSession ++ true ++ false ++ The current build session instance. ++ ++ ++ shutdown ++ java.lang.String ++ 2.19 ++ false ++ true ++ After the plugin process is shutdown by sending SIGTERM signal (CTRL+C), SHUTDOWN command is received by every forked JVM. ++The value is set to (shutdown=exit) by default (changed in version 3.0.0-M4). ++The parameter can be configured with other two values testset and kill. ++With(shutdown=testset) the test set may still continue to run in forked JVM. ++Using exit forked JVM executes System.exit(1) after the plugin process has received SIGTERM signal. ++Using kill the JVM executes Runtime.halt(1) and kills itself. ++ ++ ++ skip ++ boolean ++ false ++ true ++ Set this to "true" to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you enable it using the "maven.test.skip" property, because maven.test.skip disables both running the tests and compiling the tests. Consider using the skipTests parameter instead. ++ ++ ++ skipAfterFailureCount ++ int ++ 2.19 ++ false ++ true ++ Set to error/failure count in order to skip remaining tests. Due to race conditions in parallel/forked execution this may not be fully guaranteed. ++Enable with system property -Dsurefire.skipAfterFailureCount=1 or any number greater than zero. Defaults to "0". ++See the prerequisites and limitations in documentation: ++http://maven.apache.org/plugins/maven-surefire-plugin/examples/skip-after-failure.html <http://maven.apache.org/plugins/maven-surefire-plugin/examples/skip-after-failure.html> ++ ++ ++ skipExec ++ boolean ++ 2.3 ++ Use skipTests instead. ++ false ++ true ++ This old parameter is just like skipTests, but bound to the old property "maven.test.skip.exec". ++ ++ ++ skipTests ++ boolean ++ 2.4 ++ false ++ true ++ Set this to "true" to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++Failsafe plugin deprecated the parameter skipTests and the parameter will be removed in Failsafe 3.0.0 as it is a source of conflicts between Failsafe and Surefire plugin. ++ ++ ++ statelessTestsetInfoReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter ++ false ++ true ++ ++ ++ ++ statelessTestsetReporter ++ org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter ++ false ++ true ++ Note: use the legacy system property disableXmlReport set to true to disable the report. ++ ++ ++ suiteXmlFiles ++ java.io.File[] ++ 2.2 ++ false ++ true ++ (TestNG) List of <suiteXmlFile> elements specifying TestNG suite xml file locations. Note that suiteXmlFiles is incompatible with several other parameters of this plugin, like includes and excludes. ++This parameter is ignored if the test parameter is specified (allowing you to run a single test instead of an entire suite). ++ ++ ++ systemProperties ++ java.util.Properties ++ Use systemPropertyVariables instead. ++ false ++ true ++ List of System properties to pass to a provider. ++See also: systemPropertyVariables for how the effective provider properties are calculated ++ ++ ++ systemPropertiesFile ++ java.io.File ++ false ++ true ++ Properties file being used as system properties passed to the provider. ++See also: systemPropertyVariables for how the effective provider properties are calculated ++ ++ ++ systemPropertyVariables ++ java.util.Map ++ 2.5 ++ false ++ true ++ List of System properties to pass to a provider. The effective system properties given to a provider are contributed from several sources: ++* properties set via argLine with -D (only for forked executions) ++* systemProperties ++* getSystemPropertiesFile() (set via parameter systemPropertiesFile on some goals) ++* systemPropertyVariables ++* User properties from MavenSession#getUserProperties(), usually set via CLI options given with -D on the current Maven process (only used as source if promoteUserPropertiesToSystemProperties is true) Later sources may overwrite same named properties from earlier sources, that means for example that one cannot overwrite user properties with either systemProperties, getSystemPropertiesFile() or systemPropertyVariables. ++Certain properties may only be overwritten via argLine (applicable only for forked executions) because their values are cached and only evaluated at the start of the JRE. Those include: ++ ++* java.library.path ++* file.encoding ++* jdk.map.althashing.threshold ++* line.separator ++See also: systemProperties ++ ++ ++ tempDir ++ java.lang.String ++ 2.20 ++ false ++ true ++ Relative path to temporary-surefire-boot directory containing internal Surefire temporary files. ++The temporary-surefire-boot directory is project.build.directory on most platforms or system default temporary-directory specified by the system property java.io.tmpdir on Windows (see SUREFIRE-1400 <https://issues.apache.org/jira/browse/SUREFIRE-1400>). ++It is deleted after the test set has completed. ++ ++ ++ test ++ java.lang.String ++ false ++ true ++ Specify this parameter to run individual tests by file name, overriding the parameter includes and excludes. Each pattern you specify here will be used to create an include pattern formatted like **/${test}.java, so you can just type -Dtest=MyTest to run a single test called "foo/MyTest.java". The test patterns prefixed with a ! will be excluded. ++This parameter overrides the parameter includes, excludes, and the TestNG parameter suiteXmlFiles. ++Since 2.7.3, you can execute a limited number of methods in the test by adding #myMethod or #my*ethod. For example, -Dtest=MyTest#myMethod. This is supported for junit 4.x and TestNg. ++ ++Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): "-Dtest=???Test, !Unstable*, pkg/**/Ci*leTest.java, *Test#test*One+testTwo?????, #fast*+slowTest" or e.g. "-Dtest=Basic*, !%regex[.*.Unstable.*], !%regex[.*.MyTest.class#one.*|two.*], %regex[#fast.*|slow.*]" ++The Parameterized JUnit runner describes test methods using an index in brackets, so the non-regex method pattern would become: #testMethod[*]. If using @Parameters(name="{index}: fib({0})={1}") and selecting the index e.g. 5 in pattern, the non-regex method pattern would become #testMethod[5:*]. ++ ++ ++ testClassesDirectory ++ java.io.File ++ false ++ true ++ The directory containing generated test classes of the project being tested. This will be included at the beginning of the test classpath. ++ ++ ++ testFailureIgnore ++ boolean ++ false ++ true ++ Set this to "true" to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion. ++ ++ ++ testNGArtifactName ++ java.lang.String ++ 2.3.1 ++ false ++ true ++ Allows you to specify the name of the TestNG artifact. If not set, org.testng:testng will be used. ++ ++ ++ testSourceDirectory ++ java.io.File ++ 2.2 ++ false ++ true ++ The test source directory containing test class sources. Important only for TestNG HTML reports. ++ ++ ++ threadCount ++ int ++ 2.2 ++ false ++ true ++ (TestNG/JUnit 4.7 provider) The attribute thread-count allows you to specify how many threads should be allocated for this execution. Only makes sense to use in conjunction with the parallel parameter. ++ ++ ++ threadCountClasses ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test classes, i.e.: ++* number of concurrent classes if threadCount is 0 or unspecified ++* limited classes concurrency if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 30% of threadCount in concurrent classes. ++* as in the previous case but without this leaf thread-count. Example: parallel=suitesAndClasses, threadCount=16, threadCountSuites=5, threadCountClasses is unspecified leaf, the number of concurrent classes is varying from >= 11 to 14 or 15. The threadCountSuites become given number of threads. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ threadCountMethods ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test methods, i.e.: ++* number of concurrent methods if threadCount is 0 or unspecified ++* limited concurrency of methods if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 50% of threadCount which appears in concurrent methods. ++* as in the previous case but without this leaf thread-count. Example: parallel=all, threadCount=16, threadCountSuites=2, threadCountClasses=3, but threadCountMethods is unspecified leaf, the number of concurrent methods is varying from >= 11 to 14 or 15. The threadCountSuites and threadCountClasses become given number of threads. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ threadCountSuites ++ int ++ 2.16 ++ false ++ true ++ (JUnit 4.7 provider) This attribute allows you to specify the concurrency in test suites, i.e.: ++* number of concurrent suites if threadCount is 0 or unspecified ++* limited suites concurrency if useUnlimitedThreads is set to true ++* if threadCount and certain thread-count parameters are > 0 for parallel, the concurrency is computed from ratio. For instance parallel=all and the ratio between threadCountSuites:threadCountClasses:threadCountMethods is 2:3:5, there is 20% of threadCount which appeared in concurrent suites. Only makes sense to use in conjunction with the parallel parameter. The default value 0 behaves same as unspecified one. ++ ++ ++ trimStackTrace ++ boolean ++ 2.2 ++ false ++ true ++ Whether to trim the stack trace in the reports to just the lines within the test, or show the full trace. ++ ++ ++ useFile ++ boolean ++ false ++ true ++ Option to generate a file test report or just output the test report to the console. ++ ++ ++ useManifestOnlyJar ++ boolean ++ 2.4.3 ++ false ++ true ++ By default, Surefire forks your tests using a manifest-only JAR; set this parameter to "false" to force it to launch your tests with a plain old Java classpath. (See the http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-loading.html <http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-loading.html> for a more detailed explanation of manifest-only JARs and their benefits.) ++Beware, setting this to "false" may cause your tests to fail on Windows if your classpath is too long. ++ ++ ++ useModulePath ++ boolean ++ 3.0.0-M2 ++ false ++ true ++ When true, uses the modulepath when executing with JDK 9+ and module-info.java is present. When false, always uses the classpath. ++Defaults to true. ++ ++ ++ useSystemClassLoader ++ boolean ++ 2.3 ++ false ++ true ++ Option to pass dependencies to the system's classloader instead of using an isolated class loader when forking. Prevents problems with JDKs which implement the service provider lookup mechanism by using the system's ClassLoader. ++ ++ ++ useUnlimitedThreads ++ boolean ++ 2.5 ++ false ++ true ++ (JUnit 4.7 provider) Indicates that the thread pool will be unlimited. The parallel parameter and the actual number of classes/methods will decide. Setting this to "true" effectively disables perCoreThreadCount and threadCount. Defaults to "false". ++ ++ ++ workingDirectory ++ java.io.File ++ 2.1.3 ++ false ++ true ++ Command line working directory. ++ ++ ++ ++ ${maven.test.additionalClasspathDependencies} ++ ${maven.test.additionalClasspath} ++ ${argLine} ++ ++ ${childDelegation} ++ ++ ${maven.test.dependency.excludes} ++ ${maven.surefire.debug} ++ ${dependenciesToScan} ++ ${disableXmlReport} ++ ${enableAssertions} ++ ${enableOutErrElements} ++ ${surefire.enableProcessChecker} ++ ${enablePropertiesElement} ++ ${surefire.encoding} ++ ${surefire.excludeJUnit5Engines} ++ ${surefire.excludedEnvironmentVariables} ++ ${excludedGroups} ++ ${surefire.excludes} ++ ${surefire.excludesFile} ++ ${surefire.failIfNoSpecifiedTests} ++ ${failIfNoTests} ++ ${surefire.failOnFlakeCount} ++ ${forkCount} ++ ${surefire.forkNode} ++ ${surefire.exitTimeout} ++ ${surefire.timeout} ++ ${groups} ++ ${surefire.includeJUnit5Engines} ++ ${surefire.includes} ++ ${surefire.includesFile} ++ ${junitArtifactName} ++ ${jvm} ++ ${objectFactory} ++ ${parallel} ++ ++ ${parallelOptimized} ++ ${surefire.parallel.forcedTimeout} ++ ${surefire.parallel.timeout} ++ ${perCoreThreadCount} ++ ${plugin.artifactMap} ++ ++ ${surefire.printSummary} ++ ++ ${project.artifactMap} ++ ++ ++ ${maven.test.redirectTestOutputToFile} ++ ${surefire.reportFormat} ++ ${surefire.reportNameSuffix} ++ ++ ${surefire.rerunFailingTestsCount} ++ ${reuseForks} ++ ${surefire.runOrder} ++ ${surefire.runOrder.random.seed} ++ ++ ${surefire.shutdown} ++ ${maven.test.skip} ++ ${surefire.skipAfterFailureCount} ++ ${maven.test.skip.exec} ++ ${skipTests} ++ ${surefire.suiteXmlFiles} ++ ${surefire.systemPropertiesFile} ++ ${tempDir} ++ ${test} ++ ++ ${maven.test.failure.ignore} ++ ${testNGArtifactName} ++ ++ ${threadCount} ++ ${threadCountClasses} ++ ${threadCountMethods} ++ ${threadCountSuites} ++ ${trimStackTrace} ++ ${surefire.useFile} ++ ${surefire.useManifestOnlyJar} ++ ${surefire.useModulePath} ++ ${surefire.useSystemClassLoader} ++ ${useUnlimitedThreads} ++ ${basedir} ++ ++ ++ ++ org.codehaus.plexus.languages.java.jpms.LocationManager ++ locationManager ++ ++ ++ org.codehaus.plexus.logging.Logger ++ logger ++ ++ ++ org.apache.maven.surefire.providerapi.ProviderDetector ++ providerDetector ++ ++ ++ org.apache.maven.plugin.surefire.SurefireDependencyResolver ++ surefireDependencyResolver ++ ++ ++ org.apache.maven.toolchain.ToolchainManager ++ toolchainManager ++ ++ ++ ++ ++ ++ ++ org.apache.maven.surefire ++ surefire-api ++ jar ++ 3.5.0 ++ ++ ++ org.apache.commons ++ commons-lang3 ++ jar ++ 3.16.0 ++ ++ ++ org.apache.maven.surefire ++ surefire-logger-api ++ jar ++ 3.5.0 ++ ++ ++ org.apache.maven.shared ++ maven-shared-utils ++ jar ++ 3.3.4 ++ ++ ++ org.slf4j ++ slf4j-api ++ jar ++ 1.7.36 ++ ++ ++ commons-io ++ commons-io ++ jar ++ 2.16.1 ++ ++ ++ org.apache.maven.surefire ++ surefire-extensions-api ++ jar ++ 3.5.0 ++ ++ ++ org.apache.maven.surefire ++ maven-surefire-common ++ jar ++ 3.5.0 ++ ++ ++ org.apache.commons ++ commons-compress ++ jar ++ 1.27.1 ++ ++ ++ commons-codec ++ commons-codec ++ jar ++ 1.16.1 ++ ++ ++ org.apache.maven.surefire ++ surefire-booter ++ jar ++ 3.5.0 ++ ++ ++ org.apache.maven.surefire ++ surefire-extensions-spi ++ jar ++ 3.5.0 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-util ++ jar ++ 1.4.1 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-api ++ jar ++ 1.9.22 ++ ++ ++ org.apache.maven.shared ++ maven-common-artifact-filters ++ jar ++ 3.4.0 ++ ++ ++ org.codehaus.plexus ++ plexus-java ++ jar ++ 1.2.0 ++ ++ ++ org.ow2.asm ++ asm ++ jar ++ 9.6 ++ ++ ++ com.thoughtworks.qdox ++ qdox ++ jar ++ 2.0.3 ++ ++ ++ +diff --git a/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_plugin/HelpMojo.java b/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_plugin/HelpMojo.java +new file mode 100644 +index 000000000..fc1065a39 +--- /dev/null ++++ b/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_plugin/HelpMojo.java +@@ -0,0 +1,448 @@ ++package org.apache.maven.plugins.maven_surefire_plugin; ++ ++import org.apache.maven.plugin.AbstractMojo; ++import org.apache.maven.plugin.MojoExecutionException; ++import org.apache.maven.plugins.annotations.Mojo; ++import org.apache.maven.plugins.annotations.Parameter; ++ ++import org.w3c.dom.Document; ++import org.w3c.dom.Element; ++import org.w3c.dom.Node; ++import org.w3c.dom.NodeList; ++import org.xml.sax.SAXException; ++ ++import javax.xml.parsers.DocumentBuilder; ++import javax.xml.parsers.DocumentBuilderFactory; ++import javax.xml.parsers.ParserConfigurationException; ++import java.io.IOException; ++import java.io.InputStream; ++import java.util.ArrayList; ++import java.util.List; ++ ++/** ++ * Display help information on maven-surefire-plugin.
++ * Call mvn surefire:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ * @author maven-plugin-tools ++ */ ++@Mojo( name = "help", requiresProject = false, threadSafe = true ) ++public class HelpMojo ++ extends AbstractMojo ++{ ++ /** ++ * If true, display all settable properties for each goal. ++ * ++ */ ++ @Parameter( property = "detail", defaultValue = "false" ) ++ private boolean detail; ++ ++ /** ++ * The name of the goal for which to show help. If unspecified, all goals will be displayed. ++ * ++ */ ++ @Parameter( property = "goal" ) ++ private java.lang.String goal; ++ ++ /** ++ * The maximum length of a display line, should be positive. ++ * ++ */ ++ @Parameter( property = "lineLength", defaultValue = "80" ) ++ private int lineLength; ++ ++ /** ++ * The number of spaces per indentation level, should be positive. ++ * ++ */ ++ @Parameter( property = "indentSize", defaultValue = "2" ) ++ private int indentSize; ++ ++ // /META-INF/maven///plugin-help.xml ++ private static final String PLUGIN_HELP_PATH = ++ "/META-INF/maven/org.apache.maven.plugins/maven-surefire-plugin/plugin-help.xml"; ++ ++ private static final int DEFAULT_LINE_LENGTH = 80; ++ ++ private Document build() ++ throws MojoExecutionException ++ { ++ getLog().debug( "load plugin-help.xml: " + PLUGIN_HELP_PATH ); ++ try ( InputStream is = getClass().getResourceAsStream( PLUGIN_HELP_PATH ) ) ++ { ++ if ( is == null ) ++ { ++ throw new MojoExecutionException( "Could not find plugin descriptor at " + PLUGIN_HELP_PATH ); ++ } ++ DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); ++ DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); ++ return dBuilder.parse( is ); ++ } ++ catch ( IOException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ catch ( ParserConfigurationException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ catch ( SAXException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ } ++ ++ /** ++ * {@inheritDoc} ++ */ ++ @Override ++ public void execute() ++ throws MojoExecutionException ++ { ++ if ( lineLength <= 0 ) ++ { ++ getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." ); ++ lineLength = DEFAULT_LINE_LENGTH; ++ } ++ if ( indentSize <= 0 ) ++ { ++ getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." ); ++ indentSize = 2; ++ } ++ ++ Document doc = build(); ++ ++ StringBuilder sb = new StringBuilder(); ++ Node plugin = getSingleChild( doc, "plugin" ); ++ ++ ++ String name = getValue( plugin, "name" ); ++ String version = getValue( plugin, "version" ); ++ String id = getValue( plugin, "groupId" ) + ":" + getValue( plugin, "artifactId" ) + ":" + version; ++ if ( isNotEmpty( name ) && !name.contains( id ) ) ++ { ++ append( sb, name + " " + version, 0 ); ++ } ++ else ++ { ++ if ( isNotEmpty( name ) ) ++ { ++ append( sb, name, 0 ); ++ } ++ else ++ { ++ append( sb, id, 0 ); ++ } ++ } ++ append( sb, getValue( plugin, "description" ), 1 ); ++ append( sb, "", 0 ); ++ ++ //plugin ++ String goalPrefix = getValue( plugin, "goalPrefix" ); ++ ++ Node mojos1 = getSingleChild( plugin, "mojos" ); ++ ++ List mojos = findNamedChild( mojos1, "mojo" ); ++ ++ if ( goal == null || goal.length() <= 0 ) ++ { ++ append( sb, "This plugin has " + mojos.size() + ( mojos.size() > 1 ? " goals:" : " goal:" ), 0 ); ++ append( sb, "", 0 ); ++ } ++ ++ for ( Node mojo : mojos ) ++ { ++ writeGoal( sb, goalPrefix, (Element) mojo ); ++ } ++ ++ if ( getLog().isInfoEnabled() ) ++ { ++ getLog().info( sb.toString() ); ++ } ++ } ++ ++ ++ private static boolean isNotEmpty( String string ) ++ { ++ return string != null && string.length() > 0; ++ } ++ ++ private static String getValue( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ return getSingleChild( node, elementName ).getTextContent(); ++ } ++ ++ private static Node getSingleChild( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ List namedChild = findNamedChild( node, elementName ); ++ if ( namedChild.isEmpty() ) ++ { ++ throw new MojoExecutionException( "Could not find " + elementName + " in plugin-help.xml" ); ++ } ++ if ( namedChild.size() > 1 ) ++ { ++ throw new MojoExecutionException( "Multiple " + elementName + " in plugin-help.xml" ); ++ } ++ return namedChild.get( 0 ); ++ } ++ ++ private static List findNamedChild( Node node, String elementName ) ++ { ++ List result = new ArrayList(); ++ NodeList childNodes = node.getChildNodes(); ++ for ( int i = 0; i < childNodes.getLength(); i++ ) ++ { ++ Node item = childNodes.item( i ); ++ if ( elementName.equals( item.getNodeName() ) ) ++ { ++ result.add( item ); ++ } ++ } ++ return result; ++ } ++ ++ private static Node findSingleChild( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ List elementsByTagName = findNamedChild( node, elementName ); ++ if ( elementsByTagName.isEmpty() ) ++ { ++ return null; ++ } ++ if ( elementsByTagName.size() > 1 ) ++ { ++ throw new MojoExecutionException( "Multiple " + elementName + "in plugin-help.xml" ); ++ } ++ return elementsByTagName.get( 0 ); ++ } ++ ++ private void writeGoal( StringBuilder sb, String goalPrefix, Element mojo ) ++ throws MojoExecutionException ++ { ++ String mojoGoal = getValue( mojo, "goal" ); ++ Node configurationElement = findSingleChild( mojo, "configuration" ); ++ Node description = findSingleChild( mojo, "description" ); ++ if ( goal == null || goal.length() <= 0 || mojoGoal.equals( goal ) ) ++ { ++ append( sb, goalPrefix + ":" + mojoGoal, 0 ); ++ Node deprecated = findSingleChild( mojo, "deprecated" ); ++ if ( ( deprecated != null ) && isNotEmpty( deprecated.getTextContent() ) ) ++ { ++ append( sb, "Deprecated. " + deprecated.getTextContent(), 1 ); ++ if ( detail && description != null ) ++ { ++ append( sb, "", 0 ); ++ append( sb, description.getTextContent(), 1 ); ++ } ++ } ++ else if ( description != null ) ++ { ++ append( sb, description.getTextContent(), 1 ); ++ } ++ append( sb, "", 0 ); ++ ++ if ( detail ) ++ { ++ Node parametersNode = getSingleChild( mojo, "parameters" ); ++ List parameters = findNamedChild( parametersNode, "parameter" ); ++ append( sb, "Available parameters:", 1 ); ++ append( sb, "", 0 ); ++ ++ for ( Node parameter : parameters ) ++ { ++ writeParameter( sb, parameter, configurationElement ); ++ } ++ } ++ } ++ } ++ ++ private void writeParameter( StringBuilder sb, Node parameter, Node configurationElement ) ++ throws MojoExecutionException ++ { ++ String parameterName = getValue( parameter, "name" ); ++ String parameterDescription = getValue( parameter, "description" ); ++ ++ Element fieldConfigurationElement = null; ++ if ( configurationElement != null ) ++ { ++ fieldConfigurationElement = (Element) findSingleChild( configurationElement, parameterName ); ++ } ++ ++ String parameterDefaultValue = ""; ++ if ( fieldConfigurationElement != null && fieldConfigurationElement.hasAttribute( "default-value" ) ) ++ { ++ parameterDefaultValue = " (Default: " + fieldConfigurationElement.getAttribute( "default-value" ) + ")"; ++ } ++ append( sb, parameterName + parameterDefaultValue, 2 ); ++ Node deprecated = findSingleChild( parameter, "deprecated" ); ++ if ( ( deprecated != null ) && isNotEmpty( deprecated.getTextContent() ) ) ++ { ++ append( sb, "Deprecated. " + deprecated.getTextContent(), 3 ); ++ append( sb, "", 0 ); ++ } ++ if ( isNotEmpty( parameterDescription ) ) { ++ append( sb, parameterDescription, 3 ); ++ } ++ if ( "true".equals( getValue( parameter, "required" ) ) ) ++ { ++ append( sb, "Required: Yes", 3 ); ++ } ++ if ( ( fieldConfigurationElement != null ) && isNotEmpty( fieldConfigurationElement.getTextContent() ) ) ++ { ++ String property = getPropertyFromExpression( fieldConfigurationElement.getTextContent() ); ++ append( sb, "User property: " + property, 3 ); ++ } ++ ++ append( sb, "", 0 ); ++ } ++ ++ /** ++ *

Repeat a String n times to form a new string.

++ * ++ * @param str String to repeat ++ * @param repeat number of times to repeat str ++ * @return String with repeated String ++ * @throws NegativeArraySizeException if repeat < 0 ++ * @throws NullPointerException if str is null ++ */ ++ private static String repeat( String str, int repeat ) ++ { ++ StringBuilder buffer = new StringBuilder( repeat * str.length() ); ++ ++ for ( int i = 0; i < repeat; i++ ) ++ { ++ buffer.append( str ); ++ } ++ ++ return buffer.toString(); ++ } ++ ++ /** ++ * Append a description to the buffer by respecting the indentSize and lineLength parameters. ++ * Note: The last character is always a new line. ++ * ++ * @param sb The buffer to append the description, not null. ++ * @param description The description, not null. ++ * @param indent The base indentation level of each line, must not be negative. ++ */ ++ private void append( StringBuilder sb, String description, int indent ) ++ { ++ for ( String line : toLines( description, indent, indentSize, lineLength ) ) ++ { ++ sb.append( line ).append( '\n' ); ++ } ++ } ++ ++ /** ++ * Splits the specified text into lines of convenient display length. ++ * ++ * @param text The text to split into lines, must not be null. ++ * @param indent The base indentation level of each line, must not be negative. ++ * @param indentSize The size of each indentation, must not be negative. ++ * @param lineLength The length of the line, must not be negative. ++ * @return The sequence of display lines, never null. ++ * @throws NegativeArraySizeException if indent < 0 ++ */ ++ private static List toLines( String text, int indent, int indentSize, int lineLength ) ++ { ++ List lines = new ArrayList(); ++ ++ String ind = repeat( "\t", indent ); ++ ++ String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" ); ++ ++ for ( String plainLine : plainLines ) ++ { ++ toLines( lines, ind + plainLine, indentSize, lineLength ); ++ } ++ ++ return lines; ++ } ++ ++ /** ++ * Adds the specified line to the output sequence, performing line wrapping if necessary. ++ * ++ * @param lines The sequence of display lines, must not be null. ++ * @param line The line to add, must not be null. ++ * @param indentSize The size of each indentation, must not be negative. ++ * @param lineLength The length of the line, must not be negative. ++ */ ++ private static void toLines( List lines, String line, int indentSize, int lineLength ) ++ { ++ int lineIndent = getIndentLevel( line ); ++ StringBuilder buf = new StringBuilder( 256 ); ++ ++ String[] tokens = line.split( " +" ); ++ ++ for ( String token : tokens ) ++ { ++ if ( buf.length() > 0 ) ++ { ++ if ( buf.length() + token.length() >= lineLength ) ++ { ++ lines.add( buf.toString() ); ++ buf.setLength( 0 ); ++ buf.append( repeat( " ", lineIndent * indentSize ) ); ++ } ++ else ++ { ++ buf.append( ' ' ); ++ } ++ } ++ ++ for ( int j = 0; j < token.length(); j++ ) ++ { ++ char c = token.charAt( j ); ++ if ( c == '\t' ) ++ { ++ buf.append( repeat( " ", indentSize - buf.length() % indentSize ) ); ++ } ++ else if ( c == '\u00A0' ) ++ { ++ buf.append( ' ' ); ++ } ++ else ++ { ++ buf.append( c ); ++ } ++ } ++ } ++ lines.add( buf.toString() ); ++ } ++ ++ /** ++ * Gets the indentation level of the specified line. ++ * ++ * @param line The line whose indentation level should be retrieved, must not be null. ++ * @return The indentation level of the line. ++ */ ++ private static int getIndentLevel( String line ) ++ { ++ int level = 0; ++ for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ ) ++ { ++ level++; ++ } ++ for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ ) ++ { ++ if ( line.charAt( i ) == '\t' ) ++ { ++ level++; ++ break; ++ } ++ } ++ return level; ++ } ++ ++ private static String getPropertyFromExpression( String expression ) ++ { ++ if ( expression != null && expression.startsWith( "${" ) && expression.endsWith( "}" ) ++ && !expression.substring( 2 ).contains( "${" ) ) ++ { ++ // expression="${xxx}" -> property="xxx" ++ return expression.substring( 2, expression.length() - 1 ); ++ } ++ // no property can be extracted ++ return null; ++ } ++} +diff --git a/maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-report-plugin/plugin-help.xml b/maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-report-plugin/plugin-help.xml +new file mode 100644 +index 000000000..e93a949b0 +--- /dev/null ++++ b/maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-report-plugin/plugin-help.xml +@@ -0,0 +1,496 @@ ++ ++ ++ ++ ++ ++ ${project.name} ++ ${project.description} ++ ${project.groupId} ++ ${project.artifactId} ++ ${project.version} ++ surefire-report ++ ++ ++ failsafe-report-only ++ Creates a nicely formatted Failsafe Test Report in html format. This goal does not run the tests, it only builds the reports. See https://issues.apache.org/jira/browse/SUREFIRE-257 <https://issues.apache.org/jira/browse/SUREFIRE-257> ++ false ++ true ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.surefire.report.FailsafeOnlyReport ++ java ++ per-lookup ++ once-per-session ++ 2.10 ++ false ++ ++ ++ aggregate ++ boolean ++ false ++ true ++ Whether to build an aggregated report at the root, or build individual reports. ++ ++ ++ alwaysGenerateFailsafeReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the failsafe report will be generated even when there are no failsafe result files. Defaults to false to preserve legacy behaviour pre 2.10. ++ ++ ++ customBundle ++ java.lang.String ++ 3.1.0 ++ false ++ true ++ Path for a custom bundle instead of using the default one. ++Using this field, you could change the texts in the generated reports. ++ ++ ++ linkXRef ++ boolean ++ false ++ true ++ Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used. ++ ++ ++ locale ++ java.lang.String ++ false ++ true ++ ++ ++ ++ outputDirectory ++ java.io.File ++ true ++ true ++ ++ ++ ++ outputFormat ++ java.lang.String ++ false ++ true ++ ++ ++ ++ outputName ++ java.lang.String ++ true ++ true ++ The filename to use for the report. ++ ++ ++ outputTimestamp ++ java.lang.String ++ false ++ true ++ ++ ++ ++ reportsDirectories ++ java.io.File[] ++ false ++ true ++ Directories containing the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ reportsDirectory ++ java.io.File ++ No reason given ++ false ++ true ++ (Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ showSuccess ++ boolean ++ true ++ true ++ If set to false, only failures are shown. ++ ++ ++ siteDirectory ++ java.io.File ++ false ++ true ++ ++ ++ ++ skipFailsafeReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the failsafe report generation will be skipped. ++ ++ ++ xrefTestLocation ++ java.io.File ++ false ++ true ++ Location where Test Source XRef is generated for this project. ++Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test ++ ++ ++ ++ ${aggregate} ++ ${alwaysGenerateFailsafeReport} ++ ++ ${linkXRef} ++ ++ ++ ${output.format} ++ ${outputName} ++ ++ ${showSuccess} ++ ++ ${skipFailsafeReport} ++ ++ ++ ++ help ++ Display help information on maven-surefire-report-plugin. ++Call mvn surefire-report:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ false ++ false ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.maven_surefire_report_plugin.HelpMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ detail ++ boolean ++ false ++ true ++ If true, display all settable properties for each goal. ++ ++ ++ goal ++ java.lang.String ++ false ++ true ++ The name of the goal for which to show help. If unspecified, all goals will be displayed. ++ ++ ++ indentSize ++ int ++ false ++ true ++ The number of spaces per indentation level, should be positive. ++ ++ ++ lineLength ++ int ++ false ++ true ++ The maximum length of a display line, should be positive. ++ ++ ++ ++ ${detail} ++ ${goal} ++ ${indentSize} ++ ${lineLength} ++ ++ ++ ++ report ++ Creates a nicely formatted Surefire Test Report in html format. ++ false ++ true ++ false ++ false ++ false ++ false ++ test ++ surefire ++ org.apache.maven.plugins.surefire.report.SurefireReport ++ java ++ per-lookup ++ once-per-session ++ false ++ ++ ++ aggregate ++ boolean ++ false ++ true ++ Whether to build an aggregated report at the root, or build individual reports. ++ ++ ++ alwaysGenerateSurefireReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the surefire report will be generated even when there are no surefire result files. Defaults to true to preserve legacy behaviour pre 2.10. ++ ++ ++ customBundle ++ java.lang.String ++ 3.1.0 ++ false ++ true ++ Path for a custom bundle instead of using the default one. ++Using this field, you could change the texts in the generated reports. ++ ++ ++ linkXRef ++ boolean ++ false ++ true ++ Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used. ++ ++ ++ locale ++ java.lang.String ++ false ++ true ++ ++ ++ ++ outputDirectory ++ java.io.File ++ true ++ true ++ ++ ++ ++ outputFormat ++ java.lang.String ++ false ++ true ++ ++ ++ ++ outputName ++ java.lang.String ++ true ++ true ++ The filename to use for the report. ++ ++ ++ outputTimestamp ++ java.lang.String ++ false ++ true ++ ++ ++ ++ reportsDirectories ++ java.io.File[] ++ false ++ true ++ Directories containing the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ reportsDirectory ++ java.io.File ++ No reason given ++ false ++ true ++ (Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ showSuccess ++ boolean ++ true ++ true ++ If set to false, only failures are shown. ++ ++ ++ siteDirectory ++ java.io.File ++ false ++ true ++ ++ ++ ++ skipSurefireReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the surefire report generation will be skipped. ++ ++ ++ xrefTestLocation ++ java.io.File ++ false ++ true ++ Location where Test Source XRef is generated for this project. ++Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test ++ ++ ++ ++ ${aggregate} ++ ${alwaysGenerateSurefireReport} ++ ++ ${linkXRef} ++ ++ ++ ${output.format} ++ ${outputName} ++ ++ ${showSuccess} ++ ++ ${skipSurefireReport} ++ ++ ++ ++ report-only ++ Creates a nicely formatted Surefire Test Report in html format. This goal does not run the tests, it only builds the reports. This is a workaround for https://issues.apache.org/jira/browse/SUREFIRE-257 <https://issues.apache.org/jira/browse/SUREFIRE-257> ++ false ++ true ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.surefire.report.SurefireOnlyReport ++ java ++ per-lookup ++ once-per-session ++ 2.3 ++ false ++ ++ ++ aggregate ++ boolean ++ false ++ true ++ Whether to build an aggregated report at the root, or build individual reports. ++ ++ ++ alwaysGenerateSurefireReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the surefire report will be generated even when there are no surefire result files. Defaults to true to preserve legacy behaviour pre 2.10. ++ ++ ++ customBundle ++ java.lang.String ++ 3.1.0 ++ false ++ true ++ Path for a custom bundle instead of using the default one. ++Using this field, you could change the texts in the generated reports. ++ ++ ++ linkXRef ++ boolean ++ false ++ true ++ Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used. ++ ++ ++ locale ++ java.lang.String ++ false ++ true ++ ++ ++ ++ outputDirectory ++ java.io.File ++ true ++ true ++ ++ ++ ++ outputFormat ++ java.lang.String ++ false ++ true ++ ++ ++ ++ outputName ++ java.lang.String ++ true ++ true ++ The filename to use for the report. ++ ++ ++ outputTimestamp ++ java.lang.String ++ false ++ true ++ ++ ++ ++ reportsDirectories ++ java.io.File[] ++ false ++ true ++ Directories containing the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ reportsDirectory ++ java.io.File ++ No reason given ++ false ++ true ++ (Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ showSuccess ++ boolean ++ true ++ true ++ If set to false, only failures are shown. ++ ++ ++ siteDirectory ++ java.io.File ++ false ++ true ++ ++ ++ ++ skipSurefireReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the surefire report generation will be skipped. ++ ++ ++ xrefTestLocation ++ java.io.File ++ false ++ true ++ Location where Test Source XRef is generated for this project. ++Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test ++ ++ ++ ++ ${aggregate} ++ ${alwaysGenerateSurefireReport} ++ ++ ${linkXRef} ++ ++ ++ ${output.format} ++ ${outputName} ++ ++ ${showSuccess} ++ ++ ${skipSurefireReport} ++ ++ ++ ++ +diff --git a/maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml b/maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml +new file mode 100644 +index 000000000..744c56d5b +--- /dev/null ++++ b/maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml +@@ -0,0 +1,958 @@ ++ ++ ++ ++ ++ ++ ${project.name} ++ ${project.description} ++ ${project.groupId} ++ ${project.artifactId} ++ ${project.version} ++ surefire-report ++ false ++ true ++ 1.8 ++ 3.6.3 ++ ++ ++ failsafe-report-only ++ Creates a nicely formatted Failsafe Test Report in html format. This goal does not run the tests, it only builds the reports. See https://issues.apache.org/jira/browse/SUREFIRE-257 <https://issues.apache.org/jira/browse/SUREFIRE-257> ++ false ++ true ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.surefire.report.FailsafeOnlyReport ++ java ++ per-lookup ++ once-per-session ++ 2.10 ++ false ++ ++ ++ aggregate ++ boolean ++ false ++ true ++ Whether to build an aggregated report at the root, or build individual reports. ++ ++ ++ alwaysGenerateFailsafeReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the failsafe report will be generated even when there are no failsafe result files. Defaults to false to preserve legacy behaviour pre 2.10. ++ ++ ++ customBundle ++ java.lang.String ++ 3.1.0 ++ false ++ true ++ Path for a custom bundle instead of using the default one. ++Using this field, you could change the texts in the generated reports. ++ ++ ++ inputEncoding ++ java.lang.String ++ false ++ false ++ ++ ++ ++ linkXRef ++ boolean ++ false ++ true ++ Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used. ++ ++ ++ locale ++ java.lang.String ++ false ++ true ++ ++ ++ ++ mojoExecution ++ org.apache.maven.plugin.MojoExecution ++ true ++ false ++ ++ ++ ++ outputDirectory ++ java.io.File ++ true ++ true ++ ++ ++ ++ outputEncoding ++ java.lang.String ++ false ++ false ++ ++ ++ ++ outputFormat ++ java.lang.String ++ false ++ true ++ ++ ++ ++ outputName ++ java.lang.String ++ true ++ true ++ The filename to use for the report. ++ ++ ++ outputTimestamp ++ java.lang.String ++ false ++ true ++ ++ ++ ++ project ++ org.apache.maven.project.MavenProject ++ true ++ false ++ ++ ++ ++ reactorProjects ++ java.util.List ++ true ++ false ++ ++ ++ ++ remoteProjectRepositories ++ java.util.List ++ true ++ false ++ ++ ++ ++ repoSession ++ org.eclipse.aether.RepositorySystemSession ++ true ++ false ++ ++ ++ ++ reportsDirectories ++ java.io.File[] ++ false ++ true ++ Directories containing the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ reportsDirectory ++ java.io.File ++ No reason given ++ false ++ true ++ (Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ settings ++ org.apache.maven.settings.Settings ++ true ++ false ++ The current user system settings for use in Maven. ++ ++ ++ showSuccess ++ boolean ++ true ++ true ++ If set to false, only failures are shown. ++ ++ ++ siteDirectory ++ java.io.File ++ false ++ true ++ ++ ++ ++ skipFailsafeReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the failsafe report generation will be skipped. ++ ++ ++ xrefTestLocation ++ java.io.File ++ false ++ true ++ Location where Test Source XRef is generated for this project. ++Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test ++ ++ ++ ++ ${aggregate} ++ ${alwaysGenerateFailsafeReport} ++ ++ ${encoding} ++ ${linkXRef} ++ ++ ++ ++ ${outputEncoding} ++ ${output.format} ++ ${outputName} ++ ++ ++ ++ ++ ++ ++ ${showSuccess} ++ ++ ${skipFailsafeReport} ++ ++ ++ ++ org.codehaus.plexus.PlexusContainer ++ container ++ ++ ++ org.codehaus.plexus.i18n.I18N ++ i18n ++ ++ ++ org.apache.maven.doxia.siterenderer.Renderer ++ siteRenderer ++ ++ ++ org.apache.maven.doxia.tools.SiteTool ++ siteTool ++ ++ ++ ++ ++ help ++ Display help information on maven-surefire-report-plugin. ++Call mvn surefire-report:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ false ++ false ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.maven_surefire_report_plugin.HelpMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ detail ++ boolean ++ false ++ true ++ If true, display all settable properties for each goal. ++ ++ ++ goal ++ java.lang.String ++ false ++ true ++ The name of the goal for which to show help. If unspecified, all goals will be displayed. ++ ++ ++ indentSize ++ int ++ false ++ true ++ The number of spaces per indentation level, should be positive. ++ ++ ++ lineLength ++ int ++ false ++ true ++ The maximum length of a display line, should be positive. ++ ++ ++ ++ ${detail} ++ ${goal} ++ ${indentSize} ++ ${lineLength} ++ ++ ++ ++ report ++ Creates a nicely formatted Surefire Test Report in html format. ++ false ++ true ++ false ++ false ++ false ++ false ++ test ++ surefire ++ org.apache.maven.plugins.surefire.report.SurefireReport ++ java ++ per-lookup ++ once-per-session ++ false ++ ++ ++ aggregate ++ boolean ++ false ++ true ++ Whether to build an aggregated report at the root, or build individual reports. ++ ++ ++ alwaysGenerateSurefireReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the surefire report will be generated even when there are no surefire result files. Defaults to true to preserve legacy behaviour pre 2.10. ++ ++ ++ customBundle ++ java.lang.String ++ 3.1.0 ++ false ++ true ++ Path for a custom bundle instead of using the default one. ++Using this field, you could change the texts in the generated reports. ++ ++ ++ inputEncoding ++ java.lang.String ++ false ++ false ++ ++ ++ ++ linkXRef ++ boolean ++ false ++ true ++ Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used. ++ ++ ++ locale ++ java.lang.String ++ false ++ true ++ ++ ++ ++ mojoExecution ++ org.apache.maven.plugin.MojoExecution ++ true ++ false ++ ++ ++ ++ outputDirectory ++ java.io.File ++ true ++ true ++ ++ ++ ++ outputEncoding ++ java.lang.String ++ false ++ false ++ ++ ++ ++ outputFormat ++ java.lang.String ++ false ++ true ++ ++ ++ ++ outputName ++ java.lang.String ++ true ++ true ++ The filename to use for the report. ++ ++ ++ outputTimestamp ++ java.lang.String ++ false ++ true ++ ++ ++ ++ project ++ org.apache.maven.project.MavenProject ++ true ++ false ++ ++ ++ ++ reactorProjects ++ java.util.List ++ true ++ false ++ ++ ++ ++ remoteProjectRepositories ++ java.util.List ++ true ++ false ++ ++ ++ ++ repoSession ++ org.eclipse.aether.RepositorySystemSession ++ true ++ false ++ ++ ++ ++ reportsDirectories ++ java.io.File[] ++ false ++ true ++ Directories containing the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ reportsDirectory ++ java.io.File ++ No reason given ++ false ++ true ++ (Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ settings ++ org.apache.maven.settings.Settings ++ true ++ false ++ The current user system settings for use in Maven. ++ ++ ++ showSuccess ++ boolean ++ true ++ true ++ If set to false, only failures are shown. ++ ++ ++ siteDirectory ++ java.io.File ++ false ++ true ++ ++ ++ ++ skipSurefireReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the surefire report generation will be skipped. ++ ++ ++ xrefTestLocation ++ java.io.File ++ false ++ true ++ Location where Test Source XRef is generated for this project. ++Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test ++ ++ ++ ++ ${aggregate} ++ ${alwaysGenerateSurefireReport} ++ ++ ${encoding} ++ ${linkXRef} ++ ++ ++ ++ ${outputEncoding} ++ ${output.format} ++ ${outputName} ++ ++ ++ ++ ++ ++ ++ ${showSuccess} ++ ++ ${skipSurefireReport} ++ ++ ++ ++ org.codehaus.plexus.PlexusContainer ++ container ++ ++ ++ org.codehaus.plexus.i18n.I18N ++ i18n ++ ++ ++ org.apache.maven.doxia.siterenderer.Renderer ++ siteRenderer ++ ++ ++ org.apache.maven.doxia.tools.SiteTool ++ siteTool ++ ++ ++ ++ ++ report-only ++ Creates a nicely formatted Surefire Test Report in html format. This goal does not run the tests, it only builds the reports. This is a workaround for https://issues.apache.org/jira/browse/SUREFIRE-257 <https://issues.apache.org/jira/browse/SUREFIRE-257> ++ false ++ true ++ false ++ false ++ false ++ true ++ org.apache.maven.plugins.surefire.report.SurefireOnlyReport ++ java ++ per-lookup ++ once-per-session ++ 2.3 ++ false ++ ++ ++ aggregate ++ boolean ++ false ++ true ++ Whether to build an aggregated report at the root, or build individual reports. ++ ++ ++ alwaysGenerateSurefireReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the surefire report will be generated even when there are no surefire result files. Defaults to true to preserve legacy behaviour pre 2.10. ++ ++ ++ customBundle ++ java.lang.String ++ 3.1.0 ++ false ++ true ++ Path for a custom bundle instead of using the default one. ++Using this field, you could change the texts in the generated reports. ++ ++ ++ inputEncoding ++ java.lang.String ++ false ++ false ++ ++ ++ ++ linkXRef ++ boolean ++ false ++ true ++ Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used. ++ ++ ++ locale ++ java.lang.String ++ false ++ true ++ ++ ++ ++ mojoExecution ++ org.apache.maven.plugin.MojoExecution ++ true ++ false ++ ++ ++ ++ outputDirectory ++ java.io.File ++ true ++ true ++ ++ ++ ++ outputEncoding ++ java.lang.String ++ false ++ false ++ ++ ++ ++ outputFormat ++ java.lang.String ++ false ++ true ++ ++ ++ ++ outputName ++ java.lang.String ++ true ++ true ++ The filename to use for the report. ++ ++ ++ outputTimestamp ++ java.lang.String ++ false ++ true ++ ++ ++ ++ project ++ org.apache.maven.project.MavenProject ++ true ++ false ++ ++ ++ ++ reactorProjects ++ java.util.List ++ true ++ false ++ ++ ++ ++ remoteProjectRepositories ++ java.util.List ++ true ++ false ++ ++ ++ ++ repoSession ++ org.eclipse.aether.RepositorySystemSession ++ true ++ false ++ ++ ++ ++ reportsDirectories ++ java.io.File[] ++ false ++ true ++ Directories containing the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ reportsDirectory ++ java.io.File ++ No reason given ++ false ++ true ++ (Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format. ++ ++ ++ settings ++ org.apache.maven.settings.Settings ++ true ++ false ++ The current user system settings for use in Maven. ++ ++ ++ showSuccess ++ boolean ++ true ++ true ++ If set to false, only failures are shown. ++ ++ ++ siteDirectory ++ java.io.File ++ false ++ true ++ ++ ++ ++ skipSurefireReport ++ boolean ++ 2.11 ++ false ++ true ++ If set to true the surefire report generation will be skipped. ++ ++ ++ xrefTestLocation ++ java.io.File ++ false ++ true ++ Location where Test Source XRef is generated for this project. ++Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test ++ ++ ++ ++ ${aggregate} ++ ${alwaysGenerateSurefireReport} ++ ++ ${encoding} ++ ${linkXRef} ++ ++ ++ ++ ${outputEncoding} ++ ${output.format} ++ ${outputName} ++ ++ ++ ++ ++ ++ ++ ${showSuccess} ++ ++ ${skipSurefireReport} ++ ++ ++ ++ org.codehaus.plexus.PlexusContainer ++ container ++ ++ ++ org.codehaus.plexus.i18n.I18N ++ i18n ++ ++ ++ org.apache.maven.doxia.siterenderer.Renderer ++ siteRenderer ++ ++ ++ org.apache.maven.doxia.tools.SiteTool ++ siteTool ++ ++ ++ ++ ++ ++ ++ org.apache.maven.surefire ++ surefire-logger-api ++ jar ++ 3.5.0 ++ ++ ++ org.apache.maven.surefire ++ surefire-report-parser ++ jar ++ 3.5.0 ++ ++ ++ org.eclipse.sisu ++ org.eclipse.sisu.plexus ++ jar ++ 0.9.0.M2 ++ ++ ++ org.slf4j ++ slf4j-api ++ jar ++ 1.7.36 ++ ++ ++ org.codehaus.plexus ++ plexus-classworlds ++ jar ++ 2.8.0 ++ ++ ++ org.codehaus.plexus ++ plexus-component-annotations ++ jar ++ 2.1.0 ++ ++ ++ org.eclipse.sisu ++ org.eclipse.sisu.inject ++ jar ++ 0.9.0.M2 ++ ++ ++ org.codehaus.plexus ++ plexus-utils ++ jar ++ 4.0.0 ++ ++ ++ javax.inject ++ javax.inject ++ jar ++ 1 ++ ++ ++ org.apache.maven.shared ++ maven-shared-utils ++ jar ++ 3.3.4 ++ ++ ++ commons-io ++ commons-io ++ jar ++ 2.16.1 ++ ++ ++ org.apache.maven.doxia ++ doxia-sink-api ++ jar ++ 2.0.0-M12 ++ ++ ++ org.apache.maven.doxia ++ doxia-core ++ jar ++ 2.0.0-M12 ++ ++ ++ org.apache.commons ++ commons-lang3 ++ jar ++ 3.16.0 ++ ++ ++ org.apache.commons ++ commons-text ++ jar ++ 1.12.0 ++ ++ ++ org.apache.maven.reporting ++ maven-reporting-impl ++ jar ++ 4.0.0-M15 ++ ++ ++ org.apache.maven.doxia ++ doxia-site-renderer ++ jar ++ 2.0.0-M19 ++ ++ ++ org.apache.velocity ++ velocity-engine-core ++ jar ++ 2.3 ++ ++ ++ org.apache.maven.doxia ++ doxia-skin-model ++ jar ++ 2.0.0-M19 ++ ++ ++ org.codehaus.plexus ++ plexus-velocity ++ jar ++ 2.1.0 ++ ++ ++ org.apache.maven.doxia ++ doxia-module-xhtml5 ++ jar ++ 2.0.0-M12 ++ ++ ++ org.apache.maven.doxia ++ doxia-module-xdoc ++ jar ++ 2.0.0-M12 ++ ++ ++ org.apache.maven.doxia ++ doxia-integration-tools ++ jar ++ 2.0.0-M19 ++ ++ ++ org.apache.maven.reporting ++ maven-reporting-api ++ jar ++ 4.0.0-M12 ++ ++ ++ org.apache.maven ++ maven-archiver ++ jar ++ 3.6.2 ++ ++ ++ org.codehaus.plexus ++ plexus-archiver ++ jar ++ 4.8.0 ++ ++ ++ org.codehaus.plexus ++ plexus-io ++ jar ++ 3.5.0 ++ ++ ++ org.tukaani ++ xz ++ jar ++ 1.9 ++ ++ ++ org.apache.commons ++ commons-compress ++ jar ++ 1.27.1 ++ ++ ++ commons-codec ++ commons-codec ++ jar ++ 1.16.1 ++ ++ ++ org.apache.maven.doxia ++ doxia-site-model ++ jar ++ 2.0.0-M19 ++ ++ ++ org.apache.maven.doxia ++ doxia-module-apt ++ jar ++ 2.0.0-M12 ++ ++ ++ org.codehaus.plexus ++ plexus-xml ++ jar ++ 4.0.0 ++ ++ ++ org.codehaus.plexus ++ plexus-i18n ++ jar ++ 1.0-beta-10 ++ ++ ++ org.codehaus.plexus ++ plexus-interpolation ++ jar ++ 1.27 ++ ++ ++ +diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_report_plugin/HelpMojo.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_report_plugin/HelpMojo.java +new file mode 100644 +index 000000000..b0fcb4b3a +--- /dev/null ++++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_report_plugin/HelpMojo.java +@@ -0,0 +1,448 @@ ++package org.apache.maven.plugins.maven_surefire_report_plugin; ++ ++import org.apache.maven.plugin.AbstractMojo; ++import org.apache.maven.plugin.MojoExecutionException; ++import org.apache.maven.plugins.annotations.Mojo; ++import org.apache.maven.plugins.annotations.Parameter; ++ ++import org.w3c.dom.Document; ++import org.w3c.dom.Element; ++import org.w3c.dom.Node; ++import org.w3c.dom.NodeList; ++import org.xml.sax.SAXException; ++ ++import javax.xml.parsers.DocumentBuilder; ++import javax.xml.parsers.DocumentBuilderFactory; ++import javax.xml.parsers.ParserConfigurationException; ++import java.io.IOException; ++import java.io.InputStream; ++import java.util.ArrayList; ++import java.util.List; ++ ++/** ++ * Display help information on maven-surefire-report-plugin.
++ * Call mvn surefire-report:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ * @author maven-plugin-tools ++ */ ++@Mojo( name = "help", requiresProject = false, threadSafe = true ) ++public class HelpMojo ++ extends AbstractMojo ++{ ++ /** ++ * If true, display all settable properties for each goal. ++ * ++ */ ++ @Parameter( property = "detail", defaultValue = "false" ) ++ private boolean detail; ++ ++ /** ++ * The name of the goal for which to show help. If unspecified, all goals will be displayed. ++ * ++ */ ++ @Parameter( property = "goal" ) ++ private java.lang.String goal; ++ ++ /** ++ * The maximum length of a display line, should be positive. ++ * ++ */ ++ @Parameter( property = "lineLength", defaultValue = "80" ) ++ private int lineLength; ++ ++ /** ++ * The number of spaces per indentation level, should be positive. ++ * ++ */ ++ @Parameter( property = "indentSize", defaultValue = "2" ) ++ private int indentSize; ++ ++ // /META-INF/maven///plugin-help.xml ++ private static final String PLUGIN_HELP_PATH = ++ "/META-INF/maven/org.apache.maven.plugins/maven-surefire-report-plugin/plugin-help.xml"; ++ ++ private static final int DEFAULT_LINE_LENGTH = 80; ++ ++ private Document build() ++ throws MojoExecutionException ++ { ++ getLog().debug( "load plugin-help.xml: " + PLUGIN_HELP_PATH ); ++ try ( InputStream is = getClass().getResourceAsStream( PLUGIN_HELP_PATH ) ) ++ { ++ if ( is == null ) ++ { ++ throw new MojoExecutionException( "Could not find plugin descriptor at " + PLUGIN_HELP_PATH ); ++ } ++ DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); ++ DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); ++ return dBuilder.parse( is ); ++ } ++ catch ( IOException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ catch ( ParserConfigurationException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ catch ( SAXException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ } ++ ++ /** ++ * {@inheritDoc} ++ */ ++ @Override ++ public void execute() ++ throws MojoExecutionException ++ { ++ if ( lineLength <= 0 ) ++ { ++ getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." ); ++ lineLength = DEFAULT_LINE_LENGTH; ++ } ++ if ( indentSize <= 0 ) ++ { ++ getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." ); ++ indentSize = 2; ++ } ++ ++ Document doc = build(); ++ ++ StringBuilder sb = new StringBuilder(); ++ Node plugin = getSingleChild( doc, "plugin" ); ++ ++ ++ String name = getValue( plugin, "name" ); ++ String version = getValue( plugin, "version" ); ++ String id = getValue( plugin, "groupId" ) + ":" + getValue( plugin, "artifactId" ) + ":" + version; ++ if ( isNotEmpty( name ) && !name.contains( id ) ) ++ { ++ append( sb, name + " " + version, 0 ); ++ } ++ else ++ { ++ if ( isNotEmpty( name ) ) ++ { ++ append( sb, name, 0 ); ++ } ++ else ++ { ++ append( sb, id, 0 ); ++ } ++ } ++ append( sb, getValue( plugin, "description" ), 1 ); ++ append( sb, "", 0 ); ++ ++ //plugin ++ String goalPrefix = getValue( plugin, "goalPrefix" ); ++ ++ Node mojos1 = getSingleChild( plugin, "mojos" ); ++ ++ List mojos = findNamedChild( mojos1, "mojo" ); ++ ++ if ( goal == null || goal.length() <= 0 ) ++ { ++ append( sb, "This plugin has " + mojos.size() + ( mojos.size() > 1 ? " goals:" : " goal:" ), 0 ); ++ append( sb, "", 0 ); ++ } ++ ++ for ( Node mojo : mojos ) ++ { ++ writeGoal( sb, goalPrefix, (Element) mojo ); ++ } ++ ++ if ( getLog().isInfoEnabled() ) ++ { ++ getLog().info( sb.toString() ); ++ } ++ } ++ ++ ++ private static boolean isNotEmpty( String string ) ++ { ++ return string != null && string.length() > 0; ++ } ++ ++ private static String getValue( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ return getSingleChild( node, elementName ).getTextContent(); ++ } ++ ++ private static Node getSingleChild( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ List namedChild = findNamedChild( node, elementName ); ++ if ( namedChild.isEmpty() ) ++ { ++ throw new MojoExecutionException( "Could not find " + elementName + " in plugin-help.xml" ); ++ } ++ if ( namedChild.size() > 1 ) ++ { ++ throw new MojoExecutionException( "Multiple " + elementName + " in plugin-help.xml" ); ++ } ++ return namedChild.get( 0 ); ++ } ++ ++ private static List findNamedChild( Node node, String elementName ) ++ { ++ List result = new ArrayList(); ++ NodeList childNodes = node.getChildNodes(); ++ for ( int i = 0; i < childNodes.getLength(); i++ ) ++ { ++ Node item = childNodes.item( i ); ++ if ( elementName.equals( item.getNodeName() ) ) ++ { ++ result.add( item ); ++ } ++ } ++ return result; ++ } ++ ++ private static Node findSingleChild( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ List elementsByTagName = findNamedChild( node, elementName ); ++ if ( elementsByTagName.isEmpty() ) ++ { ++ return null; ++ } ++ if ( elementsByTagName.size() > 1 ) ++ { ++ throw new MojoExecutionException( "Multiple " + elementName + "in plugin-help.xml" ); ++ } ++ return elementsByTagName.get( 0 ); ++ } ++ ++ private void writeGoal( StringBuilder sb, String goalPrefix, Element mojo ) ++ throws MojoExecutionException ++ { ++ String mojoGoal = getValue( mojo, "goal" ); ++ Node configurationElement = findSingleChild( mojo, "configuration" ); ++ Node description = findSingleChild( mojo, "description" ); ++ if ( goal == null || goal.length() <= 0 || mojoGoal.equals( goal ) ) ++ { ++ append( sb, goalPrefix + ":" + mojoGoal, 0 ); ++ Node deprecated = findSingleChild( mojo, "deprecated" ); ++ if ( ( deprecated != null ) && isNotEmpty( deprecated.getTextContent() ) ) ++ { ++ append( sb, "Deprecated. " + deprecated.getTextContent(), 1 ); ++ if ( detail && description != null ) ++ { ++ append( sb, "", 0 ); ++ append( sb, description.getTextContent(), 1 ); ++ } ++ } ++ else if ( description != null ) ++ { ++ append( sb, description.getTextContent(), 1 ); ++ } ++ append( sb, "", 0 ); ++ ++ if ( detail ) ++ { ++ Node parametersNode = getSingleChild( mojo, "parameters" ); ++ List parameters = findNamedChild( parametersNode, "parameter" ); ++ append( sb, "Available parameters:", 1 ); ++ append( sb, "", 0 ); ++ ++ for ( Node parameter : parameters ) ++ { ++ writeParameter( sb, parameter, configurationElement ); ++ } ++ } ++ } ++ } ++ ++ private void writeParameter( StringBuilder sb, Node parameter, Node configurationElement ) ++ throws MojoExecutionException ++ { ++ String parameterName = getValue( parameter, "name" ); ++ String parameterDescription = getValue( parameter, "description" ); ++ ++ Element fieldConfigurationElement = null; ++ if ( configurationElement != null ) ++ { ++ fieldConfigurationElement = (Element) findSingleChild( configurationElement, parameterName ); ++ } ++ ++ String parameterDefaultValue = ""; ++ if ( fieldConfigurationElement != null && fieldConfigurationElement.hasAttribute( "default-value" ) ) ++ { ++ parameterDefaultValue = " (Default: " + fieldConfigurationElement.getAttribute( "default-value" ) + ")"; ++ } ++ append( sb, parameterName + parameterDefaultValue, 2 ); ++ Node deprecated = findSingleChild( parameter, "deprecated" ); ++ if ( ( deprecated != null ) && isNotEmpty( deprecated.getTextContent() ) ) ++ { ++ append( sb, "Deprecated. " + deprecated.getTextContent(), 3 ); ++ append( sb, "", 0 ); ++ } ++ if ( isNotEmpty( parameterDescription ) ) { ++ append( sb, parameterDescription, 3 ); ++ } ++ if ( "true".equals( getValue( parameter, "required" ) ) ) ++ { ++ append( sb, "Required: Yes", 3 ); ++ } ++ if ( ( fieldConfigurationElement != null ) && isNotEmpty( fieldConfigurationElement.getTextContent() ) ) ++ { ++ String property = getPropertyFromExpression( fieldConfigurationElement.getTextContent() ); ++ append( sb, "User property: " + property, 3 ); ++ } ++ ++ append( sb, "", 0 ); ++ } ++ ++ /** ++ *

Repeat a String n times to form a new string.

++ * ++ * @param str String to repeat ++ * @param repeat number of times to repeat str ++ * @return String with repeated String ++ * @throws NegativeArraySizeException if repeat < 0 ++ * @throws NullPointerException if str is null ++ */ ++ private static String repeat( String str, int repeat ) ++ { ++ StringBuilder buffer = new StringBuilder( repeat * str.length() ); ++ ++ for ( int i = 0; i < repeat; i++ ) ++ { ++ buffer.append( str ); ++ } ++ ++ return buffer.toString(); ++ } ++ ++ /** ++ * Append a description to the buffer by respecting the indentSize and lineLength parameters. ++ * Note: The last character is always a new line. ++ * ++ * @param sb The buffer to append the description, not null. ++ * @param description The description, not null. ++ * @param indent The base indentation level of each line, must not be negative. ++ */ ++ private void append( StringBuilder sb, String description, int indent ) ++ { ++ for ( String line : toLines( description, indent, indentSize, lineLength ) ) ++ { ++ sb.append( line ).append( '\n' ); ++ } ++ } ++ ++ /** ++ * Splits the specified text into lines of convenient display length. ++ * ++ * @param text The text to split into lines, must not be null. ++ * @param indent The base indentation level of each line, must not be negative. ++ * @param indentSize The size of each indentation, must not be negative. ++ * @param lineLength The length of the line, must not be negative. ++ * @return The sequence of display lines, never null. ++ * @throws NegativeArraySizeException if indent < 0 ++ */ ++ private static List toLines( String text, int indent, int indentSize, int lineLength ) ++ { ++ List lines = new ArrayList(); ++ ++ String ind = repeat( "\t", indent ); ++ ++ String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" ); ++ ++ for ( String plainLine : plainLines ) ++ { ++ toLines( lines, ind + plainLine, indentSize, lineLength ); ++ } ++ ++ return lines; ++ } ++ ++ /** ++ * Adds the specified line to the output sequence, performing line wrapping if necessary. ++ * ++ * @param lines The sequence of display lines, must not be null. ++ * @param line The line to add, must not be null. ++ * @param indentSize The size of each indentation, must not be negative. ++ * @param lineLength The length of the line, must not be negative. ++ */ ++ private static void toLines( List lines, String line, int indentSize, int lineLength ) ++ { ++ int lineIndent = getIndentLevel( line ); ++ StringBuilder buf = new StringBuilder( 256 ); ++ ++ String[] tokens = line.split( " +" ); ++ ++ for ( String token : tokens ) ++ { ++ if ( buf.length() > 0 ) ++ { ++ if ( buf.length() + token.length() >= lineLength ) ++ { ++ lines.add( buf.toString() ); ++ buf.setLength( 0 ); ++ buf.append( repeat( " ", lineIndent * indentSize ) ); ++ } ++ else ++ { ++ buf.append( ' ' ); ++ } ++ } ++ ++ for ( int j = 0; j < token.length(); j++ ) ++ { ++ char c = token.charAt( j ); ++ if ( c == '\t' ) ++ { ++ buf.append( repeat( " ", indentSize - buf.length() % indentSize ) ); ++ } ++ else if ( c == '\u00A0' ) ++ { ++ buf.append( ' ' ); ++ } ++ else ++ { ++ buf.append( c ); ++ } ++ } ++ } ++ lines.add( buf.toString() ); ++ } ++ ++ /** ++ * Gets the indentation level of the specified line. ++ * ++ * @param line The line whose indentation level should be retrieved, must not be null. ++ * @return The indentation level of the line. ++ */ ++ private static int getIndentLevel( String line ) ++ { ++ int level = 0; ++ for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ ) ++ { ++ level++; ++ } ++ for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ ) ++ { ++ if ( line.charAt( i ) == '\t' ) ++ { ++ level++; ++ break; ++ } ++ } ++ return level; ++ } ++ ++ private static String getPropertyFromExpression( String expression ) ++ { ++ if ( expression != null && expression.startsWith( "${" ) && expression.endsWith( "}" ) ++ && !expression.substring( 2 ).contains( "${" ) ) ++ { ++ // expression="${xxx}" -> property="xxx" ++ return expression.substring( 2, expression.length() - 1 ); ++ } ++ // no property can be extracted ++ return null; ++ } ++} +-- +2.46.1 + diff --git a/maven-surefire-build.tar.xz b/maven-surefire-build.tar.xz new file mode 100644 index 0000000..b5faeea --- /dev/null +++ b/maven-surefire-build.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57b84e1770489a7dfc6ca82e97abeded4b44522bfdc9143044549f248553bad4 +size 4624 diff --git a/maven-surefire-plugins.changes b/maven-surefire-plugins.changes new file mode 100644 index 0000000..9bd45fb --- /dev/null +++ b/maven-surefire-plugins.changes @@ -0,0 +1,266 @@ +------------------------------------------------------------------- +Thu Oct 3 14:33:33 UTC 2024 - Fridrich Strba + +- Upgrade to 3.5.1 + * Bug + + SUREFIRE-1737: Disabling the JUnit5Xml30StatelessReporter has + no effect + + SUREFIRE-2257: [REGRESSION] NPEx: Cannot invoke + "Object.toString()" because "value" is null + + SUREFIRE-2267: Packages for commons-codec should be relocated + in surefire-shared-utils + + SUREFIRE-2268: Tests run under classpath if JDK 23 is used + * Improvement + + SUREFIRE-2264: Limit usage of commons-io from + surefire-shared-utils + + SUREFIRE-2266: Execute ITs in parallel + + SUREFIRE-2270: Use JUnit5 in surefire-shadefire +- Upgrade to 3.5.0 + * Improvement + + SUREFIRE-2227: Dynamically calculate xrefTestLocation + * Task + + SUREFIRE-2161: Align Mojo class names and output names +- Upgrade to 3.4.0 + * Bug + + SUREFIRE-2251: [REGRESSION] java.lang.NoSuchMethodException: + org.apache.maven.plugin.surefire.StartupReportConfiguration + . + + SUREFIRE-2253: [REGRESSION] Bump + org.apache.commons:commons-compress from 1.26.0 to 1.26.1 + causes hang + * Improvement + + SUREFIRE-1385: System properties defined in the Surefire and + Failsafe plugin configuration should override user properties +- Upgrade to 3.3.1 + * Bug + + SUREFIRE-2105: Failsafe report size increased with version + upgrade from 2.17 to 2.22.2 + + SUREFIRE-2242: Plain test report does not include names of the + skipped tests + + SUREFIRE-2250: Surefire Test Report Schema properties element + is not consistent with the code + * Improvement + + SUREFIRE-1360: Ability to disable properties for successfully + passed tests + + SUREFIRE-1934: Ability to disable system-out/system-err for + successfully passed tests + + SUREFIRE-2124: Avoid creating unnecessary target files for pom + projects + + SUREFIRE-2249: Doc for 'properties' parameter does not mention + JUnit +- Upgrade to 3.3.0 + * Bug + + SUREFIRE-1939: Build fails if java.home has <=2 path + components + + SUREFIRE-2232: [REGRESSION] StatelessXmlReporter fails to + process failed result without a throwable + + SUREFIRE-2240: Using JUnit BOM prevents upgrading the engine + version via plugin dependency + * Improvement + + SUREFIRE-2248: Make "type" attribute on failures and errors in + (surefire|failsafe)-test-report schema optional + * Test + + SUREFIRE-2141: Surefire 3.0.0-M8 tests don't pass on Mac M1 + (Surefire1295AttributeJvmCrashesToTestsIT) + * Task + + SUREFIRE-2244: Make IT for SUREFIRE-1295 reliable + + SUREFIRE-2246: Clean up dependencies reported by + dependencies:analyze +- Modified patches: + * maven-surefire-bootstrap-resources.patch + + regenerate from non-bootstrap build + * 0001-Port-to-TestNG-7.4.0.patch + + rediff and augment to make the test pass in upstream evironment +- Added patch: + * 0002-Unshade-surefire.patch + + remove the use of the shaded surefire-shared-utils artifact + in favour of direct use of the dependencies + +------------------------------------------------------------------- +Wed Apr 10 10:54:02 UTC 2024 - Fridrich Strba + +- Upgrade to 3.2.5 + * Bug + + SUREFIRE-2223: Surefire evaluates parameter jvm before skip + + SUREFIRE-2224: StatelessXmlReporter#getTestProblems() does + not properly reflect report schema structure + + SUREFIRE-2225: Surefire ITs fail when project directory + contains space + + SUREFIRE-2229: + REGRESSION] SUREFIRE-2224 causes stack trace + to be omitted for errors and failures + + SUREFIRE-2231: JaCoCo 0.8.11 fails with old TestNG releases on + Java 17+ + * Improvement + + SUREFIRE-1345: Support flakyFailure and flakyError in + TestSuiteXmlParser + + SUREFIRE-2221: Document minimum supported Java version for + Toolchains +- Upgrade to 3.2.3 + * Bug + + SUREFIRE-2210: Additional class path ordering broken since + 3.2.0 + + SUREFIRE-2211: additionalClasspathElement with UNC path not + working with Maven Failsafe Plugin + + SUREFIRE-2212: OutOfMemoryError raised when parsing files with + huge stderr/stdout output in surefire-report-parser + + SUREFIRE-2220: + SurefireForkChannel#getForkNodeConnectionString() returns + invalid URI string if localHost resolves to IPv6 address + * Dependency upgrade + + SUREFIRE-2214: Upgrade to HtmlUnit 3.8.0 + + SUREFIRE-2215: Upgrade to Parent 41 + + SUREFIRE-2216: Upgrade plugins and components (in ITs) +- Upgrade to 3.2.2 + * Bug Fixes + + SUREFIRE-2205: Use maven-plugin-report-plugin only in plugins + modules + + SUREFIRE-2206: Downgrade plexus-xml to 3.0.0 + * Dependency updates + + SUREFIRE-2208: Bump org.codehaus.plexus:plexus-java from 1.1.2 + to 1.2.0 +- Upgrade to 3.2.1 + * New features and improvements + + SUREFIRE-1124: Support forkNumber in environment variables + + SUREFIRE-2177: Use junit-bom instead of single JUnit 5 + versions + + SUREFIRE-2179: Support adding additional Maven dependencies to + the test runtime classpath + + SUREFIRE-2178: clarify classpathDependencyExcludes + + SUREFIRE-2182: Log starter implementation on DEBUG level + * Bug Fixes + + SUREFIRE-2190: Fix module dependencies for compile only + dependencies + * Documentation updates + + Fix TestNG web site URL (#671) @sabi0 +- Upgrade to 3.1.2 + * Changes + + SUREFIRE-2166: Use ChoiceFormat to selective render percentage + and elapsed time in SurefireReportRenderer + + Simplify serialization/deserialization of elapsed time + (SUREFIRE-2164 + SUREFIRE-2167) + + SUREFIRE-2169: Potential NPE in WrappedReportEntry when + #getElapsed() is called + + MNG-6829: Replace StringUtils#isEmpty(String) and + #isNotEmpty(String) +- Upgrade to 3.1.0 + * Sub-task + + SUREFIRE-2162: Document upcoming mojo and file names change + * Bug + + SUREFIRE-2140: Cannot release Surefire on Windows + * Improvement + + SUREFIRE-2153: Replace SurefireReportGenerator with a new + SurefireReportRenderer + + SUREFIRE-2160: Replace LocalizedProperties with (Custom)I18N + approach from MPIR + * Task + + SUREFIRE-2130: Rewrite several test classes in report + plugin for upcoming Doxia 2.0.0 stack +- Upgrade to 3.0.0 + * New features and improvements + + SUREFIRE-2154: Get rid of localRepository from surefire + mojo parameter, use Resolver API + * Bug Fixes + + SUREFIRE-2119: Sanitize failIfNoSpecifiedTests prefix in + failsafe + + SUREFIRE-2143: Fix reporting of skipped parameterized test + * Documentation updates + + SUREFIRE-2156: Refresh download page +- Modifed patch: + * 0003-Port-to-TestNG-7.4.0.patch -> 0001-Port-to-TestNG-7.4.0.patch + + regenerate + * maven-surefire-bootstrap-resources.patch + + regenerate from maven build +- Removed patches: + * 0001-Maven-3.patch + * 0002-Port-to-current-doxia.patch + * 0004-Port-to-current-maven-shared-utils.patch + + not needed with this version + +------------------------------------------------------------------- +Thu Feb 22 07:58:37 UTC 2024 - Fridrich Strba + +- Upgrade to 2.22.2 + * Bugs: + + SUREFIRE-1614: JUnit Runner that writes to System.out + corrupts Surefire’s STDOUT when using JUnit’s Vintage Engine +- Upgrade to 2.22.1 + * Bugs: + + SUREFIRE-1532: MIME type for javascript is now officially + application/javascript + + SUREFIRE-1535: Surefire unable to run testng suites in + parallel + + SUREFIRE-1538: Git considers PNG files as changed although + there is no change + + SUREFIRE-1550: The surefire XSD published on maven site lacks + of some rerun element + + SUREFIRE-1559: XML Report elements rerunError, rerunFailure, + flakyFailure, flakyError should contain element stackTrace and + should not be simpleContent. + + SUREFIRE-1561: Logs in Parallel Tests are mixed up when + forkMode=never or forkCount=0 + + SUREFIRE-1564: Can’t override platform version through + project/plugin dependencies + + SUREFIRE-1579: Forks mixed up characters in standard output + * Improvements: + + SUREFIRE-1552: Nil element “failureMessage” in + failsafe-summary.xml should have self closed tag + + SUREFIRE-1554: Fix old test resources TEST-*.xml in favor of + continuing with SUREFIRE-1550 + + SUREFIRE-1555: Elapsed time in XML Report should satisfy + pattern in XSD. + + SUREFIRE-1562: Support Java 11 + + SUREFIRE-1565: Surefire should support parameterized + reportsDirectory + * Tasks: + + SUREFIRE-1569: m-invoker-p:3.1.0 attempts to resolve + maven-surefire-common:jar:2.22.1-SNAPSHOT from remote repo + 'apache.snapshots' + + SUREFIRE-1578: Remove obsolete module + surefire-setup-integration-tests + * Dependency upgrades: + + SUREFIRE-1540: Upgrade maven-plugins parent to version 32 + + SUREFIRE-1571: Upgrade maven-plugins parent to version 33 +- Fetch sources using source service to avoid bundling binaries in + sources +- Fix broken links in the spec file +- Modified patch: + * 0004-Port-to-current-maven-shared-utils.patch + + rediff to changed context + +------------------------------------------------------------------- +Thu May 5 10:46:11 UTC 2022 - Fridrich Strba + +- Clean and simplify the spec file in order to be able to generate + the javadoc with either maven-javadoc-plugin or xmvn javadoc mojo + +------------------------------------------------------------------- +Wed Apr 27 13:52:13 UTC 2022 - Fridrich Strba + +- Modified patches: + * 0004-Port-to-current-maven-shared-utils.patch + + Add some try/catch blocks so that we catch new exceptions + potentially thrown by maven-shared-utils-3.3.x + * 0003-Port-to-TestNG-6.11.patch -> 0003-Port-to-TestNG-7.4.0.patch + + Allow building with the new testng 7.4.0 + +------------------------------------------------------------------- +Tue Mar 22 13:53:34 UTC 2022 - Fridrich Strba + +- Build with source and target level 8 + +------------------------------------------------------------------- +Mon Apr 19 16:59:36 UTC 2021 - Pedro Monreal + +- Update generate-tarball.sh to use https URL [bsc#1182708] + +------------------------------------------------------------------- +Sun Nov 24 17:49:18 UTC 2019 - Fridrich Strba + +- Specify maven.compiler.release to fix build with jdk9+ and newer + maven-javadoc-plugin + +------------------------------------------------------------------- +Wed Apr 3 09:30:18 UTC 2019 - Fridrich Strba + +- Initial packaging of the non-bootstrap versions of maven plugins + distributed with surefire 2.22.0 diff --git a/maven-surefire-plugins.spec b/maven-surefire-plugins.spec new file mode 100644 index 0000000..01c087b --- /dev/null +++ b/maven-surefire-plugins.spec @@ -0,0 +1,182 @@ +# +# spec file for package maven-surefire-plugins +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global base_name maven-surefire +Name: %{base_name}-plugins +Version: 3.5.2 +Release: 0 +Summary: Test framework project +License: Apache-2.0 AND CPL-1.0 +Group: Development/Libraries/Java +URL: https://maven.apache.org/surefire/ +Source0: %{base_name}-%{version}.tar.xz +Source1: https://www.apache.org/licenses/LICENSE-2.0.txt +Source2: https://www.eclipse.org/legal/cpl-v10.html +Patch0: 0001-Port-to-TestNG-7.4.0.patch +Patch1: 0002-Unshade-surefire.patch +BuildRequires: fdupes +BuildRequires: java-devel >= 1.8 +BuildRequires: maven-local +BuildRequires: mvn(org.apache.maven.doxia:doxia-core) +BuildRequires: mvn(org.apache.maven.doxia:doxia-sink-api) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) +BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) +BuildRequires: mvn(org.apache.maven.reporting:maven-reporting-impl) +BuildRequires: mvn(org.apache.maven.resolver:maven-resolver-api) +BuildRequires: mvn(org.apache.maven.shared:maven-shared-utils) +BuildRequires: mvn(org.apache.maven.surefire:maven-surefire-common) +BuildRequires: mvn(org.apache.maven.surefire:surefire-api) +BuildRequires: mvn(org.apache.maven.surefire:surefire-booter) +BuildRequires: mvn(org.apache.maven.surefire:surefire-extensions-api) +BuildRequires: mvn(org.apache.maven.surefire:surefire-logger-api) +BuildRequires: mvn(org.apache.maven.surefire:surefire-report-parser) +BuildRequires: mvn(org.apache.maven:maven-artifact) +BuildRequires: mvn(org.apache.maven:maven-core) +BuildRequires: mvn(org.apache.maven:maven-model) +BuildRequires: mvn(org.apache.maven:maven-parent:pom:) +BuildRequires: mvn(org.apache.maven:maven-plugin-api) +BuildRequires: mvn(org.apache.maven:maven-settings) +BuildRequires: mvn(org.codehaus.plexus:plexus-i18n) +BuildRequires: mvn(org.codehaus.plexus:plexus-interpolation) +BuildRequires: mvn(org.codehaus.plexus:plexus-xml) +BuildRequires: mvn(org.eclipse.sisu:org.eclipse.sisu.plexus) +BuildRequires: mvn(org.fusesource.jansi:jansi) +#!BuildRequires: maven-compiler-plugin-bootstrap +#!BuildRequires: maven-jar-plugin-bootstrap +#!BuildRequires: maven-plugin-plugin-bootstrap +#!BuildRequires: maven-resources-plugin-bootstrap +#!BuildRequires: maven-surefire-plugin-bootstrap +BuildArch: noarch + +%description +Surefire is a test framework project. + +%package -n maven-surefire-plugin +Summary: Surefire plugin for maven +Group: Development/Libraries/Java + +%description -n maven-surefire-plugin +Maven surefire plugin for running tests via the surefire framework. + +%package -n maven-surefire-report-plugin +Summary: Surefire reports plugin for maven +Group: Development/Libraries/Java + +%description -n maven-surefire-report-plugin +Plugin for generating reports from surefire test runs. + +%package -n maven-failsafe-plugin +Summary: Maven plugin for running integration tests +Group: Development/Libraries/Java + +%description -n maven-failsafe-plugin +The Failsafe Plugin is designed to run integration tests while the +Surefire Plugins is designed to run unit. The name (failsafe) was +chosen both because it is a synonym of surefire and because it implies +that when it fails, it does so in a safe way. + +If you use the Surefire Plugin for running tests, then when you have a +test failure, the build will stop at the integration-test phase and +your integration test environment will not have been torn down +correctly. + +The Failsafe Plugin is used during the integration-test and verify +phases of the build lifecycle to execute the integration tests of an +application. The Failsafe Plugin will not fail the build during the +integration-test phase thus enabling the post-integration-test phase +to execute. + +%package javadoc +Summary: Javadoc for %{name} +Group: Development/Libraries/Java + +%description javadoc +Javadoc for %{name}. + +%prep +%setup -q -n %{base_name}-%{version} +cp -p %{SOURCE1} %{SOURCE2} . + +%patch -P 0 -p1 +%patch -P 1 -p1 + +# Disable strict doclint +sed -i /-Xdoclint:all/d pom.xml + +# QA plugin useful only for upstream +%pom_remove_plugin -r :jacoco-maven-plugin +# Not wanted +%pom_remove_plugin -r :maven-shade-plugin +# Not packaged +%pom_remove_plugin -r :animal-sniffer-maven-plugin +# Complains +%pom_remove_plugin -r :apache-rat-plugin + +%pom_disable_module surefire-shadefire +%pom_remove_dep -r :surefire-shadefire + +# Help plugin is needed only to evaluate effective Maven settings. +# For building RPM package default settings will suffice. +%pom_remove_plugin :maven-help-plugin surefire-its + +# We don't need site-source +%pom_remove_plugin :maven-assembly-plugin maven-surefire-plugin +%pom_remove_dep -r ::::site-source + +# Disable all modules besides the 3 plugins +for module in \ + maven-surefire-common \ + surefire-api \ + surefire-booter \ + surefire-grouper \ + surefire-extensions-api \ + surefire-extensions-spi \ + surefire-its \ + surefire-logger-api \ + surefire-providers \ + surefire-report-parser; do + %pom_disable_module ${module} +done + +%build +%{mvn_package} ":*tests*" __noinstall +%{mvn_package} ":{surefire,surefire-providers}" __noinstall +%{mvn_package} ":*{surefire-plugin,report-plugin}*" @1 +%{mvn_package} ":*junit-platform*" junit5 +%{mvn_package} ":*{junit,testng,failsafe-plugin,report-parser}*" @1 + +%{mvn_build} -f -- \ +%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} + -Dmaven.compiler.release=8 \ +%endif + -Dsource=8 + +%install +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} + +%files -n maven-surefire-plugin -f .mfiles-surefire-plugin + +%files -n maven-surefire-report-plugin -f .mfiles-report-plugin + +%files -n maven-failsafe-plugin -f .mfiles-failsafe-plugin + +%files javadoc -f .mfiles-javadoc +%license LICENSE-2.0.txt cpl-v10.html + +%changelog diff --git a/maven-surefire-provider-junit5.changes b/maven-surefire-provider-junit5.changes new file mode 100644 index 0000000..cbbc56e --- /dev/null +++ b/maven-surefire-provider-junit5.changes @@ -0,0 +1,259 @@ +------------------------------------------------------------------- +Thu Oct 3 14:33:33 UTC 2024 - Fridrich Strba + +- Upgrade to 3.5.1 + * Bug + + SUREFIRE-1737: Disabling the JUnit5Xml30StatelessReporter has + no effect + + SUREFIRE-2257: [REGRESSION] NPEx: Cannot invoke + "Object.toString()" because "value" is null + + SUREFIRE-2267: Packages for commons-codec should be relocated + in surefire-shared-utils + + SUREFIRE-2268: Tests run under classpath if JDK 23 is used + * Improvement + + SUREFIRE-2264: Limit usage of commons-io from + surefire-shared-utils + + SUREFIRE-2266: Execute ITs in parallel + + SUREFIRE-2270: Use JUnit5 in surefire-shadefire +- Upgrade to 3.5.0 + * Improvement + + SUREFIRE-2227: Dynamically calculate xrefTestLocation + * Task + + SUREFIRE-2161: Align Mojo class names and output names +- Upgrade to 3.4.0 + * Bug + + SUREFIRE-2251: [REGRESSION] java.lang.NoSuchMethodException: + org.apache.maven.plugin.surefire.StartupReportConfiguration + . + + SUREFIRE-2253: [REGRESSION] Bump + org.apache.commons:commons-compress from 1.26.0 to 1.26.1 + causes hang + * Improvement + + SUREFIRE-1385: System properties defined in the Surefire and + Failsafe plugin configuration should override user properties +- Upgrade to 3.3.1 + * Bug + + SUREFIRE-2105: Failsafe report size increased with version + upgrade from 2.17 to 2.22.2 + + SUREFIRE-2242: Plain test report does not include names of the + skipped tests + + SUREFIRE-2250: Surefire Test Report Schema properties element + is not consistent with the code + * Improvement + + SUREFIRE-1360: Ability to disable properties for successfully + passed tests + + SUREFIRE-1934: Ability to disable system-out/system-err for + successfully passed tests + + SUREFIRE-2124: Avoid creating unnecessary target files for pom + projects + + SUREFIRE-2249: Doc for 'properties' parameter does not mention + JUnit +- Upgrade to 3.3.0 + * Bug + + SUREFIRE-1939: Build fails if java.home has <=2 path + components + + SUREFIRE-2232: [REGRESSION] StatelessXmlReporter fails to + process failed result without a throwable + + SUREFIRE-2240: Using JUnit BOM prevents upgrading the engine + version via plugin dependency + * Improvement + + SUREFIRE-2248: Make "type" attribute on failures and errors in + (surefire|failsafe)-test-report schema optional + * Test + + SUREFIRE-2141: Surefire 3.0.0-M8 tests don't pass on Mac M1 + (Surefire1295AttributeJvmCrashesToTestsIT) + * Task + + SUREFIRE-2244: Make IT for SUREFIRE-1295 reliable + + SUREFIRE-2246: Clean up dependencies reported by + dependencies:analyze +- Modified patches: + * maven-surefire-bootstrap-resources.patch + + regenerate from non-bootstrap build + * 0001-Port-to-TestNG-7.4.0.patch + + rediff and augment to make the test pass in upstream evironment +- Added patch: + * 0002-Unshade-surefire.patch + + remove the use of the shaded surefire-shared-utils artifact + in favour of direct use of the dependencies + +------------------------------------------------------------------- +Wed Apr 10 10:54:02 UTC 2024 - Fridrich Strba + +- Upgrade to 3.2.5 + * Bug + + SUREFIRE-2223: Surefire evaluates parameter jvm before skip + + SUREFIRE-2224: StatelessXmlReporter#getTestProblems() does + not properly reflect report schema structure + + SUREFIRE-2225: Surefire ITs fail when project directory + contains space + + SUREFIRE-2229: + REGRESSION] SUREFIRE-2224 causes stack trace + to be omitted for errors and failures + + SUREFIRE-2231: JaCoCo 0.8.11 fails with old TestNG releases on + Java 17+ + * Improvement + + SUREFIRE-1345: Support flakyFailure and flakyError in + TestSuiteXmlParser + + SUREFIRE-2221: Document minimum supported Java version for + Toolchains +- Upgrade to 3.2.3 + * Bug + + SUREFIRE-2210: Additional class path ordering broken since + 3.2.0 + + SUREFIRE-2211: additionalClasspathElement with UNC path not + working with Maven Failsafe Plugin + + SUREFIRE-2212: OutOfMemoryError raised when parsing files with + huge stderr/stdout output in surefire-report-parser + + SUREFIRE-2220: + SurefireForkChannel#getForkNodeConnectionString() returns + invalid URI string if localHost resolves to IPv6 address + * Dependency upgrade + + SUREFIRE-2214: Upgrade to HtmlUnit 3.8.0 + + SUREFIRE-2215: Upgrade to Parent 41 + + SUREFIRE-2216: Upgrade plugins and components (in ITs) +- Upgrade to 3.2.2 + * Bug Fixes + + SUREFIRE-2205: Use maven-plugin-report-plugin only in plugins + modules + + SUREFIRE-2206: Downgrade plexus-xml to 3.0.0 + * Dependency updates + + SUREFIRE-2208: Bump org.codehaus.plexus:plexus-java from 1.1.2 + to 1.2.0 +- Upgrade to 3.2.1 + * New features and improvements + + SUREFIRE-1124: Support forkNumber in environment variables + + SUREFIRE-2177: Use junit-bom instead of single JUnit 5 + versions + + SUREFIRE-2179: Support adding additional Maven dependencies to + the test runtime classpath + + SUREFIRE-2178: clarify classpathDependencyExcludes + + SUREFIRE-2182: Log starter implementation on DEBUG level + * Bug Fixes + + SUREFIRE-2190: Fix module dependencies for compile only + dependencies + * Documentation updates + + Fix TestNG web site URL (#671) @sabi0 +- Upgrade to 3.1.2 + * Changes + + SUREFIRE-2166: Use ChoiceFormat to selective render percentage + and elapsed time in SurefireReportRenderer + + Simplify serialization/deserialization of elapsed time + (SUREFIRE-2164 + SUREFIRE-2167) + + SUREFIRE-2169: Potential NPE in WrappedReportEntry when + #getElapsed() is called + + MNG-6829: Replace StringUtils#isEmpty(String) and + #isNotEmpty(String) +- Upgrade to 3.1.0 + * Sub-task + + SUREFIRE-2162: Document upcoming mojo and file names change + * Bug + + SUREFIRE-2140: Cannot release Surefire on Windows + * Improvement + + SUREFIRE-2153: Replace SurefireReportGenerator with a new + SurefireReportRenderer + + SUREFIRE-2160: Replace LocalizedProperties with (Custom)I18N + approach from MPIR + * Task + + SUREFIRE-2130: Rewrite several test classes in report + plugin for upcoming Doxia 2.0.0 stack +- Upgrade to 3.0.0 + * New features and improvements + + SUREFIRE-2154: Get rid of localRepository from surefire + mojo parameter, use Resolver API + * Bug Fixes + + SUREFIRE-2119: Sanitize failIfNoSpecifiedTests prefix in + failsafe + + SUREFIRE-2143: Fix reporting of skipped parameterized test + * Documentation updates + + SUREFIRE-2156: Refresh download page +- Modifed patch: + * 0003-Port-to-TestNG-7.4.0.patch -> 0001-Port-to-TestNG-7.4.0.patch + + regenerate + * maven-surefire-bootstrap-resources.patch + + regenerate from maven build +- Removed patches: + * 0001-Maven-3.patch + * 0002-Port-to-current-doxia.patch + * 0004-Port-to-current-maven-shared-utils.patch + + not needed with this version + +------------------------------------------------------------------- +Thu Feb 22 07:58:37 UTC 2024 - Fridrich Strba + +- Upgrade to 2.22.2 + * Bugs: + + SUREFIRE-1614: JUnit Runner that writes to System.out + corrupts Surefire’s STDOUT when using JUnit’s Vintage Engine +- Upgrade to 2.22.1 + * Bugs: + + SUREFIRE-1532: MIME type for javascript is now officially + application/javascript + + SUREFIRE-1535: Surefire unable to run testng suites in + parallel + + SUREFIRE-1538: Git considers PNG files as changed although + there is no change + + SUREFIRE-1550: The surefire XSD published on maven site lacks + of some rerun element + + SUREFIRE-1559: XML Report elements rerunError, rerunFailure, + flakyFailure, flakyError should contain element stackTrace and + should not be simpleContent. + + SUREFIRE-1561: Logs in Parallel Tests are mixed up when + forkMode=never or forkCount=0 + + SUREFIRE-1564: Can’t override platform version through + project/plugin dependencies + + SUREFIRE-1579: Forks mixed up characters in standard output + * Improvements: + + SUREFIRE-1552: Nil element “failureMessage” in + failsafe-summary.xml should have self closed tag + + SUREFIRE-1554: Fix old test resources TEST-*.xml in favor of + continuing with SUREFIRE-1550 + + SUREFIRE-1555: Elapsed time in XML Report should satisfy + pattern in XSD. + + SUREFIRE-1562: Support Java 11 + + SUREFIRE-1565: Surefire should support parameterized + reportsDirectory + * Tasks: + + SUREFIRE-1569: m-invoker-p:3.1.0 attempts to resolve + maven-surefire-common:jar:2.22.1-SNAPSHOT from remote repo + 'apache.snapshots' + + SUREFIRE-1578: Remove obsolete module + surefire-setup-integration-tests + * Dependency upgrades: + + SUREFIRE-1540: Upgrade maven-plugins parent to version 32 + + SUREFIRE-1571: Upgrade maven-plugins parent to version 33 +- Fetch sources using source service to avoid bundling binaries in + sources +- Fix broken links in the spec file +- Modified patch: + * 0004-Port-to-current-maven-shared-utils.patch + + rediff to changed context + +------------------------------------------------------------------- +Wed Apr 27 13:52:13 UTC 2022 - Fridrich Strba + +- Modified patches: + * 0004-Port-to-current-maven-shared-utils.patch + + Add some try/catch blocks so that we catch new exceptions + potentially thrown by maven-shared-utils-3.3.x + * 0003-Port-to-TestNG-6.11.patch -> 0003-Port-to-TestNG-7.4.0.patch + + Allow building with the new testng 7.4.0 + +------------------------------------------------------------------- +Tue Mar 22 13:53:55 UTC 2022 - Fridrich Strba + +- Build with source and target levels 8 + +------------------------------------------------------------------- +Mon Apr 19 16:59:36 UTC 2021 - Pedro Monreal + +- Update generate-tarball.sh to use https URL [bsc#1182708] + +------------------------------------------------------------------- +Sun Nov 24 17:49:33 UTC 2019 - Fridrich Strba + +- Specify maven.compiler.release to fix build with jdk9+ and newer + maven-javadoc-plugin + +------------------------------------------------------------------- +Mon Jul 1 13:28:26 UTC 2019 - Fridrich Strba + +- Intial packaging of junit 5 provider for maven surefire diff --git a/maven-surefire-provider-junit5.spec b/maven-surefire-provider-junit5.spec new file mode 100644 index 0000000..f4c8af3 --- /dev/null +++ b/maven-surefire-provider-junit5.spec @@ -0,0 +1,106 @@ +# +# spec file for package maven-surefire-provider-junit5 +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global base_name maven-surefire +Name: %{base_name}-provider-junit5 +Version: 3.5.2 +Release: 0 +Summary: JUnit 5 provider for Maven Surefire +License: Apache-2.0 AND CPL-1.0 +Group: Development/Libraries/Java +URL: https://maven.apache.org/surefire/ +Source0: %{base_name}-%{version}.tar.xz +Source1: https://www.apache.org/licenses/LICENSE-2.0.txt +Source2: https://www.eclipse.org/legal/cpl-v10.html +Patch0: 0001-Port-to-TestNG-7.4.0.patch +Patch1: 0002-Unshade-surefire.patch +BuildRequires: fdupes +BuildRequires: java-devel >= 1.8 +BuildRequires: maven-local +BuildRequires: mvn(org.apache.maven.surefire:common-java5) +BuildRequires: mvn(org.apache.maven:maven-parent:pom:) +BuildRequires: mvn(org.junit.platform:junit-platform-engine) +BuildRequires: mvn(org.junit.platform:junit-platform-launcher) +# PpidChecker relies on /usr/bin/ps to check process uptime +Requires: procps +BuildArch: noarch + +%description +JUnit 5 provider for Maven Surefire. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML + +%description javadoc +Javadoc for %{name}. + +%prep +%setup -q -n %{base_name}-%{version} +cp -p %{SOURCE1} %{SOURCE2} . + +%patch -P 0 -p1 +%patch -P 1 -p1 + +# Disable strict doclint +sed -i /-Xdoclint:all/d pom.xml + +# QA plugin useful only for upstream +%pom_remove_plugin -r :jacoco-maven-plugin +# Not wanted +%pom_remove_plugin -r :maven-shade-plugin +# Not packaged +%pom_remove_plugin -r :animal-sniffer-maven-plugin +# Complains +%pom_remove_plugin -r :apache-rat-plugin + +%pom_disable_module surefire-shadefire +%pom_remove_dep -r :surefire-shadefire + +# Help plugin is needed only to evaluate effective Maven settings. +# For building RPM package default settings will suffice. +%pom_remove_plugin :maven-help-plugin surefire-its + +# We don't need site-source +%pom_remove_plugin :maven-assembly-plugin maven-surefire-plugin +%pom_remove_dep -r ::::site-source + +%build +pushd surefire-providers/surefire-junit-platform +%{mvn_build} -f -- \ +%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} + -Dmaven.compiler.release=8 \ +%endif + -Dsource=8 + +popd + +%install +pushd surefire-providers/surefire-junit-platform +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} +popd + +%files -f surefire-providers/surefire-junit-platform/.mfiles +%doc README.md +%license LICENSE-2.0.txt cpl-v10.html + +%files javadoc -f surefire-providers/surefire-junit-platform/.mfiles-javadoc +%license LICENSE-2.0.txt cpl-v10.html + +%changelog diff --git a/maven-surefire.changes b/maven-surefire.changes new file mode 100644 index 0000000..1565ae9 --- /dev/null +++ b/maven-surefire.changes @@ -0,0 +1,272 @@ +------------------------------------------------------------------- +Thu Oct 3 14:33:33 UTC 2024 - Fridrich Strba + +- Upgrade to 3.5.1 + * Bug + + SUREFIRE-1737: Disabling the JUnit5Xml30StatelessReporter has + no effect + + SUREFIRE-2257: [REGRESSION] NPEx: Cannot invoke + "Object.toString()" because "value" is null + + SUREFIRE-2267: Packages for commons-codec should be relocated + in surefire-shared-utils + + SUREFIRE-2268: Tests run under classpath if JDK 23 is used + * Improvement + + SUREFIRE-2264: Limit usage of commons-io from + surefire-shared-utils + + SUREFIRE-2266: Execute ITs in parallel + + SUREFIRE-2270: Use JUnit5 in surefire-shadefire +- Upgrade to 3.5.0 + * Improvement + + SUREFIRE-2227: Dynamically calculate xrefTestLocation + * Task + + SUREFIRE-2161: Align Mojo class names and output names +- Upgrade to 3.4.0 + * Bug + + SUREFIRE-2251: [REGRESSION] java.lang.NoSuchMethodException: + org.apache.maven.plugin.surefire.StartupReportConfiguration + . + + SUREFIRE-2253: [REGRESSION] Bump + org.apache.commons:commons-compress from 1.26.0 to 1.26.1 + causes hang + * Improvement + + SUREFIRE-1385: System properties defined in the Surefire and + Failsafe plugin configuration should override user properties +- Upgrade to 3.3.1 + * Bug + + SUREFIRE-2105: Failsafe report size increased with version + upgrade from 2.17 to 2.22.2 + + SUREFIRE-2242: Plain test report does not include names of the + skipped tests + + SUREFIRE-2250: Surefire Test Report Schema properties element + is not consistent with the code + * Improvement + + SUREFIRE-1360: Ability to disable properties for successfully + passed tests + + SUREFIRE-1934: Ability to disable system-out/system-err for + successfully passed tests + + SUREFIRE-2124: Avoid creating unnecessary target files for pom + projects + + SUREFIRE-2249: Doc for 'properties' parameter does not mention + JUnit +- Upgrade to 3.3.0 + * Bug + + SUREFIRE-1939: Build fails if java.home has <=2 path + components + + SUREFIRE-2232: [REGRESSION] StatelessXmlReporter fails to + process failed result without a throwable + + SUREFIRE-2240: Using JUnit BOM prevents upgrading the engine + version via plugin dependency + * Improvement + + SUREFIRE-2248: Make "type" attribute on failures and errors in + (surefire|failsafe)-test-report schema optional + * Test + + SUREFIRE-2141: Surefire 3.0.0-M8 tests don't pass on Mac M1 + (Surefire1295AttributeJvmCrashesToTestsIT) + * Task + + SUREFIRE-2244: Make IT for SUREFIRE-1295 reliable + + SUREFIRE-2246: Clean up dependencies reported by + dependencies:analyze +- Modified patches: + * maven-surefire-bootstrap-resources.patch + + regenerate from non-bootstrap build + * 0001-Port-to-TestNG-7.4.0.patch + + rediff and augment to make the test pass in upstream + environment +- Added patch: + * 0002-Unshade-surefire.patch + + remove the use of the shaded surefire-shared-utils artifact + in favour of direct use of the dependencies + +------------------------------------------------------------------- +Mon Jun 10 19:00:07 UTC 2024 - Fridrich Strba + +- Use plexus-metadata-generator executable directly to simplify + build classpath + +------------------------------------------------------------------- +Wed Apr 10 10:54:02 UTC 2024 - Fridrich Strba + +- Upgrade to 3.2.5 + * Bug + + SUREFIRE-2223: Surefire evaluates parameter jvm before skip + + SUREFIRE-2224: StatelessXmlReporter#getTestProblems() does + not properly reflect report schema structure + + SUREFIRE-2225: Surefire ITs fail when project directory + contains space + + SUREFIRE-2229: + REGRESSION] SUREFIRE-2224 causes stack trace + to be omitted for errors and failures + + SUREFIRE-2231: JaCoCo 0.8.11 fails with old TestNG releases on + Java 17+ + * Improvement + + SUREFIRE-1345: Support flakyFailure and flakyError in + TestSuiteXmlParser + + SUREFIRE-2221: Document minimum supported Java version for + Toolchains +- Upgrade to 3.2.3 + * Bug + + SUREFIRE-2210: Additional class path ordering broken since + 3.2.0 + + SUREFIRE-2211: additionalClasspathElement with UNC path not + working with Maven Failsafe Plugin + + SUREFIRE-2212: OutOfMemoryError raised when parsing files with + huge stderr/stdout output in surefire-report-parser + + SUREFIRE-2220: + SurefireForkChannel#getForkNodeConnectionString() returns + invalid URI string if localHost resolves to IPv6 address + * Dependency upgrade + + SUREFIRE-2214: Upgrade to HtmlUnit 3.8.0 + + SUREFIRE-2215: Upgrade to Parent 41 + + SUREFIRE-2216: Upgrade plugins and components (in ITs) +- Upgrade to 3.2.2 + * Bug Fixes + + SUREFIRE-2205: Use maven-plugin-report-plugin only in plugins + modules + + SUREFIRE-2206: Downgrade plexus-xml to 3.0.0 + * Dependency updates + + SUREFIRE-2208: Bump org.codehaus.plexus:plexus-java from 1.1.2 + to 1.2.0 +- Upgrade to 3.2.1 + * New features and improvements + + SUREFIRE-1124: Support forkNumber in environment variables + + SUREFIRE-2177: Use junit-bom instead of single JUnit 5 + versions + + SUREFIRE-2179: Support adding additional Maven dependencies to + the test runtime classpath + + SUREFIRE-2178: clarify classpathDependencyExcludes + + SUREFIRE-2182: Log starter implementation on DEBUG level + * Bug Fixes + + SUREFIRE-2190: Fix module dependencies for compile only + dependencies + * Documentation updates + + Fix TestNG web site URL (#671) @sabi0 +- Upgrade to 3.1.2 + * Changes + + SUREFIRE-2166: Use ChoiceFormat to selective render percentage + and elapsed time in SurefireReportRenderer + + Simplify serialization/deserialization of elapsed time + (SUREFIRE-2164 + SUREFIRE-2167) + + SUREFIRE-2169: Potential NPE in WrappedReportEntry when + #getElapsed() is called + + MNG-6829: Replace StringUtils#isEmpty(String) and + #isNotEmpty(String) +- Upgrade to 3.1.0 + * Sub-task + + SUREFIRE-2162: Document upcoming mojo and file names change + * Bug + + SUREFIRE-2140: Cannot release Surefire on Windows + * Improvement + + SUREFIRE-2153: Replace SurefireReportGenerator with a new + SurefireReportRenderer + + SUREFIRE-2160: Replace LocalizedProperties with (Custom)I18N + approach from MPIR + * Task + + SUREFIRE-2130: Rewrite several test classes in report + plugin for upcoming Doxia 2.0.0 stack +- Upgrade to 3.0.0 + * New features and improvements + + SUREFIRE-2154: Get rid of localRepository from surefire + mojo parameter, use Resolver API + * Bug Fixes + + SUREFIRE-2119: Sanitize failIfNoSpecifiedTests prefix in + failsafe + + SUREFIRE-2143: Fix reporting of skipped parameterized test + * Documentation updates + + SUREFIRE-2156: Refresh download page +- Modifed patch: + * 0003-Port-to-TestNG-7.4.0.patch -> 0001-Port-to-TestNG-7.4.0.patch + + regenerate + * maven-surefire-bootstrap-resources.patch + + regenerate from maven build +- Removed patches: + * 0001-Maven-3.patch + * 0002-Port-to-current-doxia.patch + * 0004-Port-to-current-maven-shared-utils.patch + + not needed with this version + +------------------------------------------------------------------- +Thu Feb 22 07:58:37 UTC 2024 - Fridrich Strba + +- Upgrade to 2.22.2 + * Bugs: + + SUREFIRE-1614: JUnit Runner that writes to System.out + corrupts Surefire’s STDOUT when using JUnit’s Vintage Engine +- Upgrade to 2.22.1 + * Bugs: + + SUREFIRE-1532: MIME type for javascript is now officially + application/javascript + + SUREFIRE-1535: Surefire unable to run testng suites in + parallel + + SUREFIRE-1538: Git considers PNG files as changed although + there is no change + + SUREFIRE-1550: The surefire XSD published on maven site lacks + of some rerun element + + SUREFIRE-1559: XML Report elements rerunError, rerunFailure, + flakyFailure, flakyError should contain element stackTrace and + should not be simpleContent. + + SUREFIRE-1561: Logs in Parallel Tests are mixed up when + forkMode=never or forkCount=0 + + SUREFIRE-1564: Can’t override platform version through + project/plugin dependencies + + SUREFIRE-1579: Forks mixed up characters in standard output + * Improvements: + + SUREFIRE-1552: Nil element “failureMessage” in + failsafe-summary.xml should have self closed tag + + SUREFIRE-1554: Fix old test resources TEST-*.xml in favor of + continuing with SUREFIRE-1550 + + SUREFIRE-1555: Elapsed time in XML Report should satisfy + pattern in XSD. + + SUREFIRE-1562: Support Java 11 + + SUREFIRE-1565: Surefire should support parameterized + reportsDirectory + * Tasks: + + SUREFIRE-1569: m-invoker-p:3.1.0 attempts to resolve + maven-surefire-common:jar:2.22.1-SNAPSHOT from remote repo + 'apache.snapshots' + + SUREFIRE-1578: Remove obsolete module + surefire-setup-integration-tests + * Dependency upgrades: + + SUREFIRE-1540: Upgrade maven-plugins parent to version 32 + + SUREFIRE-1571: Upgrade maven-plugins parent to version 33 +- Fetch sources using source service to avoid bundling binaries in + sources +- Fix broken links in the spec file +- Modified patch: + * 0004-Port-to-current-maven-shared-utils.patch + + rediff to changed context + +------------------------------------------------------------------- +Fri May 5 08:30:46 UTC 2023 - Fridrich Strba + +- Add _multibuild to define 2nd spec file as additional flavor. + Eliminates the need for source package links in OBS. + +------------------------------------------------------------------- +Wed Apr 27 13:52:13 UTC 2022 - Fridrich Strba + +- Modified patches: + * 0004-Port-to-current-maven-shared-utils.patch + + Add some try/catch blocks so that we catch new exceptions + potentially thrown by maven-shared-utils-3.3.x + * 0003-Port-to-TestNG-6.11.patch -> 0003-Port-to-TestNG-7.4.0.patch + + Allow building with the new testng 7.4.0 + +------------------------------------------------------------------- +Tue Mar 22 13:52:58 UTC 2022 - Fridrich Strba + +- Build with java source and target levels 8 + +------------------------------------------------------------------- +Mon Apr 19 16:59:36 UTC 2021 - Pedro Monreal + +- Update generate-tarball.sh to use https URL [bsc#1182708] + +------------------------------------------------------------------- +Tue Apr 2 09:06:05 UTC 2019 - Fridrich Strba + +- Initial packaging of maven-surefire 2.22.0 +- Generate and customize ant build files +- Build the maven plugins as bootstrap packages +- Added patch: + * maven-surefire-bootstrap-resources.patch + + Add to the build of the plugins generated files that + we cannot generate when building outside maven diff --git a/maven-surefire.spec b/maven-surefire.spec new file mode 100644 index 0000000..f0fbc8c --- /dev/null +++ b/maven-surefire.spec @@ -0,0 +1,277 @@ +# +# spec file for package maven-surefire +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: maven-surefire +Version: 3.5.2 +Release: 0 +Summary: Test framework project +License: Apache-2.0 AND CPL-1.0 +Group: Development/Libraries/Java +URL: https://maven.apache.org/surefire/ +Source0: %{name}-%{version}.tar.xz +Source1: https://www.apache.org/licenses/LICENSE-2.0.txt +Source2: https://www.eclipse.org/legal/cpl-v10.html +Source10: %{name}-build.tar.xz +Patch0: 0001-Port-to-TestNG-7.4.0.patch +Patch1: 0002-Unshade-surefire.patch +Patch10: %{name}-bootstrap-resources.patch +BuildRequires: ant +BuildRequires: apache-commons-compress +BuildRequires: apache-commons-io +BuildRequires: apache-commons-lang3 +BuildRequires: atinject +BuildRequires: fdupes +BuildRequires: java-devel >= 1.8 +BuildRequires: javacc +BuildRequires: javapackages-local >= 6 +BuildRequires: jsr-305 +BuildRequires: junit +BuildRequires: maven-common-artifact-filters +BuildRequires: maven-doxia-core +BuildRequires: maven-doxia-sink-api +BuildRequires: maven-lib +BuildRequires: maven-plugin-annotations +BuildRequires: maven-reporting-api +BuildRequires: maven-reporting-impl +BuildRequires: maven-resolver-api +BuildRequires: maven-resolver-impl +BuildRequires: maven-resolver-named-locks +BuildRequires: maven-resolver-util +BuildRequires: maven-shared-utils +BuildRequires: plexus-containers-component-annotations +BuildRequires: plexus-i18n +BuildRequires: plexus-interpolation +BuildRequires: plexus-languages +BuildRequires: plexus-metadata-generator +BuildRequires: plexus-utils +BuildRequires: plexus-xml +BuildRequires: sisu-inject +BuildRequires: sisu-plexus +BuildRequires: testng +BuildRequires: xmvn-install +BuildRequires: xmvn-resolve +BuildRequires: mvn(org.apache.maven:maven-parent:pom:) +# PpidChecker relies on /usr/bin/ps to check process uptime +Requires: procps +BuildArch: noarch + +%description +Surefire is a test framework project. + +%package plugin-bootstrap +Summary: Surefire plugin for maven +Group: Development/Libraries/Java + +%description plugin-bootstrap +Maven surefire plugin for running tests via the surefire framework. + +%package report-plugin-bootstrap +Summary: Surefire reports plugin for maven +Group: Development/Libraries/Java + +%description report-plugin-bootstrap +Plugin for generating reports from surefire test runs. + +%package provider-junit +Summary: JUnit provider for Maven Surefire +Group: Development/Libraries/Java + +%description provider-junit +JUnit provider for Maven Surefire. + +%package provider-testng +Summary: TestNG provider for Maven Surefire +Group: Development/Libraries/Java + +%description provider-testng +TestNG provider for Maven Surefire. + +%package report-parser +Summary: Parses report output files from surefire +Group: Development/Libraries/Java + +%description report-parser +Plugin for parsing report output files from surefire. + +%package -n maven-failsafe-plugin-bootstrap +Summary: Maven plugin for running integration tests +Group: Development/Libraries/Java + +%description -n maven-failsafe-plugin-bootstrap +The Failsafe Plugin is designed to run integration tests while the +Surefire Plugins is designed to run unit. The name (failsafe) was +chosen both because it is a synonym of surefire and because it implies +that when it fails, it does so in a safe way. + +If you use the Surefire Plugin for running tests, then when you have a +test failure, the build will stop at the integration-test phase and +your integration test environment will not have been torn down +correctly. + +The Failsafe Plugin is used during the integration-test and verify +phases of the build lifecycle to execute the integration tests of an +application. The Failsafe Plugin will not fail the build during the +integration-test phase thus enabling the post-integration-test phase +to execute. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML + +%description javadoc +Javadoc for %{name}. + +%prep +%setup -q -a10 +cp -p %{SOURCE1} %{SOURCE2} . + +%patch -P 0 -p1 +%patch -P 1 -p1 +%patch -P 10 -p1 + +# Disable strict doclint +sed -i /-Xdoclint:all/d pom.xml + +# QA plugin useful only for upstream +%pom_remove_plugin -r :jacoco-maven-plugin +# Not wanted +%pom_remove_plugin -r :maven-shade-plugin +# Not packaged +%pom_remove_plugin -r :animal-sniffer-maven-plugin +# Complains +%pom_remove_plugin -r :apache-rat-plugin + +%pom_disable_module surefire-shadefire +%pom_remove_dep -r :surefire-shadefire + +# Help plugin is needed only to evaluate effective Maven settings. +# For building RPM package default settings will suffice. +%pom_remove_plugin :maven-help-plugin surefire-its + +# We don't need site-source +%pom_remove_plugin :maven-assembly-plugin maven-surefire-plugin +%pom_remove_dep -r ::::site-source + +%build +%{mvn_package} ":*tests*" __noinstall +%{mvn_package} ":{surefire,surefire-providers}" __noinstall +%{mvn_package} ":*{surefire-plugin,report-plugin}*" @1 +%{mvn_package} ":*junit-platform*" junit5 +%{mvn_package} ":*{junit,testng,failsafe-plugin,report-parser}*" @1 + +mkdir -p lib +build-jar-repository -s -p lib \ + apache-commons-lang3 \ + atinject \ + commons-compress \ + commons-io \ + jsr-305 \ + junit \ + maven-common-artifact-filters/maven-common-artifact-filters \ + maven-doxia/doxia-core \ + maven-doxia/doxia-sink-api \ + maven/maven-artifact \ + maven/maven-core \ + maven/maven-model \ + maven/maven-plugin-api \ + maven/maven-settings \ + maven-plugin-tools/maven-plugin-annotations \ + maven-reporting-api/maven-reporting-api \ + maven-reporting-impl/maven-reporting-impl \ + maven-resolver/maven-resolver-api \ + maven-resolver/maven-resolver-impl \ + maven-resolver/maven-resolver-named-locks \ + maven-resolver/maven-resolver-util \ + maven-shared-utils/maven-shared-utils \ + org.eclipse.sisu.inject \ + org.eclipse.sisu.plexus \ + plexus-containers/plexus-component-annotations \ + plexus-i18n/plexus-i18n \ + plexus/interpolation \ + plexus-languages/plexus-java \ + plexus/utils \ + plexus/xml \ + testng + +%{ant} \ + -Dtest.skip=true \ + package javadoc + +%{mvn_artifact} pom.xml +%{mvn_artifact} surefire-providers/pom.xml + +mkdir -p target/site/apidocs + +for module in \ + surefire-logger-api \ + surefire-api \ + surefire-booter \ + surefire-grouper \ + surefire-extensions-api \ + surefire-extensions-spi \ + maven-surefire-common \ + surefire-report-parser \ + maven-surefire-plugin \ + maven-failsafe-plugin \ + maven-surefire-report-plugin; do + %{mvn_artifact} ${module}/pom.xml ${module}/target/${module}-%{version}.jar + if [ -d ${module}/target/site/apidocs ]; then + cp -r ${module}/target/site/apidocs target/site/apidocs/${module} + fi +done +for module in \ + common-java5 \ + common-junit3 \ + common-junit4 \ + common-junit48 \ + surefire-junit3 \ + surefire-junit4 \ + surefire-junit47 \ + surefire-testng-utils \ + surefire-testng; do + %{mvn_artifact} surefire-providers/${module}/pom.xml \ + surefire-providers/${module}/target/${module}-%{version}.jar + if [ -d surefire-providers/${module}/target/site/apidocs ]; then + cp -r surefire-providers/${module}/target/site/apidocs target/site/apidocs/${module} + fi +done + +%install +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%doc README.md +%license LICENSE-2.0.txt cpl-v10.html + +%files plugin-bootstrap -f .mfiles-surefire-plugin + +%files report-plugin-bootstrap -f .mfiles-report-plugin + +%files report-parser -f .mfiles-report-parser + +%files provider-junit -f .mfiles-junit + +%files provider-testng -f .mfiles-testng + +%files -n maven-failsafe-plugin-bootstrap -f .mfiles-failsafe-plugin + +%files javadoc -f .mfiles-javadoc +%license LICENSE-2.0.txt cpl-v10.html + +%changelog