6787 lines
322 KiB
Diff
6787 lines
322 KiB
Diff
diff -urEbwBN 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
|
|
--- a/maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-failsafe-plugin/plugin-help.xml 1970-01-01 01:00:00.000000000 +0100
|
|
+++ b/maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-failsafe-plugin/plugin-help.xml 2024-11-04 10:43:47.030374365 +0100
|
|
@@ -0,0 +1,953 @@
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
+
|
|
+<!-- Generated by maven-plugin-tools 3.15 (for help mojo with limited elements)-->
|
|
+
|
|
+<plugin>
|
|
+ <name>${project.name}</name>
|
|
+ <description>${project.description}</description>
|
|
+ <groupId>${project.groupId}</groupId>
|
|
+ <artifactId>${project.artifactId}</artifactId>
|
|
+ <version>${project.version}</version>
|
|
+ <goalPrefix>failsafe</goalPrefix>
|
|
+ <mojos>
|
|
+ <mojo>
|
|
+ <goal>help</goal>
|
|
+ <description>Display help information on maven-failsafe-plugin.
|
|
+Call mvn failsafe:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.</description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>false</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <implementation>org.apache.maven.plugins.maven_failsafe_plugin.HelpMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>detail</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If true, display all settable properties for each goal.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>goal</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The name of the goal for which to show help. If unspecified, all goals will be displayed.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>indentSize</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The number of spaces per indentation level, should be positive.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>lineLength</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The maximum length of a display line, should be positive.</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <detail implementation="boolean" default-value="false">${detail}</detail>
|
|
+ <goal implementation="java.lang.String">${goal}</goal>
|
|
+ <indentSize implementation="int" default-value="2">${indentSize}</indentSize>
|
|
+ <lineLength implementation="int" default-value="80">${lineLength}</lineLength>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>integration-test</goal>
|
|
+ <description>Run integration tests using Surefire.</description>
|
|
+ <requiresDependencyResolution>test</requiresDependencyResolution>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <phase>integration-test</phase>
|
|
+ <implementation>org.apache.maven.plugin.failsafe.IntegrationTestMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>additionalClasspathDependencies</name>
|
|
+ <type>java.util.List<org.apache.maven.model.Dependency></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>additionalClasspathElements</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>argLine</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>childDelegation</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classesDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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}.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classpathDependencyExcludes</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classpathDependencyScopeExclude</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>consoleOutputReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>debugForkedProcess</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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).</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>dependenciesToScan</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>disableXmlReport</name>
|
|
+ <type>java.lang.Boolean</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableAssertions</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableOutErrElements</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableProcessChecker</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.0.0-M4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enablePropertiesElement</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>encoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.0.0-M1</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>environmentVariables</name>
|
|
+ <type>java.util.Map<java.lang.String, java.lang.String></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludeJUnit5Engines</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Provide the ID/s of an JUnit engine to be excluded in the test run.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludedEnvironmentVariables</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludedGroups</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludes</name>
|
|
+ <type>java.util.List<java.lang.String></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <since>2.13</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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 </description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoSpecifiedTests</name>
|
|
+ <type>boolean</type>
|
|
+ <since>3.0.0-M8</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoSpecifiedTestsDeprecated</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.12</since>
|
|
+ <deprecated>Since 3.0.0-M8, use "failsafe.failIfNoSpecifiedTests" instead.</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to "false" to prevent a failure if none of the tests specified in -Dit.test=... are run. Defaults to "true".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoTests</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkCount</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkNode</name>
|
|
+ <type>org.apache.maven.surefire.extensions.ForkNodeFactory</type>
|
|
+ <since>3.0.0-M5</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkedProcessExitTimeoutInSeconds</name>
|
|
+ <type>int</type>
|
|
+ <since>2.20</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkedProcessTimeoutInSeconds</name>
|
|
+ <type>int</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>groups</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includeJUnit5Engines</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Provide the ID/s of an JUnit engine to be included in the test run.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includes</name>
|
|
+ <type>java.util.List<java.lang.String></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <since>2.13</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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 </description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>jdkToolchain</name>
|
|
+ <type>java.util.Map<java.lang.String, java.lang.String></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>junitArtifactName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>jvm</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>objectFactory</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallel</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelOptimized</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelTestsTimeoutForcedInSeconds</name>
|
|
+ <type>double</type>
|
|
+ <since>2.16</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelTestsTimeoutInSeconds</name>
|
|
+ <type>double</type>
|
|
+ <since>2.16</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>perCoreThreadCount</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>printSummary</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Option to print summary of test suites or just print the test cases that have errors.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>promoteUserPropertiesToSystemProperties</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>properties</name>
|
|
+ <type>java.util.Properties</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>redirectTestOutputToFile</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportFormat</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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)</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportNameSuffix</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Base directory where all reports are written to.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>rerunFailingTestsCount</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reuseForks</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>runOrder</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.7</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>runOrderRandomSeed</name>
|
|
+ <type>java.lang.Long</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>shutdown</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.19</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skip</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipAfterFailureCount</name>
|
|
+ <type>int</type>
|
|
+ <since>2.19</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipExec</name>
|
|
+ <type>boolean</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipITs</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4.3-alpha-2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to "true" to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipTests</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>statelessTestsetInfoReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>statelessTestsetReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>suiteXmlFiles</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <since>2.2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(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).</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>summaryFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The summary file to write integration test results to.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemProperties</name>
|
|
+ <type>java.util.Properties</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemPropertiesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Properties file being used as system properties passed to the provider.
|
|
+See also: systemPropertyVariables for how the effective provider properties are calculated</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemPropertyVariables</name>
|
|
+ <type>java.util.Map<java.lang.String, java.lang.String></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>tempDir</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>test</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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:*].</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testClassesDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testNGArtifactName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testSourceDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCount</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountClasses</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountMethods</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountSuites</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>trimStackTrace</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useFile</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Option to generate a file test report or just output the test report to the console.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useManifestOnlyJar</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4.3</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useModulePath</name>
|
|
+ <type>boolean</type>
|
|
+ <since>3.0.0-M2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useSystemClassLoader</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.3</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useUnlimitedThreads</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>workingDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <additionalClasspathDependencies implementation="java.util.List">${maven.test.additionalClasspathDependencies}</additionalClasspathDependencies>
|
|
+ <additionalClasspathElements implementation="java.lang.String[]">${maven.test.additionalClasspath}</additionalClasspathElements>
|
|
+ <argLine implementation="java.lang.String">${argLine}</argLine>
|
|
+ <childDelegation implementation="boolean" default-value="false">${childDelegation}</childDelegation>
|
|
+ <classpathDependencyExcludes implementation="java.lang.String[]">${maven.test.dependency.excludes}</classpathDependencyExcludes>
|
|
+ <debugForkedProcess implementation="java.lang.String">${maven.failsafe.debug}</debugForkedProcess>
|
|
+ <dependenciesToScan implementation="java.lang.String[]">${dependenciesToScan}</dependenciesToScan>
|
|
+ <disableXmlReport implementation="java.lang.Boolean" default-value="false">${disableXmlReport}</disableXmlReport>
|
|
+ <enableAssertions implementation="boolean" default-value="true">${enableAssertions}</enableAssertions>
|
|
+ <enableOutErrElements implementation="boolean" default-value="true">${enableOutErrElements}</enableOutErrElements>
|
|
+ <enableProcessChecker implementation="java.lang.String">${failsafe.enableProcessChecker}</enableProcessChecker>
|
|
+ <enablePropertiesElement implementation="boolean" default-value="true">${enablePropertiesElement}</enablePropertiesElement>
|
|
+ <encoding implementation="java.lang.String" default-value="${project.reporting.outputEncoding}">${encoding}</encoding>
|
|
+ <excludeJUnit5Engines implementation="java.lang.String[]">${failsafe.excludeJUnit5Engines}</excludeJUnit5Engines>
|
|
+ <excludedEnvironmentVariables implementation="java.lang.String[]">${failsafe.excludedEnvironmentVariables}</excludedEnvironmentVariables>
|
|
+ <excludedGroups implementation="java.lang.String">${excludedGroups}</excludedGroups>
|
|
+ <excludes implementation="java.util.List">${failsafe.excludes}</excludes>
|
|
+ <excludesFile implementation="java.io.File">${failsafe.excludesFile}</excludesFile>
|
|
+ <failIfNoSpecifiedTests implementation="boolean" default-value="true">${failsafe.failIfNoSpecifiedTests}</failIfNoSpecifiedTests>
|
|
+ <failIfNoSpecifiedTestsDeprecated implementation="boolean" default-value="true">${it.failIfNoSpecifiedTests}</failIfNoSpecifiedTestsDeprecated>
|
|
+ <failIfNoTests implementation="boolean" default-value="false">${failIfNoTests}</failIfNoTests>
|
|
+ <forkCount implementation="java.lang.String" default-value="1">${forkCount}</forkCount>
|
|
+ <forkNode implementation="org.apache.maven.surefire.extensions.ForkNodeFactory">${failsafe.forkNode}</forkNode>
|
|
+ <forkedProcessExitTimeoutInSeconds implementation="int" default-value="30">${failsafe.exitTimeout}</forkedProcessExitTimeoutInSeconds>
|
|
+ <forkedProcessTimeoutInSeconds implementation="int">${failsafe.timeout}</forkedProcessTimeoutInSeconds>
|
|
+ <groups implementation="java.lang.String">${groups}</groups>
|
|
+ <includeJUnit5Engines implementation="java.lang.String[]">${failsafe.includeJUnit5Engines}</includeJUnit5Engines>
|
|
+ <includes implementation="java.util.List">${failsafe.includes}</includes>
|
|
+ <includesFile implementation="java.io.File">${failsafe.includesFile}</includesFile>
|
|
+ <junitArtifactName implementation="java.lang.String" default-value="junit:junit">${junitArtifactName}</junitArtifactName>
|
|
+ <jvm implementation="java.lang.String">${jvm}</jvm>
|
|
+ <objectFactory implementation="java.lang.String">${objectFactory}</objectFactory>
|
|
+ <parallel implementation="java.lang.String">${parallel}</parallel>
|
|
+ <parallelOptimized implementation="boolean" default-value="true">${parallelOptimized}</parallelOptimized>
|
|
+ <parallelTestsTimeoutForcedInSeconds implementation="double">${failsafe.parallel.forcedTimeout}</parallelTestsTimeoutForcedInSeconds>
|
|
+ <parallelTestsTimeoutInSeconds implementation="double">${failsafe.parallel.timeout}</parallelTestsTimeoutInSeconds>
|
|
+ <perCoreThreadCount implementation="boolean" default-value="true">${perCoreThreadCount}</perCoreThreadCount>
|
|
+ <printSummary implementation="boolean" default-value="true">${failsafe.printSummary}</printSummary>
|
|
+ <promoteUserPropertiesToSystemProperties implementation="boolean" default-value="true"/>
|
|
+ <redirectTestOutputToFile implementation="boolean" default-value="false">${maven.test.redirectTestOutputToFile}</redirectTestOutputToFile>
|
|
+ <reportFormat implementation="java.lang.String" default-value="brief">${failsafe.reportFormat}</reportFormat>
|
|
+ <reportNameSuffix implementation="java.lang.String" default-value="">${surefire.reportNameSuffix}</reportNameSuffix>
|
|
+ <reportsDirectory implementation="java.io.File" default-value="${project.build.directory}/failsafe-reports"/>
|
|
+ <rerunFailingTestsCount implementation="int" default-value="0">${failsafe.rerunFailingTestsCount}</rerunFailingTestsCount>
|
|
+ <reuseForks implementation="boolean" default-value="true">${reuseForks}</reuseForks>
|
|
+ <runOrder implementation="java.lang.String" default-value="filesystem">${failsafe.runOrder}</runOrder>
|
|
+ <runOrderRandomSeed implementation="java.lang.Long">${failsafe.runOrder.random.seed}</runOrderRandomSeed>
|
|
+ <shutdown implementation="java.lang.String" default-value="exit">${failsafe.shutdown}</shutdown>
|
|
+ <skip implementation="boolean" default-value="false">${maven.test.skip}</skip>
|
|
+ <skipAfterFailureCount implementation="int" default-value="0">${failsafe.skipAfterFailureCount}</skipAfterFailureCount>
|
|
+ <skipExec implementation="boolean">${maven.test.skip.exec}</skipExec>
|
|
+ <skipITs implementation="boolean">${skipITs}</skipITs>
|
|
+ <skipTests implementation="boolean" default-value="false">${skipTests}</skipTests>
|
|
+ <suiteXmlFiles implementation="java.io.File[]">${failsafe.suiteXmlFiles}</suiteXmlFiles>
|
|
+ <summaryFile implementation="java.io.File" default-value="${project.build.directory}/failsafe-reports/failsafe-summary.xml"/>
|
|
+ <systemPropertiesFile implementation="java.io.File">${failsafe.systemPropertiesFile}</systemPropertiesFile>
|
|
+ <tempDir implementation="java.lang.String" default-value="surefire">${tempDir}</tempDir>
|
|
+ <test implementation="java.lang.String">${it.test}</test>
|
|
+ <testClassesDirectory implementation="java.io.File" default-value="${project.build.testOutputDirectory}"/>
|
|
+ <testNGArtifactName implementation="java.lang.String" default-value="org.testng:testng">${testNGArtifactName}</testNGArtifactName>
|
|
+ <testSourceDirectory implementation="java.io.File" default-value="${project.build.testSourceDirectory}"/>
|
|
+ <threadCount implementation="int">${threadCount}</threadCount>
|
|
+ <threadCountClasses implementation="int" default-value="0">${threadCountClasses}</threadCountClasses>
|
|
+ <threadCountMethods implementation="int" default-value="0">${threadCountMethods}</threadCountMethods>
|
|
+ <threadCountSuites implementation="int" default-value="0">${threadCountSuites}</threadCountSuites>
|
|
+ <trimStackTrace implementation="boolean" default-value="false">${trimStackTrace}</trimStackTrace>
|
|
+ <useFile implementation="boolean" default-value="true">${failsafe.useFile}</useFile>
|
|
+ <useManifestOnlyJar implementation="boolean" default-value="true">${failsafe.useManifestOnlyJar}</useManifestOnlyJar>
|
|
+ <useModulePath implementation="boolean" default-value="true">${failsafe.useModulePath}</useModulePath>
|
|
+ <useSystemClassLoader implementation="boolean" default-value="true">${failsafe.useSystemClassLoader}</useSystemClassLoader>
|
|
+ <useUnlimitedThreads implementation="boolean" default-value="false">${useUnlimitedThreads}</useUnlimitedThreads>
|
|
+ <workingDirectory implementation="java.io.File">${basedir}</workingDirectory>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>verify</goal>
|
|
+ <description>Verify integration tests ran using Failsafe.</description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <phase>verify</phase>
|
|
+ <implementation>org.apache.maven.plugin.failsafe.VerifyMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>basedir</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The base directory of the project being tested. This can be obtained in your unit test by System.getProperty("basedir").</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>encoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <deprecated>since of 2.20.1</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The character encoding scheme to be applied. Deprecated since 2.20.1 and used encoding UTF-8 in failsafe-summary.xml.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoTests</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to "true" to cause a failure if there are no tests to run. Defaults to "false".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failOnFlakeCount</name>
|
|
+ <type>int</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Base directory where all reports are written to.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skip</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipExec</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.3</since>
|
|
+ <deprecated>Use -DskipTests instead.</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>This old parameter is just like skipTests, but bound to the old property maven.test.skip.exec.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipITs</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4.3-alpha-2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to 'true' to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipTests</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to 'true' to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>summaryFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The summary file to read integration test results from.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>summaryFiles</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <since>2.6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Additional summary files to read integration test results from.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testClassesDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The directory containing generated test classes of the project being tested. This will be included at the beginning the test classpath.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testFailureIgnore</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion.</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <basedir implementation="java.io.File" default-value="${basedir}"/>
|
|
+ <encoding implementation="java.lang.String" default-value="${project.reporting.outputEncoding}">${encoding}</encoding>
|
|
+ <failIfNoTests implementation="boolean" default-value="false">${failIfNoTests}</failIfNoTests>
|
|
+ <failOnFlakeCount implementation="int" default-value="0">${failsafe.failOnFlakeCount}</failOnFlakeCount>
|
|
+ <reportsDirectory implementation="java.io.File" default-value="${project.build.directory}/failsafe-reports"/>
|
|
+ <skip implementation="boolean" default-value="false">${maven.test.skip}</skip>
|
|
+ <skipExec implementation="boolean">${maven.test.skip.exec}</skipExec>
|
|
+ <skipITs implementation="boolean">${skipITs}</skipITs>
|
|
+ <skipTests implementation="boolean">${skipTests}</skipTests>
|
|
+ <summaryFile implementation="java.io.File" default-value="${project.build.directory}/failsafe-reports/failsafe-summary.xml"/>
|
|
+ <testClassesDirectory implementation="java.io.File" default-value="${project.build.testOutputDirectory}"/>
|
|
+ <testFailureIgnore implementation="boolean" default-value="false">${maven.test.failure.ignore}</testFailureIgnore>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ </mojos>
|
|
+</plugin>
|
|
diff -urEbwBN 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
|
|
--- a/maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml 1970-01-01 01:00:00.000000000 +0100
|
|
+++ b/maven-failsafe-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml 2024-11-04 10:44:32.820687653 +0100
|
|
@@ -0,0 +1,1175 @@
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
+
|
|
+<!-- Generated by maven-plugin-tools 3.15-->
|
|
+
|
|
+<plugin>
|
|
+ <name>${project.name}</name>
|
|
+ <description>${project.description}</description>
|
|
+ <groupId>${project.groupId}</groupId>
|
|
+ <artifactId>${project.artifactId}</artifactId>
|
|
+ <version>${project.version}</version>
|
|
+ <goalPrefix>failsafe</goalPrefix>
|
|
+ <isolatedRealm>false</isolatedRealm>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <requiredJavaVersion>1.8</requiredJavaVersion>
|
|
+ <requiredMavenVersion>3.6.3</requiredMavenVersion>
|
|
+ <mojos>
|
|
+ <mojo>
|
|
+ <goal>help</goal>
|
|
+ <description>Display help information on maven-failsafe-plugin.
|
|
+Call mvn failsafe:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.</description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>false</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <implementation>org.apache.maven.plugins.maven_failsafe_plugin.HelpMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>detail</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If true, display all settable properties for each goal.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>goal</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The name of the goal for which to show help. If unspecified, all goals will be displayed.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>indentSize</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The number of spaces per indentation level, should be positive.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>lineLength</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The maximum length of a display line, should be positive.</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <detail implementation="boolean" default-value="false">${detail}</detail>
|
|
+ <goal implementation="java.lang.String">${goal}</goal>
|
|
+ <indentSize implementation="int" default-value="2">${indentSize}</indentSize>
|
|
+ <lineLength implementation="int" default-value="80">${lineLength}</lineLength>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>integration-test</goal>
|
|
+ <description>Run integration tests using Surefire.</description>
|
|
+ <requiresDependencyResolution>test</requiresDependencyResolution>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <phase>integration-test</phase>
|
|
+ <implementation>org.apache.maven.plugin.failsafe.IntegrationTestMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>additionalClasspathDependencies</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>additionalClasspathElements</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>argLine</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>basedir</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>childDelegation</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classesDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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}.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classpathDependencyExcludes</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classpathDependencyScopeExclude</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>consoleOutputReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>debugForkedProcess</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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).</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>defaultClassesDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>dependenciesToScan</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>disableXmlReport</name>
|
|
+ <type>java.lang.Boolean</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableAssertions</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableOutErrElements</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableProcessChecker</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.0.0-M4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enablePropertiesElement</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>encoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.0.0-M1</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>environmentVariables</name>
|
|
+ <type>java.util.Map</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludeJUnit5Engines</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Provide the ID/s of an JUnit engine to be excluded in the test run.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludedEnvironmentVariables</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludedGroups</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludes</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <since>2.13</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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 </description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoSpecifiedTests</name>
|
|
+ <type>boolean</type>
|
|
+ <since>3.0.0-M8</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoSpecifiedTestsDeprecated</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.12</since>
|
|
+ <deprecated>Since 3.0.0-M8, use "failsafe.failIfNoSpecifiedTests" instead.</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to "false" to prevent a failure if none of the tests specified in -Dit.test=... are run. Defaults to "true".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoTests</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkCount</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkNode</name>
|
|
+ <type>org.apache.maven.surefire.extensions.ForkNodeFactory</type>
|
|
+ <since>3.0.0-M5</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkedProcessExitTimeoutInSeconds</name>
|
|
+ <type>int</type>
|
|
+ <since>2.20</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkedProcessTimeoutInSeconds</name>
|
|
+ <type>int</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>groups</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includeJUnit5Engines</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Provide the ID/s of an JUnit engine to be included in the test run.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includes</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <since>2.13</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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 </description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>jdkToolchain</name>
|
|
+ <type>java.util.Map</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>junitArtifactName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>jvm</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>objectFactory</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallel</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelMavenExecution</name>
|
|
+ <type>java.lang.Boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelOptimized</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelTestsTimeoutForcedInSeconds</name>
|
|
+ <type>double</type>
|
|
+ <since>2.16</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelTestsTimeoutInSeconds</name>
|
|
+ <type>double</type>
|
|
+ <since>2.16</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>perCoreThreadCount</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>pluginArtifactMap</name>
|
|
+ <type>java.util.Map</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>pluginDescriptor</name>
|
|
+ <type>org.apache.maven.plugin.descriptor.PluginDescriptor</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>printSummary</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Option to print summary of test suites or just print the test cases that have errors.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>project</name>
|
|
+ <type>org.apache.maven.project.MavenProject</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>projectArtifactMap</name>
|
|
+ <type>java.util.Map</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>projectBuildDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>promoteUserPropertiesToSystemProperties</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>properties</name>
|
|
+ <type>java.util.Properties</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>redirectTestOutputToFile</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportFormat</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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)</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportNameSuffix</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Base directory where all reports are written to.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>rerunFailingTestsCount</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reuseForks</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>runOrder</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.7</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>runOrderRandomSeed</name>
|
|
+ <type>java.lang.Long</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>session</name>
|
|
+ <type>org.apache.maven.execution.MavenSession</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>shutdown</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.19</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skip</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipAfterFailureCount</name>
|
|
+ <type>int</type>
|
|
+ <since>2.19</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipExec</name>
|
|
+ <type>boolean</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipITs</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4.3-alpha-2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to "true" to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipTests</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>statelessTestsetInfoReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>statelessTestsetReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>suiteXmlFiles</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <since>2.2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(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).</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>summaryFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The summary file to write integration test results to.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemProperties</name>
|
|
+ <type>java.util.Properties</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemPropertiesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Properties file being used as system properties passed to the provider.
|
|
+See also: systemPropertyVariables for how the effective provider properties are calculated</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemPropertyVariables</name>
|
|
+ <type>java.util.Map</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>tempDir</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>test</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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:*].</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testClassesDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testNGArtifactName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testSourceDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCount</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountClasses</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountMethods</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountSuites</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>trimStackTrace</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useFile</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Option to generate a file test report or just output the test report to the console.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useManifestOnlyJar</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4.3</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useModulePath</name>
|
|
+ <type>boolean</type>
|
|
+ <since>3.0.0-M2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useSystemClassLoader</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.3</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useUnlimitedThreads</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>workingDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <additionalClasspathDependencies implementation="java.util.List">${maven.test.additionalClasspathDependencies}</additionalClasspathDependencies>
|
|
+ <additionalClasspathElements implementation="java.lang.String[]">${maven.test.additionalClasspath}</additionalClasspathElements>
|
|
+ <argLine implementation="java.lang.String">${argLine}</argLine>
|
|
+ <basedir implementation="java.io.File" default-value="${basedir}"/>
|
|
+ <childDelegation implementation="boolean" default-value="false">${childDelegation}</childDelegation>
|
|
+ <classpathDependencyExcludes implementation="java.lang.String[]">${maven.test.dependency.excludes}</classpathDependencyExcludes>
|
|
+ <debugForkedProcess implementation="java.lang.String">${maven.failsafe.debug}</debugForkedProcess>
|
|
+ <defaultClassesDirectory implementation="java.io.File" default-value="${project.build.outputDirectory}"/>
|
|
+ <dependenciesToScan implementation="java.lang.String[]">${dependenciesToScan}</dependenciesToScan>
|
|
+ <disableXmlReport implementation="java.lang.Boolean" default-value="false">${disableXmlReport}</disableXmlReport>
|
|
+ <enableAssertions implementation="boolean" default-value="true">${enableAssertions}</enableAssertions>
|
|
+ <enableOutErrElements implementation="boolean" default-value="true">${enableOutErrElements}</enableOutErrElements>
|
|
+ <enableProcessChecker implementation="java.lang.String">${failsafe.enableProcessChecker}</enableProcessChecker>
|
|
+ <enablePropertiesElement implementation="boolean" default-value="true">${enablePropertiesElement}</enablePropertiesElement>
|
|
+ <encoding implementation="java.lang.String" default-value="${project.reporting.outputEncoding}">${encoding}</encoding>
|
|
+ <excludeJUnit5Engines implementation="java.lang.String[]">${failsafe.excludeJUnit5Engines}</excludeJUnit5Engines>
|
|
+ <excludedEnvironmentVariables implementation="java.lang.String[]">${failsafe.excludedEnvironmentVariables}</excludedEnvironmentVariables>
|
|
+ <excludedGroups implementation="java.lang.String">${excludedGroups}</excludedGroups>
|
|
+ <excludes implementation="java.util.List">${failsafe.excludes}</excludes>
|
|
+ <excludesFile implementation="java.io.File">${failsafe.excludesFile}</excludesFile>
|
|
+ <failIfNoSpecifiedTests implementation="boolean" default-value="true">${failsafe.failIfNoSpecifiedTests}</failIfNoSpecifiedTests>
|
|
+ <failIfNoSpecifiedTestsDeprecated implementation="boolean" default-value="true">${it.failIfNoSpecifiedTests}</failIfNoSpecifiedTestsDeprecated>
|
|
+ <failIfNoTests implementation="boolean" default-value="false">${failIfNoTests}</failIfNoTests>
|
|
+ <forkCount implementation="java.lang.String" default-value="1">${forkCount}</forkCount>
|
|
+ <forkNode implementation="org.apache.maven.surefire.extensions.ForkNodeFactory">${failsafe.forkNode}</forkNode>
|
|
+ <forkedProcessExitTimeoutInSeconds implementation="int" default-value="30">${failsafe.exitTimeout}</forkedProcessExitTimeoutInSeconds>
|
|
+ <forkedProcessTimeoutInSeconds implementation="int">${failsafe.timeout}</forkedProcessTimeoutInSeconds>
|
|
+ <groups implementation="java.lang.String">${groups}</groups>
|
|
+ <includeJUnit5Engines implementation="java.lang.String[]">${failsafe.includeJUnit5Engines}</includeJUnit5Engines>
|
|
+ <includes implementation="java.util.List">${failsafe.includes}</includes>
|
|
+ <includesFile implementation="java.io.File">${failsafe.includesFile}</includesFile>
|
|
+ <junitArtifactName implementation="java.lang.String" default-value="junit:junit">${junitArtifactName}</junitArtifactName>
|
|
+ <jvm implementation="java.lang.String">${jvm}</jvm>
|
|
+ <objectFactory implementation="java.lang.String">${objectFactory}</objectFactory>
|
|
+ <parallel implementation="java.lang.String">${parallel}</parallel>
|
|
+ <parallelMavenExecution implementation="java.lang.Boolean" default-value="${session.parallel}"/>
|
|
+ <parallelOptimized implementation="boolean" default-value="true">${parallelOptimized}</parallelOptimized>
|
|
+ <parallelTestsTimeoutForcedInSeconds implementation="double">${failsafe.parallel.forcedTimeout}</parallelTestsTimeoutForcedInSeconds>
|
|
+ <parallelTestsTimeoutInSeconds implementation="double">${failsafe.parallel.timeout}</parallelTestsTimeoutInSeconds>
|
|
+ <perCoreThreadCount implementation="boolean" default-value="true">${perCoreThreadCount}</perCoreThreadCount>
|
|
+ <pluginArtifactMap implementation="java.util.Map">${plugin.artifactMap}</pluginArtifactMap>
|
|
+ <pluginDescriptor implementation="org.apache.maven.plugin.descriptor.PluginDescriptor" default-value="${plugin}"/>
|
|
+ <printSummary implementation="boolean" default-value="true">${failsafe.printSummary}</printSummary>
|
|
+ <project implementation="org.apache.maven.project.MavenProject" default-value="${project}"/>
|
|
+ <projectArtifactMap implementation="java.util.Map">${project.artifactMap}</projectArtifactMap>
|
|
+ <projectBuildDirectory implementation="java.io.File" default-value="${project.build.directory}"/>
|
|
+ <promoteUserPropertiesToSystemProperties implementation="boolean" default-value="true"/>
|
|
+ <redirectTestOutputToFile implementation="boolean" default-value="false">${maven.test.redirectTestOutputToFile}</redirectTestOutputToFile>
|
|
+ <reportFormat implementation="java.lang.String" default-value="brief">${failsafe.reportFormat}</reportFormat>
|
|
+ <reportNameSuffix implementation="java.lang.String" default-value="">${surefire.reportNameSuffix}</reportNameSuffix>
|
|
+ <reportsDirectory implementation="java.io.File" default-value="${project.build.directory}/failsafe-reports"/>
|
|
+ <rerunFailingTestsCount implementation="int" default-value="0">${failsafe.rerunFailingTestsCount}</rerunFailingTestsCount>
|
|
+ <reuseForks implementation="boolean" default-value="true">${reuseForks}</reuseForks>
|
|
+ <runOrder implementation="java.lang.String" default-value="filesystem">${failsafe.runOrder}</runOrder>
|
|
+ <runOrderRandomSeed implementation="java.lang.Long">${failsafe.runOrder.random.seed}</runOrderRandomSeed>
|
|
+ <session implementation="org.apache.maven.execution.MavenSession" default-value="${session}"/>
|
|
+ <shutdown implementation="java.lang.String" default-value="exit">${failsafe.shutdown}</shutdown>
|
|
+ <skip implementation="boolean" default-value="false">${maven.test.skip}</skip>
|
|
+ <skipAfterFailureCount implementation="int" default-value="0">${failsafe.skipAfterFailureCount}</skipAfterFailureCount>
|
|
+ <skipExec implementation="boolean">${maven.test.skip.exec}</skipExec>
|
|
+ <skipITs implementation="boolean">${skipITs}</skipITs>
|
|
+ <skipTests implementation="boolean" default-value="false">${skipTests}</skipTests>
|
|
+ <suiteXmlFiles implementation="java.io.File[]">${failsafe.suiteXmlFiles}</suiteXmlFiles>
|
|
+ <summaryFile implementation="java.io.File" default-value="${project.build.directory}/failsafe-reports/failsafe-summary.xml"/>
|
|
+ <systemPropertiesFile implementation="java.io.File">${failsafe.systemPropertiesFile}</systemPropertiesFile>
|
|
+ <tempDir implementation="java.lang.String" default-value="surefire">${tempDir}</tempDir>
|
|
+ <test implementation="java.lang.String">${it.test}</test>
|
|
+ <testClassesDirectory implementation="java.io.File" default-value="${project.build.testOutputDirectory}"/>
|
|
+ <testNGArtifactName implementation="java.lang.String" default-value="org.testng:testng">${testNGArtifactName}</testNGArtifactName>
|
|
+ <testSourceDirectory implementation="java.io.File" default-value="${project.build.testSourceDirectory}"/>
|
|
+ <threadCount implementation="int">${threadCount}</threadCount>
|
|
+ <threadCountClasses implementation="int" default-value="0">${threadCountClasses}</threadCountClasses>
|
|
+ <threadCountMethods implementation="int" default-value="0">${threadCountMethods}</threadCountMethods>
|
|
+ <threadCountSuites implementation="int" default-value="0">${threadCountSuites}</threadCountSuites>
|
|
+ <trimStackTrace implementation="boolean" default-value="false">${trimStackTrace}</trimStackTrace>
|
|
+ <useFile implementation="boolean" default-value="true">${failsafe.useFile}</useFile>
|
|
+ <useManifestOnlyJar implementation="boolean" default-value="true">${failsafe.useManifestOnlyJar}</useManifestOnlyJar>
|
|
+ <useModulePath implementation="boolean" default-value="true">${failsafe.useModulePath}</useModulePath>
|
|
+ <useSystemClassLoader implementation="boolean" default-value="true">${failsafe.useSystemClassLoader}</useSystemClassLoader>
|
|
+ <useUnlimitedThreads implementation="boolean" default-value="false">${useUnlimitedThreads}</useUnlimitedThreads>
|
|
+ <workingDirectory implementation="java.io.File">${basedir}</workingDirectory>
|
|
+ </configuration>
|
|
+ <requirements>
|
|
+ <requirement>
|
|
+ <role>org.codehaus.plexus.languages.java.jpms.LocationManager</role>
|
|
+ <field-name>locationManager</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.codehaus.plexus.logging.Logger</role>
|
|
+ <field-name>logger</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.surefire.providerapi.ProviderDetector</role>
|
|
+ <field-name>providerDetector</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.plugin.surefire.SurefireDependencyResolver</role>
|
|
+ <field-name>surefireDependencyResolver</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.toolchain.ToolchainManager</role>
|
|
+ <field-name>toolchainManager</field-name>
|
|
+ </requirement>
|
|
+ </requirements>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>verify</goal>
|
|
+ <description>Verify integration tests ran using Failsafe.</description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <phase>verify</phase>
|
|
+ <implementation>org.apache.maven.plugin.failsafe.VerifyMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>basedir</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The base directory of the project being tested. This can be obtained in your unit test by System.getProperty("basedir").</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>encoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <deprecated>since of 2.20.1</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The character encoding scheme to be applied. Deprecated since 2.20.1 and used encoding UTF-8 in failsafe-summary.xml.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoTests</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to "true" to cause a failure if there are no tests to run. Defaults to "false".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failOnFlakeCount</name>
|
|
+ <type>int</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Base directory where all reports are written to.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>session</name>
|
|
+ <type>org.apache.maven.execution.MavenSession</type>
|
|
+ <required>false</required>
|
|
+ <editable>false</editable>
|
|
+ <description>The current build session instance.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skip</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipExec</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.3</since>
|
|
+ <deprecated>Use -DskipTests instead.</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>This old parameter is just like skipTests, but bound to the old property maven.test.skip.exec.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipITs</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4.3-alpha-2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to 'true' to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipTests</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to 'true' to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>summaryFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The summary file to read integration test results from.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>summaryFiles</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <since>2.6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Additional summary files to read integration test results from.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testClassesDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The directory containing generated test classes of the project being tested. This will be included at the beginning the test classpath.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testFailureIgnore</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion.</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <basedir implementation="java.io.File" default-value="${basedir}"/>
|
|
+ <encoding implementation="java.lang.String" default-value="${project.reporting.outputEncoding}">${encoding}</encoding>
|
|
+ <failIfNoTests implementation="boolean" default-value="false">${failIfNoTests}</failIfNoTests>
|
|
+ <failOnFlakeCount implementation="int" default-value="0">${failsafe.failOnFlakeCount}</failOnFlakeCount>
|
|
+ <reportsDirectory implementation="java.io.File" default-value="${project.build.directory}/failsafe-reports"/>
|
|
+ <session implementation="org.apache.maven.execution.MavenSession" default-value="${session}"/>
|
|
+ <skip implementation="boolean" default-value="false">${maven.test.skip}</skip>
|
|
+ <skipExec implementation="boolean">${maven.test.skip.exec}</skipExec>
|
|
+ <skipITs implementation="boolean">${skipITs}</skipITs>
|
|
+ <skipTests implementation="boolean">${skipTests}</skipTests>
|
|
+ <summaryFile implementation="java.io.File" default-value="${project.build.directory}/failsafe-reports/failsafe-summary.xml"/>
|
|
+ <testClassesDirectory implementation="java.io.File" default-value="${project.build.testOutputDirectory}"/>
|
|
+ <testFailureIgnore implementation="boolean" default-value="false">${maven.test.failure.ignore}</testFailureIgnore>
|
|
+ </configuration>
|
|
+ <requirements>
|
|
+ <requirement>
|
|
+ <role>org.codehaus.plexus.logging.Logger</role>
|
|
+ <field-name>logger</field-name>
|
|
+ </requirement>
|
|
+ </requirements>
|
|
+ </mojo>
|
|
+ </mojos>
|
|
+ <dependencies>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.commons</groupId>
|
|
+ <artifactId>commons-lang3</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.17.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.shared</groupId>
|
|
+ <artifactId>maven-shared-utils</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.3.4</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>commons-io</groupId>
|
|
+ <artifactId>commons-io</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.17.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.slf4j</groupId>
|
|
+ <artifactId>slf4j-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.7.36</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-logger-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-booter</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-extensions-spi</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-extensions-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>maven-surefire-common</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.codehaus.plexus</groupId>
|
|
+ <artifactId>plexus-java</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.3.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.ow2.asm</groupId>
|
|
+ <artifactId>asm</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>9.6</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>com.thoughtworks.qdox</groupId>
|
|
+ <artifactId>qdox</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.0.3</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.commons</groupId>
|
|
+ <artifactId>commons-compress</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.27.1</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>commons-codec</groupId>
|
|
+ <artifactId>commons-codec</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.16.1</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.resolver</groupId>
|
|
+ <artifactId>maven-resolver-util</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.4.1</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.shared</groupId>
|
|
+ <artifactId>maven-common-artifact-filters</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.4.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.resolver</groupId>
|
|
+ <artifactId>maven-resolver-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.9.22</version>
|
|
+ </dependency>
|
|
+ </dependencies>
|
|
+</plugin>
|
|
diff -urEbwBN 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
|
|
--- a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/maven_failsafe_plugin/HelpMojo.java 1970-01-01 01:00:00.000000000 +0100
|
|
+++ b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/maven_failsafe_plugin/HelpMojo.java 2024-11-04 10:37:46.084598212 +0100
|
|
@@ -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.<br>
|
|
+ * Call <code>mvn failsafe:help -Ddetail=true -Dgoal=<goal-name></code> to display parameter details.
|
|
+ * @author maven-plugin-tools
|
|
+ */
|
|
+@Mojo( name = "help", requiresProject = false, threadSafe = true )
|
|
+public class HelpMojo
|
|
+ extends AbstractMojo
|
|
+{
|
|
+ /**
|
|
+ * If <code>true</code>, 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/<groupId>/<artifactId>/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 );
|
|
+
|
|
+ //<goalPrefix>plugin</goalPrefix>
|
|
+ String goalPrefix = getValue( plugin, "goalPrefix" );
|
|
+
|
|
+ Node mojos1 = getSingleChild( plugin, "mojos" );
|
|
+
|
|
+ List<Node> 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<Node> 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<Node> findNamedChild( Node node, String elementName )
|
|
+ {
|
|
+ List<Node> result = new ArrayList<Node>();
|
|
+ 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<Node> 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<Node> 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 );
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * <p>Repeat a String <code>n</code> times to form a new string.</p>
|
|
+ *
|
|
+ * @param str String to repeat
|
|
+ * @param repeat number of times to repeat str
|
|
+ * @return String with repeated String
|
|
+ * @throws NegativeArraySizeException if <code>repeat < 0</code>
|
|
+ * @throws NullPointerException if str is <code>null</code>
|
|
+ */
|
|
+ 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.
|
|
+ * <b>Note</b>: The last character is always a new line.
|
|
+ *
|
|
+ * @param sb The buffer to append the description, not <code>null</code>.
|
|
+ * @param description The description, not <code>null</code>.
|
|
+ * @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 <code>null</code>.
|
|
+ * @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 <code>null</code>.
|
|
+ * @throws NegativeArraySizeException if <code>indent < 0</code>
|
|
+ */
|
|
+ private static List<String> toLines( String text, int indent, int indentSize, int lineLength )
|
|
+ {
|
|
+ List<String> lines = new ArrayList<String>();
|
|
+
|
|
+ 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 <code>null</code>.
|
|
+ * @param line The line to add, must not be <code>null</code>.
|
|
+ * @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<String> 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 <code>null</code>.
|
|
+ * @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 -urEbwBN 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
|
|
--- a/maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-plugin/plugin-help.xml 1970-01-01 01:00:00.000000000 +0100
|
|
+++ b/maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-plugin/plugin-help.xml 2024-11-04 10:47:52.325388910 +0100
|
|
@@ -0,0 +1,812 @@
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
+
|
|
+<!-- Generated by maven-plugin-tools 3.15 (for help mojo with limited elements)-->
|
|
+
|
|
+<plugin>
|
|
+ <name>${project.name}</name>
|
|
+ <description>${project.description}</description>
|
|
+ <groupId>${project.groupId}</groupId>
|
|
+ <artifactId>${project.artifactId}</artifactId>
|
|
+ <version>${project.version}</version>
|
|
+ <goalPrefix>surefire</goalPrefix>
|
|
+ <mojos>
|
|
+ <mojo>
|
|
+ <goal>help</goal>
|
|
+ <description>Display help information on maven-surefire-plugin.
|
|
+Call mvn surefire:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.</description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>false</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <implementation>org.apache.maven.plugins.maven_surefire_plugin.HelpMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>detail</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If true, display all settable properties for each goal.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>goal</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The name of the goal for which to show help. If unspecified, all goals will be displayed.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>indentSize</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The number of spaces per indentation level, should be positive.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>lineLength</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The maximum length of a display line, should be positive.</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <detail implementation="boolean" default-value="false">${detail}</detail>
|
|
+ <goal implementation="java.lang.String">${goal}</goal>
|
|
+ <indentSize implementation="int" default-value="2">${indentSize}</indentSize>
|
|
+ <lineLength implementation="int" default-value="80">${lineLength}</lineLength>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>test</goal>
|
|
+ <description>Run tests using Surefire.</description>
|
|
+ <requiresDependencyResolution>test</requiresDependencyResolution>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <phase>test</phase>
|
|
+ <implementation>org.apache.maven.plugin.surefire.SurefireMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>additionalClasspathDependencies</name>
|
|
+ <type>java.util.List<org.apache.maven.model.Dependency></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>additionalClasspathElements</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>argLine</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>childDelegation</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classesDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The directory containing generated classes of the project being tested. This will be included after the test classes in the test classpath.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classpathDependencyExcludes</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classpathDependencyScopeExclude</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>consoleOutputReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>debugForkedProcess</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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).</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>dependenciesToScan</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>disableXmlReport</name>
|
|
+ <type>java.lang.Boolean</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableAssertions</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableOutErrElements</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableProcessChecker</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.0.0-M4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enablePropertiesElement</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>encoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.0.0-M1</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>environmentVariables</name>
|
|
+ <type>java.util.Map<java.lang.String, java.lang.String></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludeJUnit5Engines</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Provide the ID/s of an JUnit engine to be excluded in the test run.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludedEnvironmentVariables</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludedGroups</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludes</name>
|
|
+ <type>java.util.List<java.lang.String></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <since>2.13</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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 </description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoSpecifiedTests</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.12</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to "true" to cause a failure if none of the tests specified in -Dtest=... are run. Defaults to "true".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoTests</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failOnFlakeCount</name>
|
|
+ <type>int</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkCount</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkNode</name>
|
|
+ <type>org.apache.maven.surefire.extensions.ForkNodeFactory</type>
|
|
+ <since>3.0.0-M5</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkedProcessExitTimeoutInSeconds</name>
|
|
+ <type>int</type>
|
|
+ <since>2.20</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkedProcessTimeoutInSeconds</name>
|
|
+ <type>int</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>groups</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includeJUnit5Engines</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Provide the ID/s of an JUnit engine to be included in the test run.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includes</name>
|
|
+ <type>java.util.List<java.lang.String></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <since>2.13</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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 </description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>jdkToolchain</name>
|
|
+ <type>java.util.Map<java.lang.String, java.lang.String></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>junitArtifactName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>jvm</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>objectFactory</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallel</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelOptimized</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelTestsTimeoutForcedInSeconds</name>
|
|
+ <type>double</type>
|
|
+ <since>2.16</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelTestsTimeoutInSeconds</name>
|
|
+ <type>double</type>
|
|
+ <since>2.16</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>perCoreThreadCount</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>printSummary</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Option to print summary of test suites or just print the test cases that have errors.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>promoteUserPropertiesToSystemProperties</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>properties</name>
|
|
+ <type>java.util.Properties</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>redirectTestOutputToFile</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportFormat</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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)</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportNameSuffix</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Base directory where all reports are written to.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>rerunFailingTestsCount</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reuseForks</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>runOrder</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.7</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>runOrderRandomSeed</name>
|
|
+ <type>java.lang.Long</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>shutdown</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.19</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skip</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipAfterFailureCount</name>
|
|
+ <type>int</type>
|
|
+ <since>2.19</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipExec</name>
|
|
+ <type>boolean</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipTests</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>statelessTestsetInfoReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>statelessTestsetReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>suiteXmlFiles</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <since>2.2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(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).</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemProperties</name>
|
|
+ <type>java.util.Properties</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemPropertiesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Properties file being used as system properties passed to the provider.
|
|
+See also: AbstractSurefireMojo#systemPropertyVariables systemPropertyVariables for how the effective provider properties are calculated</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemPropertyVariables</name>
|
|
+ <type>java.util.Map<java.lang.String, java.lang.String></type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>tempDir</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>test</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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:*].</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testClassesDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testFailureIgnore</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to "true" to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testNGArtifactName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testSourceDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCount</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountClasses</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountMethods</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountSuites</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>trimStackTrace</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useFile</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Option to generate a file test report or just output the test report to the console.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useManifestOnlyJar</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4.3</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useModulePath</name>
|
|
+ <type>boolean</type>
|
|
+ <since>3.0.0-M2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useSystemClassLoader</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.3</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useUnlimitedThreads</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>workingDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <additionalClasspathDependencies implementation="java.util.List">${maven.test.additionalClasspathDependencies}</additionalClasspathDependencies>
|
|
+ <additionalClasspathElements implementation="java.lang.String[]">${maven.test.additionalClasspath}</additionalClasspathElements>
|
|
+ <argLine implementation="java.lang.String">${argLine}</argLine>
|
|
+ <childDelegation implementation="boolean" default-value="false">${childDelegation}</childDelegation>
|
|
+ <classesDirectory implementation="java.io.File" default-value="${project.build.outputDirectory}"/>
|
|
+ <classpathDependencyExcludes implementation="java.lang.String[]">${maven.test.dependency.excludes}</classpathDependencyExcludes>
|
|
+ <debugForkedProcess implementation="java.lang.String">${maven.surefire.debug}</debugForkedProcess>
|
|
+ <dependenciesToScan implementation="java.lang.String[]">${dependenciesToScan}</dependenciesToScan>
|
|
+ <disableXmlReport implementation="java.lang.Boolean" default-value="false">${disableXmlReport}</disableXmlReport>
|
|
+ <enableAssertions implementation="boolean" default-value="true">${enableAssertions}</enableAssertions>
|
|
+ <enableOutErrElements implementation="boolean" default-value="true">${enableOutErrElements}</enableOutErrElements>
|
|
+ <enableProcessChecker implementation="java.lang.String">${surefire.enableProcessChecker}</enableProcessChecker>
|
|
+ <enablePropertiesElement implementation="boolean" default-value="true">${enablePropertiesElement}</enablePropertiesElement>
|
|
+ <encoding implementation="java.lang.String" default-value="${project.reporting.outputEncoding}">${surefire.encoding}</encoding>
|
|
+ <excludeJUnit5Engines implementation="java.lang.String[]">${surefire.excludeJUnit5Engines}</excludeJUnit5Engines>
|
|
+ <excludedEnvironmentVariables implementation="java.lang.String[]">${surefire.excludedEnvironmentVariables}</excludedEnvironmentVariables>
|
|
+ <excludedGroups implementation="java.lang.String">${excludedGroups}</excludedGroups>
|
|
+ <excludes implementation="java.util.List">${surefire.excludes}</excludes>
|
|
+ <excludesFile implementation="java.io.File">${surefire.excludesFile}</excludesFile>
|
|
+ <failIfNoSpecifiedTests implementation="boolean" default-value="true">${surefire.failIfNoSpecifiedTests}</failIfNoSpecifiedTests>
|
|
+ <failIfNoTests implementation="boolean" default-value="false">${failIfNoTests}</failIfNoTests>
|
|
+ <failOnFlakeCount implementation="int" default-value="0">${surefire.failOnFlakeCount}</failOnFlakeCount>
|
|
+ <forkCount implementation="java.lang.String" default-value="1">${forkCount}</forkCount>
|
|
+ <forkNode implementation="org.apache.maven.surefire.extensions.ForkNodeFactory">${surefire.forkNode}</forkNode>
|
|
+ <forkedProcessExitTimeoutInSeconds implementation="int" default-value="30">${surefire.exitTimeout}</forkedProcessExitTimeoutInSeconds>
|
|
+ <forkedProcessTimeoutInSeconds implementation="int">${surefire.timeout}</forkedProcessTimeoutInSeconds>
|
|
+ <groups implementation="java.lang.String">${groups}</groups>
|
|
+ <includeJUnit5Engines implementation="java.lang.String[]">${surefire.includeJUnit5Engines}</includeJUnit5Engines>
|
|
+ <includes implementation="java.util.List">${surefire.includes}</includes>
|
|
+ <includesFile implementation="java.io.File">${surefire.includesFile}</includesFile>
|
|
+ <junitArtifactName implementation="java.lang.String" default-value="junit:junit">${junitArtifactName}</junitArtifactName>
|
|
+ <jvm implementation="java.lang.String">${jvm}</jvm>
|
|
+ <objectFactory implementation="java.lang.String">${objectFactory}</objectFactory>
|
|
+ <parallel implementation="java.lang.String">${parallel}</parallel>
|
|
+ <parallelOptimized implementation="boolean" default-value="true">${parallelOptimized}</parallelOptimized>
|
|
+ <parallelTestsTimeoutForcedInSeconds implementation="double">${surefire.parallel.forcedTimeout}</parallelTestsTimeoutForcedInSeconds>
|
|
+ <parallelTestsTimeoutInSeconds implementation="double">${surefire.parallel.timeout}</parallelTestsTimeoutInSeconds>
|
|
+ <perCoreThreadCount implementation="boolean" default-value="true">${perCoreThreadCount}</perCoreThreadCount>
|
|
+ <printSummary implementation="boolean" default-value="true">${surefire.printSummary}</printSummary>
|
|
+ <promoteUserPropertiesToSystemProperties implementation="boolean" default-value="true"/>
|
|
+ <redirectTestOutputToFile implementation="boolean" default-value="false">${maven.test.redirectTestOutputToFile}</redirectTestOutputToFile>
|
|
+ <reportFormat implementation="java.lang.String" default-value="brief">${surefire.reportFormat}</reportFormat>
|
|
+ <reportNameSuffix implementation="java.lang.String" default-value="">${surefire.reportNameSuffix}</reportNameSuffix>
|
|
+ <reportsDirectory implementation="java.io.File" default-value="${project.build.directory}/surefire-reports"/>
|
|
+ <rerunFailingTestsCount implementation="int" default-value="0">${surefire.rerunFailingTestsCount}</rerunFailingTestsCount>
|
|
+ <reuseForks implementation="boolean" default-value="true">${reuseForks}</reuseForks>
|
|
+ <runOrder implementation="java.lang.String" default-value="filesystem">${surefire.runOrder}</runOrder>
|
|
+ <runOrderRandomSeed implementation="java.lang.Long">${surefire.runOrder.random.seed}</runOrderRandomSeed>
|
|
+ <shutdown implementation="java.lang.String" default-value="exit">${surefire.shutdown}</shutdown>
|
|
+ <skip implementation="boolean" default-value="false">${maven.test.skip}</skip>
|
|
+ <skipAfterFailureCount implementation="int" default-value="0">${surefire.skipAfterFailureCount}</skipAfterFailureCount>
|
|
+ <skipExec implementation="boolean">${maven.test.skip.exec}</skipExec>
|
|
+ <skipTests implementation="boolean" default-value="false">${skipTests}</skipTests>
|
|
+ <suiteXmlFiles implementation="java.io.File[]">${surefire.suiteXmlFiles}</suiteXmlFiles>
|
|
+ <systemPropertiesFile implementation="java.io.File">${surefire.systemPropertiesFile}</systemPropertiesFile>
|
|
+ <tempDir implementation="java.lang.String" default-value="surefire">${tempDir}</tempDir>
|
|
+ <test implementation="java.lang.String">${test}</test>
|
|
+ <testClassesDirectory implementation="java.io.File" default-value="${project.build.testOutputDirectory}"/>
|
|
+ <testFailureIgnore implementation="boolean" default-value="false">${maven.test.failure.ignore}</testFailureIgnore>
|
|
+ <testNGArtifactName implementation="java.lang.String" default-value="org.testng:testng">${testNGArtifactName}</testNGArtifactName>
|
|
+ <testSourceDirectory implementation="java.io.File" default-value="${project.build.testSourceDirectory}"/>
|
|
+ <threadCount implementation="int">${threadCount}</threadCount>
|
|
+ <threadCountClasses implementation="int" default-value="0">${threadCountClasses}</threadCountClasses>
|
|
+ <threadCountMethods implementation="int" default-value="0">${threadCountMethods}</threadCountMethods>
|
|
+ <threadCountSuites implementation="int" default-value="0">${threadCountSuites}</threadCountSuites>
|
|
+ <trimStackTrace implementation="boolean" default-value="false">${trimStackTrace}</trimStackTrace>
|
|
+ <useFile implementation="boolean" default-value="true">${surefire.useFile}</useFile>
|
|
+ <useManifestOnlyJar implementation="boolean" default-value="true">${surefire.useManifestOnlyJar}</useManifestOnlyJar>
|
|
+ <useModulePath implementation="boolean" default-value="true">${surefire.useModulePath}</useModulePath>
|
|
+ <useSystemClassLoader implementation="boolean" default-value="true">${surefire.useSystemClassLoader}</useSystemClassLoader>
|
|
+ <useUnlimitedThreads implementation="boolean" default-value="false">${useUnlimitedThreads}</useUnlimitedThreads>
|
|
+ <workingDirectory implementation="java.io.File">${basedir}</workingDirectory>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ </mojos>
|
|
+</plugin>
|
|
diff -urEbwBN 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
|
|
--- a/maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml 1970-01-01 01:00:00.000000000 +0100
|
|
+++ b/maven-surefire-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml 2024-11-04 10:48:40.175717003 +0100
|
|
@@ -0,0 +1,1012 @@
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
+
|
|
+<!-- Generated by maven-plugin-tools 3.15-->
|
|
+
|
|
+<plugin>
|
|
+ <name>${project.name}</name>
|
|
+ <description>${project.description}</description>
|
|
+ <groupId>${project.groupId}</groupId>
|
|
+ <artifactId>${project.artifactId}</artifactId>
|
|
+ <version>${project.version}</version>
|
|
+ <goalPrefix>surefire</goalPrefix>
|
|
+ <isolatedRealm>false</isolatedRealm>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <requiredJavaVersion>1.8</requiredJavaVersion>
|
|
+ <requiredMavenVersion>3.6.3</requiredMavenVersion>
|
|
+ <mojos>
|
|
+ <mojo>
|
|
+ <goal>help</goal>
|
|
+ <description>Display help information on maven-surefire-plugin.
|
|
+Call mvn surefire:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.</description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>false</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <implementation>org.apache.maven.plugins.maven_surefire_plugin.HelpMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>detail</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If true, display all settable properties for each goal.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>goal</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The name of the goal for which to show help. If unspecified, all goals will be displayed.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>indentSize</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The number of spaces per indentation level, should be positive.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>lineLength</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The maximum length of a display line, should be positive.</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <detail implementation="boolean" default-value="false">${detail}</detail>
|
|
+ <goal implementation="java.lang.String">${goal}</goal>
|
|
+ <indentSize implementation="int" default-value="2">${indentSize}</indentSize>
|
|
+ <lineLength implementation="int" default-value="80">${lineLength}</lineLength>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>test</goal>
|
|
+ <description>Run tests using Surefire.</description>
|
|
+ <requiresDependencyResolution>test</requiresDependencyResolution>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <phase>test</phase>
|
|
+ <implementation>org.apache.maven.plugin.surefire.SurefireMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>additionalClasspathDependencies</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>additionalClasspathElements</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>argLine</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>basedir</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>childDelegation</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classesDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The directory containing generated classes of the project being tested. This will be included after the test classes in the test classpath.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classpathDependencyExcludes</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>classpathDependencyScopeExclude</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>consoleOutputReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>debugForkedProcess</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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).</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>dependenciesToScan</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>disableXmlReport</name>
|
|
+ <type>java.lang.Boolean</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableAssertions</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableOutErrElements</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enableProcessChecker</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.0.0-M4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>enablePropertiesElement</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>encoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.0.0-M1</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>environmentVariables</name>
|
|
+ <type>java.util.Map</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludeJUnit5Engines</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Provide the ID/s of an JUnit engine to be excluded in the test run.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludedEnvironmentVariables</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludedGroups</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludes</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>excludesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <since>2.13</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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 </description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoSpecifiedTests</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.12</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to "true" to cause a failure if none of the tests specified in -Dtest=... are run. Defaults to "true".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failIfNoTests</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>failOnFlakeCount</name>
|
|
+ <type>int</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkCount</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkNode</name>
|
|
+ <type>org.apache.maven.surefire.extensions.ForkNodeFactory</type>
|
|
+ <since>3.0.0-M5</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkedProcessExitTimeoutInSeconds</name>
|
|
+ <type>int</type>
|
|
+ <since>2.20</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>forkedProcessTimeoutInSeconds</name>
|
|
+ <type>int</type>
|
|
+ <since>2.4</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>groups</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includeJUnit5Engines</name>
|
|
+ <type>java.lang.String[]</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Provide the ID/s of an JUnit engine to be included in the test run.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includes</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>includesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <since>2.13</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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 </description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>jdkToolchain</name>
|
|
+ <type>java.util.Map</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>junitArtifactName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>jvm</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>objectFactory</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallel</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelMavenExecution</name>
|
|
+ <type>java.lang.Boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelOptimized</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelTestsTimeoutForcedInSeconds</name>
|
|
+ <type>double</type>
|
|
+ <since>2.16</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>parallelTestsTimeoutInSeconds</name>
|
|
+ <type>double</type>
|
|
+ <since>2.16</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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".</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>perCoreThreadCount</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>pluginArtifactMap</name>
|
|
+ <type>java.util.Map</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>pluginDescriptor</name>
|
|
+ <type>org.apache.maven.plugin.descriptor.PluginDescriptor</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>printSummary</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Option to print summary of test suites or just print the test cases that have errors.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>project</name>
|
|
+ <type>org.apache.maven.project.MavenProject</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>projectArtifactMap</name>
|
|
+ <type>java.util.Map</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>projectBuildDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>promoteUserPropertiesToSystemProperties</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>properties</name>
|
|
+ <type>java.util.Properties</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>redirectTestOutputToFile</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportFormat</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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)</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportNameSuffix</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Base directory where all reports are written to.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>rerunFailingTestsCount</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reuseForks</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>runOrder</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.7</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>runOrderRandomSeed</name>
|
|
+ <type>java.lang.Long</type>
|
|
+ <since>3.0.0-M6</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>session</name>
|
|
+ <type>org.apache.maven.execution.MavenSession</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>shutdown</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>2.19</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skip</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipAfterFailureCount</name>
|
|
+ <type>int</type>
|
|
+ <since>2.19</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipExec</name>
|
|
+ <type>boolean</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipTests</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>statelessTestsetInfoReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>statelessTestsetReporter</name>
|
|
+ <type>org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>suiteXmlFiles</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <since>2.2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(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).</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemProperties</name>
|
|
+ <type>java.util.Properties</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemPropertiesFile</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Properties file being used as system properties passed to the provider.
|
|
+See also: AbstractSurefireMojo#systemPropertyVariables systemPropertyVariables for how the effective provider properties are calculated</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>systemPropertyVariables</name>
|
|
+ <type>java.util.Map</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>tempDir</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>test</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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:*].</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testClassesDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testFailureIgnore</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Set this to "true" to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testNGArtifactName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>testSourceDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCount</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountClasses</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountMethods</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>threadCountSuites</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>trimStackTrace</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useFile</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Option to generate a file test report or just output the test report to the console.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useManifestOnlyJar</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.4.3</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useModulePath</name>
|
|
+ <type>boolean</type>
|
|
+ <since>3.0.0-M2</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useSystemClassLoader</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.3</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>useUnlimitedThreads</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>workingDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <additionalClasspathDependencies implementation="java.util.List">${maven.test.additionalClasspathDependencies}</additionalClasspathDependencies>
|
|
+ <additionalClasspathElements implementation="java.lang.String[]">${maven.test.additionalClasspath}</additionalClasspathElements>
|
|
+ <argLine implementation="java.lang.String">${argLine}</argLine>
|
|
+ <basedir implementation="java.io.File" default-value="${basedir}"/>
|
|
+ <childDelegation implementation="boolean" default-value="false">${childDelegation}</childDelegation>
|
|
+ <classesDirectory implementation="java.io.File" default-value="${project.build.outputDirectory}"/>
|
|
+ <classpathDependencyExcludes implementation="java.lang.String[]">${maven.test.dependency.excludes}</classpathDependencyExcludes>
|
|
+ <debugForkedProcess implementation="java.lang.String">${maven.surefire.debug}</debugForkedProcess>
|
|
+ <dependenciesToScan implementation="java.lang.String[]">${dependenciesToScan}</dependenciesToScan>
|
|
+ <disableXmlReport implementation="java.lang.Boolean" default-value="false">${disableXmlReport}</disableXmlReport>
|
|
+ <enableAssertions implementation="boolean" default-value="true">${enableAssertions}</enableAssertions>
|
|
+ <enableOutErrElements implementation="boolean" default-value="true">${enableOutErrElements}</enableOutErrElements>
|
|
+ <enableProcessChecker implementation="java.lang.String">${surefire.enableProcessChecker}</enableProcessChecker>
|
|
+ <enablePropertiesElement implementation="boolean" default-value="true">${enablePropertiesElement}</enablePropertiesElement>
|
|
+ <encoding implementation="java.lang.String" default-value="${project.reporting.outputEncoding}">${surefire.encoding}</encoding>
|
|
+ <excludeJUnit5Engines implementation="java.lang.String[]">${surefire.excludeJUnit5Engines}</excludeJUnit5Engines>
|
|
+ <excludedEnvironmentVariables implementation="java.lang.String[]">${surefire.excludedEnvironmentVariables}</excludedEnvironmentVariables>
|
|
+ <excludedGroups implementation="java.lang.String">${excludedGroups}</excludedGroups>
|
|
+ <excludes implementation="java.util.List">${surefire.excludes}</excludes>
|
|
+ <excludesFile implementation="java.io.File">${surefire.excludesFile}</excludesFile>
|
|
+ <failIfNoSpecifiedTests implementation="boolean" default-value="true">${surefire.failIfNoSpecifiedTests}</failIfNoSpecifiedTests>
|
|
+ <failIfNoTests implementation="boolean" default-value="false">${failIfNoTests}</failIfNoTests>
|
|
+ <failOnFlakeCount implementation="int" default-value="0">${surefire.failOnFlakeCount}</failOnFlakeCount>
|
|
+ <forkCount implementation="java.lang.String" default-value="1">${forkCount}</forkCount>
|
|
+ <forkNode implementation="org.apache.maven.surefire.extensions.ForkNodeFactory">${surefire.forkNode}</forkNode>
|
|
+ <forkedProcessExitTimeoutInSeconds implementation="int" default-value="30">${surefire.exitTimeout}</forkedProcessExitTimeoutInSeconds>
|
|
+ <forkedProcessTimeoutInSeconds implementation="int">${surefire.timeout}</forkedProcessTimeoutInSeconds>
|
|
+ <groups implementation="java.lang.String">${groups}</groups>
|
|
+ <includeJUnit5Engines implementation="java.lang.String[]">${surefire.includeJUnit5Engines}</includeJUnit5Engines>
|
|
+ <includes implementation="java.util.List">${surefire.includes}</includes>
|
|
+ <includesFile implementation="java.io.File">${surefire.includesFile}</includesFile>
|
|
+ <junitArtifactName implementation="java.lang.String" default-value="junit:junit">${junitArtifactName}</junitArtifactName>
|
|
+ <jvm implementation="java.lang.String">${jvm}</jvm>
|
|
+ <objectFactory implementation="java.lang.String">${objectFactory}</objectFactory>
|
|
+ <parallel implementation="java.lang.String">${parallel}</parallel>
|
|
+ <parallelMavenExecution implementation="java.lang.Boolean" default-value="${session.parallel}"/>
|
|
+ <parallelOptimized implementation="boolean" default-value="true">${parallelOptimized}</parallelOptimized>
|
|
+ <parallelTestsTimeoutForcedInSeconds implementation="double">${surefire.parallel.forcedTimeout}</parallelTestsTimeoutForcedInSeconds>
|
|
+ <parallelTestsTimeoutInSeconds implementation="double">${surefire.parallel.timeout}</parallelTestsTimeoutInSeconds>
|
|
+ <perCoreThreadCount implementation="boolean" default-value="true">${perCoreThreadCount}</perCoreThreadCount>
|
|
+ <pluginArtifactMap implementation="java.util.Map">${plugin.artifactMap}</pluginArtifactMap>
|
|
+ <pluginDescriptor implementation="org.apache.maven.plugin.descriptor.PluginDescriptor" default-value="${plugin}"/>
|
|
+ <printSummary implementation="boolean" default-value="true">${surefire.printSummary}</printSummary>
|
|
+ <project implementation="org.apache.maven.project.MavenProject" default-value="${project}"/>
|
|
+ <projectArtifactMap implementation="java.util.Map">${project.artifactMap}</projectArtifactMap>
|
|
+ <projectBuildDirectory implementation="java.io.File" default-value="${project.build.directory}"/>
|
|
+ <promoteUserPropertiesToSystemProperties implementation="boolean" default-value="true"/>
|
|
+ <redirectTestOutputToFile implementation="boolean" default-value="false">${maven.test.redirectTestOutputToFile}</redirectTestOutputToFile>
|
|
+ <reportFormat implementation="java.lang.String" default-value="brief">${surefire.reportFormat}</reportFormat>
|
|
+ <reportNameSuffix implementation="java.lang.String" default-value="">${surefire.reportNameSuffix}</reportNameSuffix>
|
|
+ <reportsDirectory implementation="java.io.File" default-value="${project.build.directory}/surefire-reports"/>
|
|
+ <rerunFailingTestsCount implementation="int" default-value="0">${surefire.rerunFailingTestsCount}</rerunFailingTestsCount>
|
|
+ <reuseForks implementation="boolean" default-value="true">${reuseForks}</reuseForks>
|
|
+ <runOrder implementation="java.lang.String" default-value="filesystem">${surefire.runOrder}</runOrder>
|
|
+ <runOrderRandomSeed implementation="java.lang.Long">${surefire.runOrder.random.seed}</runOrderRandomSeed>
|
|
+ <session implementation="org.apache.maven.execution.MavenSession" default-value="${session}"/>
|
|
+ <shutdown implementation="java.lang.String" default-value="exit">${surefire.shutdown}</shutdown>
|
|
+ <skip implementation="boolean" default-value="false">${maven.test.skip}</skip>
|
|
+ <skipAfterFailureCount implementation="int" default-value="0">${surefire.skipAfterFailureCount}</skipAfterFailureCount>
|
|
+ <skipExec implementation="boolean">${maven.test.skip.exec}</skipExec>
|
|
+ <skipTests implementation="boolean" default-value="false">${skipTests}</skipTests>
|
|
+ <suiteXmlFiles implementation="java.io.File[]">${surefire.suiteXmlFiles}</suiteXmlFiles>
|
|
+ <systemPropertiesFile implementation="java.io.File">${surefire.systemPropertiesFile}</systemPropertiesFile>
|
|
+ <tempDir implementation="java.lang.String" default-value="surefire">${tempDir}</tempDir>
|
|
+ <test implementation="java.lang.String">${test}</test>
|
|
+ <testClassesDirectory implementation="java.io.File" default-value="${project.build.testOutputDirectory}"/>
|
|
+ <testFailureIgnore implementation="boolean" default-value="false">${maven.test.failure.ignore}</testFailureIgnore>
|
|
+ <testNGArtifactName implementation="java.lang.String" default-value="org.testng:testng">${testNGArtifactName}</testNGArtifactName>
|
|
+ <testSourceDirectory implementation="java.io.File" default-value="${project.build.testSourceDirectory}"/>
|
|
+ <threadCount implementation="int">${threadCount}</threadCount>
|
|
+ <threadCountClasses implementation="int" default-value="0">${threadCountClasses}</threadCountClasses>
|
|
+ <threadCountMethods implementation="int" default-value="0">${threadCountMethods}</threadCountMethods>
|
|
+ <threadCountSuites implementation="int" default-value="0">${threadCountSuites}</threadCountSuites>
|
|
+ <trimStackTrace implementation="boolean" default-value="false">${trimStackTrace}</trimStackTrace>
|
|
+ <useFile implementation="boolean" default-value="true">${surefire.useFile}</useFile>
|
|
+ <useManifestOnlyJar implementation="boolean" default-value="true">${surefire.useManifestOnlyJar}</useManifestOnlyJar>
|
|
+ <useModulePath implementation="boolean" default-value="true">${surefire.useModulePath}</useModulePath>
|
|
+ <useSystemClassLoader implementation="boolean" default-value="true">${surefire.useSystemClassLoader}</useSystemClassLoader>
|
|
+ <useUnlimitedThreads implementation="boolean" default-value="false">${useUnlimitedThreads}</useUnlimitedThreads>
|
|
+ <workingDirectory implementation="java.io.File">${basedir}</workingDirectory>
|
|
+ </configuration>
|
|
+ <requirements>
|
|
+ <requirement>
|
|
+ <role>org.codehaus.plexus.languages.java.jpms.LocationManager</role>
|
|
+ <field-name>locationManager</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.codehaus.plexus.logging.Logger</role>
|
|
+ <field-name>logger</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.surefire.providerapi.ProviderDetector</role>
|
|
+ <field-name>providerDetector</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.plugin.surefire.SurefireDependencyResolver</role>
|
|
+ <field-name>surefireDependencyResolver</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.toolchain.ToolchainManager</role>
|
|
+ <field-name>toolchainManager</field-name>
|
|
+ </requirement>
|
|
+ </requirements>
|
|
+ </mojo>
|
|
+ </mojos>
|
|
+ <dependencies>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.shared</groupId>
|
|
+ <artifactId>maven-shared-utils</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.3.4</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>commons-io</groupId>
|
|
+ <artifactId>commons-io</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.17.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.slf4j</groupId>
|
|
+ <artifactId>slf4j-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.7.36</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-logger-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.commons</groupId>
|
|
+ <artifactId>commons-lang3</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.17.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-extensions-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>maven-surefire-common</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.codehaus.plexus</groupId>
|
|
+ <artifactId>plexus-java</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.3.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.ow2.asm</groupId>
|
|
+ <artifactId>asm</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>9.6</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>com.thoughtworks.qdox</groupId>
|
|
+ <artifactId>qdox</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.0.3</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.commons</groupId>
|
|
+ <artifactId>commons-compress</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.27.1</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>commons-codec</groupId>
|
|
+ <artifactId>commons-codec</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.16.1</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.resolver</groupId>
|
|
+ <artifactId>maven-resolver-util</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.4.1</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.resolver</groupId>
|
|
+ <artifactId>maven-resolver-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.9.22</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-booter</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-extensions-spi</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.shared</groupId>
|
|
+ <artifactId>maven-common-artifact-filters</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.4.0</version>
|
|
+ </dependency>
|
|
+ </dependencies>
|
|
+</plugin>
|
|
diff -urEbwBN 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
|
|
--- a/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_plugin/HelpMojo.java 1970-01-01 01:00:00.000000000 +0100
|
|
+++ b/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_plugin/HelpMojo.java 2024-11-04 10:41:36.879493528 +0100
|
|
@@ -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.<br>
|
|
+ * Call <code>mvn surefire:help -Ddetail=true -Dgoal=<goal-name></code> to display parameter details.
|
|
+ * @author maven-plugin-tools
|
|
+ */
|
|
+@Mojo( name = "help", requiresProject = false, threadSafe = true )
|
|
+public class HelpMojo
|
|
+ extends AbstractMojo
|
|
+{
|
|
+ /**
|
|
+ * If <code>true</code>, 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/<groupId>/<artifactId>/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 );
|
|
+
|
|
+ //<goalPrefix>plugin</goalPrefix>
|
|
+ String goalPrefix = getValue( plugin, "goalPrefix" );
|
|
+
|
|
+ Node mojos1 = getSingleChild( plugin, "mojos" );
|
|
+
|
|
+ List<Node> 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<Node> 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<Node> findNamedChild( Node node, String elementName )
|
|
+ {
|
|
+ List<Node> result = new ArrayList<Node>();
|
|
+ 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<Node> 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<Node> 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 );
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * <p>Repeat a String <code>n</code> times to form a new string.</p>
|
|
+ *
|
|
+ * @param str String to repeat
|
|
+ * @param repeat number of times to repeat str
|
|
+ * @return String with repeated String
|
|
+ * @throws NegativeArraySizeException if <code>repeat < 0</code>
|
|
+ * @throws NullPointerException if str is <code>null</code>
|
|
+ */
|
|
+ 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.
|
|
+ * <b>Note</b>: The last character is always a new line.
|
|
+ *
|
|
+ * @param sb The buffer to append the description, not <code>null</code>.
|
|
+ * @param description The description, not <code>null</code>.
|
|
+ * @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 <code>null</code>.
|
|
+ * @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 <code>null</code>.
|
|
+ * @throws NegativeArraySizeException if <code>indent < 0</code>
|
|
+ */
|
|
+ private static List<String> toLines( String text, int indent, int indentSize, int lineLength )
|
|
+ {
|
|
+ List<String> lines = new ArrayList<String>();
|
|
+
|
|
+ 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 <code>null</code>.
|
|
+ * @param line The line to add, must not be <code>null</code>.
|
|
+ * @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<String> 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 <code>null</code>.
|
|
+ * @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 -urEbwBN 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
|
|
--- a/maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-report-plugin/plugin-help.xml 1970-01-01 01:00:00.000000000 +0100
|
|
+++ b/maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-surefire-report-plugin/plugin-help.xml 2024-11-04 10:45:39.894480900 +0100
|
|
@@ -0,0 +1,496 @@
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
+
|
|
+<!-- Generated by maven-plugin-tools 3.15 (for help mojo with limited elements)-->
|
|
+
|
|
+<plugin>
|
|
+ <name>${project.name}</name>
|
|
+ <description>${project.description}</description>
|
|
+ <groupId>${project.groupId}</groupId>
|
|
+ <artifactId>${project.artifactId}</artifactId>
|
|
+ <version>${project.version}</version>
|
|
+ <goalPrefix>surefire-report</goalPrefix>
|
|
+ <mojos>
|
|
+ <mojo>
|
|
+ <goal>failsafe-report-only</goal>
|
|
+ <description>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></description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <implementation>org.apache.maven.plugins.surefire.report.FailsafeOnlyReport</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <since>2.10</since>
|
|
+ <threadSafe>false</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>aggregate</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Whether to build an aggregated report at the root, or build individual reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>alwaysGenerateFailsafeReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>customBundle</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.1.0</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Path for a custom bundle instead of using the default one.
|
|
+Using this field, you could change the texts in the generated reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>linkXRef</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>locale</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputFormat</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The filename to use for the report.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputTimestamp</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectories</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Directories containing the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>showSuccess</name>
|
|
+ <type>boolean</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to false, only failures are shown.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>siteDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipFailsafeReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to true the failsafe report generation will be skipped.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>xrefTestLocation</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Location where Test Source XRef is generated for this project.
|
|
+Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <aggregate implementation="boolean" default-value="false">${aggregate}</aggregate>
|
|
+ <alwaysGenerateFailsafeReport implementation="boolean" default-value="false">${alwaysGenerateFailsafeReport}</alwaysGenerateFailsafeReport>
|
|
+ <customBundle implementation="java.lang.String" default-value="${basedir}/src/site/custom/surefire-report.properties"/>
|
|
+ <linkXRef implementation="boolean" default-value="true">${linkXRef}</linkXRef>
|
|
+ <locale implementation="java.lang.String" default-value="default"/>
|
|
+ <outputDirectory implementation="java.io.File" default-value="${project.build.directory}/reports"/>
|
|
+ <outputFormat implementation="java.lang.String">${output.format}</outputFormat>
|
|
+ <outputName implementation="java.lang.String" default-value="failsafe">${outputName}</outputName>
|
|
+ <outputTimestamp implementation="java.lang.String" default-value="${project.build.outputTimestamp}"/>
|
|
+ <showSuccess implementation="boolean" default-value="true">${showSuccess}</showSuccess>
|
|
+ <siteDirectory implementation="java.io.File" default-value="${basedir}/src/site"/>
|
|
+ <skipFailsafeReport implementation="boolean" default-value="false">${skipFailsafeReport}</skipFailsafeReport>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>help</goal>
|
|
+ <description>Display help information on maven-surefire-report-plugin.
|
|
+Call mvn surefire-report:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.</description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>false</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <implementation>org.apache.maven.plugins.maven_surefire_report_plugin.HelpMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>detail</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If true, display all settable properties for each goal.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>goal</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The name of the goal for which to show help. If unspecified, all goals will be displayed.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>indentSize</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The number of spaces per indentation level, should be positive.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>lineLength</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The maximum length of a display line, should be positive.</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <detail implementation="boolean" default-value="false">${detail}</detail>
|
|
+ <goal implementation="java.lang.String">${goal}</goal>
|
|
+ <indentSize implementation="int" default-value="2">${indentSize}</indentSize>
|
|
+ <lineLength implementation="int" default-value="80">${lineLength}</lineLength>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>report</goal>
|
|
+ <description>Creates a nicely formatted Surefire Test Report in html format.</description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>false</inheritedByDefault>
|
|
+ <executePhase>test</executePhase>
|
|
+ <executeLifecycle>surefire</executeLifecycle>
|
|
+ <implementation>org.apache.maven.plugins.surefire.report.SurefireReport</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>false</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>aggregate</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Whether to build an aggregated report at the root, or build individual reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>alwaysGenerateSurefireReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>customBundle</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.1.0</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Path for a custom bundle instead of using the default one.
|
|
+Using this field, you could change the texts in the generated reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>linkXRef</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>locale</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputFormat</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The filename to use for the report.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputTimestamp</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectories</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Directories containing the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>showSuccess</name>
|
|
+ <type>boolean</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to false, only failures are shown.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>siteDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipSurefireReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to true the surefire report generation will be skipped.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>xrefTestLocation</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Location where Test Source XRef is generated for this project.
|
|
+Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <aggregate implementation="boolean" default-value="false">${aggregate}</aggregate>
|
|
+ <alwaysGenerateSurefireReport implementation="boolean" default-value="true">${alwaysGenerateSurefireReport}</alwaysGenerateSurefireReport>
|
|
+ <customBundle implementation="java.lang.String" default-value="${basedir}/src/site/custom/surefire-report.properties"/>
|
|
+ <linkXRef implementation="boolean" default-value="true">${linkXRef}</linkXRef>
|
|
+ <locale implementation="java.lang.String" default-value="default"/>
|
|
+ <outputDirectory implementation="java.io.File" default-value="${project.build.directory}/reports"/>
|
|
+ <outputFormat implementation="java.lang.String">${output.format}</outputFormat>
|
|
+ <outputName implementation="java.lang.String" default-value="surefire">${outputName}</outputName>
|
|
+ <outputTimestamp implementation="java.lang.String" default-value="${project.build.outputTimestamp}"/>
|
|
+ <showSuccess implementation="boolean" default-value="true">${showSuccess}</showSuccess>
|
|
+ <siteDirectory implementation="java.io.File" default-value="${basedir}/src/site"/>
|
|
+ <skipSurefireReport implementation="boolean" default-value="false">${skipSurefireReport}</skipSurefireReport>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>report-only</goal>
|
|
+ <description>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></description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <implementation>org.apache.maven.plugins.surefire.report.SurefireOnlyReport</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <since>2.3</since>
|
|
+ <threadSafe>false</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>aggregate</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Whether to build an aggregated report at the root, or build individual reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>alwaysGenerateSurefireReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>customBundle</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.1.0</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Path for a custom bundle instead of using the default one.
|
|
+Using this field, you could change the texts in the generated reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>linkXRef</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>locale</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputFormat</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The filename to use for the report.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputTimestamp</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectories</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Directories containing the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>showSuccess</name>
|
|
+ <type>boolean</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to false, only failures are shown.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>siteDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipSurefireReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to true the surefire report generation will be skipped.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>xrefTestLocation</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Location where Test Source XRef is generated for this project.
|
|
+Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <aggregate implementation="boolean" default-value="false">${aggregate}</aggregate>
|
|
+ <alwaysGenerateSurefireReport implementation="boolean" default-value="true">${alwaysGenerateSurefireReport}</alwaysGenerateSurefireReport>
|
|
+ <customBundle implementation="java.lang.String" default-value="${basedir}/src/site/custom/surefire-report.properties"/>
|
|
+ <linkXRef implementation="boolean" default-value="true">${linkXRef}</linkXRef>
|
|
+ <locale implementation="java.lang.String" default-value="default"/>
|
|
+ <outputDirectory implementation="java.io.File" default-value="${project.build.directory}/reports"/>
|
|
+ <outputFormat implementation="java.lang.String">${output.format}</outputFormat>
|
|
+ <outputName implementation="java.lang.String" default-value="surefire">${outputName}</outputName>
|
|
+ <outputTimestamp implementation="java.lang.String" default-value="${project.build.outputTimestamp}"/>
|
|
+ <showSuccess implementation="boolean" default-value="true">${showSuccess}</showSuccess>
|
|
+ <siteDirectory implementation="java.io.File" default-value="${basedir}/src/site"/>
|
|
+ <skipSurefireReport implementation="boolean" default-value="false">${skipSurefireReport}</skipSurefireReport>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ </mojos>
|
|
+</plugin>
|
|
diff -urEbwBN 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
|
|
--- a/maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml 1970-01-01 01:00:00.000000000 +0100
|
|
+++ b/maven-surefire-report-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml 2024-11-04 10:46:55.558333020 +0100
|
|
@@ -0,0 +1,958 @@
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
+
|
|
+<!-- Generated by maven-plugin-tools 3.15-->
|
|
+
|
|
+<plugin>
|
|
+ <name>${project.name}</name>
|
|
+ <description>${project.description}</description>
|
|
+ <groupId>${project.groupId}</groupId>
|
|
+ <artifactId>${project.artifactId}</artifactId>
|
|
+ <version>${project.version}</version>
|
|
+ <goalPrefix>surefire-report</goalPrefix>
|
|
+ <isolatedRealm>false</isolatedRealm>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <requiredJavaVersion>1.8</requiredJavaVersion>
|
|
+ <requiredMavenVersion>3.6.3</requiredMavenVersion>
|
|
+ <mojos>
|
|
+ <mojo>
|
|
+ <goal>failsafe-report-only</goal>
|
|
+ <description>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></description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <implementation>org.apache.maven.plugins.surefire.report.FailsafeOnlyReport</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <since>2.10</since>
|
|
+ <threadSafe>false</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>aggregate</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Whether to build an aggregated report at the root, or build individual reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>alwaysGenerateFailsafeReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>customBundle</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.1.0</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Path for a custom bundle instead of using the default one.
|
|
+Using this field, you could change the texts in the generated reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>inputEncoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>linkXRef</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>locale</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>mojoExecution</name>
|
|
+ <type>org.apache.maven.plugin.MojoExecution</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputEncoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputFormat</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The filename to use for the report.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputTimestamp</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>project</name>
|
|
+ <type>org.apache.maven.project.MavenProject</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reactorProjects</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>remoteProjectRepositories</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>repoSession</name>
|
|
+ <type>org.eclipse.aether.RepositorySystemSession</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectories</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Directories containing the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>settings</name>
|
|
+ <type>org.apache.maven.settings.Settings</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description>The current user system settings for use in Maven.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>showSuccess</name>
|
|
+ <type>boolean</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to false, only failures are shown.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>siteDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipFailsafeReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to true the failsafe report generation will be skipped.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>xrefTestLocation</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Location where Test Source XRef is generated for this project.
|
|
+Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <aggregate implementation="boolean" default-value="false">${aggregate}</aggregate>
|
|
+ <alwaysGenerateFailsafeReport implementation="boolean" default-value="false">${alwaysGenerateFailsafeReport}</alwaysGenerateFailsafeReport>
|
|
+ <customBundle implementation="java.lang.String" default-value="${basedir}/src/site/custom/surefire-report.properties"/>
|
|
+ <inputEncoding implementation="java.lang.String" default-value="${project.build.sourceEncoding}">${encoding}</inputEncoding>
|
|
+ <linkXRef implementation="boolean" default-value="true">${linkXRef}</linkXRef>
|
|
+ <locale implementation="java.lang.String" default-value="default"/>
|
|
+ <mojoExecution implementation="org.apache.maven.plugin.MojoExecution" default-value="${mojoExecution}"/>
|
|
+ <outputDirectory implementation="java.io.File" default-value="${project.build.directory}/reports"/>
|
|
+ <outputEncoding implementation="java.lang.String" default-value="${project.reporting.outputEncoding}">${outputEncoding}</outputEncoding>
|
|
+ <outputFormat implementation="java.lang.String">${output.format}</outputFormat>
|
|
+ <outputName implementation="java.lang.String" default-value="failsafe">${outputName}</outputName>
|
|
+ <outputTimestamp implementation="java.lang.String" default-value="${project.build.outputTimestamp}"/>
|
|
+ <project implementation="org.apache.maven.project.MavenProject" default-value="${project}"/>
|
|
+ <reactorProjects implementation="java.util.List" default-value="${reactorProjects}"/>
|
|
+ <remoteProjectRepositories implementation="java.util.List" default-value="${project.remoteProjectRepositories}"/>
|
|
+ <repoSession implementation="org.eclipse.aether.RepositorySystemSession" default-value="${repositorySystemSession}"/>
|
|
+ <settings implementation="org.apache.maven.settings.Settings" default-value="${settings}"/>
|
|
+ <showSuccess implementation="boolean" default-value="true">${showSuccess}</showSuccess>
|
|
+ <siteDirectory implementation="java.io.File" default-value="${basedir}/src/site"/>
|
|
+ <skipFailsafeReport implementation="boolean" default-value="false">${skipFailsafeReport}</skipFailsafeReport>
|
|
+ </configuration>
|
|
+ <requirements>
|
|
+ <requirement>
|
|
+ <role>org.codehaus.plexus.PlexusContainer</role>
|
|
+ <field-name>container</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.codehaus.plexus.i18n.I18N</role>
|
|
+ <field-name>i18n</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.doxia.siterenderer.Renderer</role>
|
|
+ <field-name>siteRenderer</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.doxia.tools.SiteTool</role>
|
|
+ <field-name>siteTool</field-name>
|
|
+ </requirement>
|
|
+ </requirements>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>help</goal>
|
|
+ <description>Display help information on maven-surefire-report-plugin.
|
|
+Call mvn surefire-report:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.</description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>false</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <implementation>org.apache.maven.plugins.maven_surefire_report_plugin.HelpMojo</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>true</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>detail</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If true, display all settable properties for each goal.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>goal</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The name of the goal for which to show help. If unspecified, all goals will be displayed.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>indentSize</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The number of spaces per indentation level, should be positive.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>lineLength</name>
|
|
+ <type>int</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The maximum length of a display line, should be positive.</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <detail implementation="boolean" default-value="false">${detail}</detail>
|
|
+ <goal implementation="java.lang.String">${goal}</goal>
|
|
+ <indentSize implementation="int" default-value="2">${indentSize}</indentSize>
|
|
+ <lineLength implementation="int" default-value="80">${lineLength}</lineLength>
|
|
+ </configuration>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>report</goal>
|
|
+ <description>Creates a nicely formatted Surefire Test Report in html format.</description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>false</inheritedByDefault>
|
|
+ <executePhase>test</executePhase>
|
|
+ <executeLifecycle>surefire</executeLifecycle>
|
|
+ <implementation>org.apache.maven.plugins.surefire.report.SurefireReport</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <threadSafe>false</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>aggregate</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Whether to build an aggregated report at the root, or build individual reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>alwaysGenerateSurefireReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>customBundle</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.1.0</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Path for a custom bundle instead of using the default one.
|
|
+Using this field, you could change the texts in the generated reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>inputEncoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>linkXRef</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>locale</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>mojoExecution</name>
|
|
+ <type>org.apache.maven.plugin.MojoExecution</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputEncoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputFormat</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The filename to use for the report.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputTimestamp</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>project</name>
|
|
+ <type>org.apache.maven.project.MavenProject</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reactorProjects</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>remoteProjectRepositories</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>repoSession</name>
|
|
+ <type>org.eclipse.aether.RepositorySystemSession</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectories</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Directories containing the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>settings</name>
|
|
+ <type>org.apache.maven.settings.Settings</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description>The current user system settings for use in Maven.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>showSuccess</name>
|
|
+ <type>boolean</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to false, only failures are shown.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>siteDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipSurefireReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to true the surefire report generation will be skipped.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>xrefTestLocation</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Location where Test Source XRef is generated for this project.
|
|
+Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <aggregate implementation="boolean" default-value="false">${aggregate}</aggregate>
|
|
+ <alwaysGenerateSurefireReport implementation="boolean" default-value="true">${alwaysGenerateSurefireReport}</alwaysGenerateSurefireReport>
|
|
+ <customBundle implementation="java.lang.String" default-value="${basedir}/src/site/custom/surefire-report.properties"/>
|
|
+ <inputEncoding implementation="java.lang.String" default-value="${project.build.sourceEncoding}">${encoding}</inputEncoding>
|
|
+ <linkXRef implementation="boolean" default-value="true">${linkXRef}</linkXRef>
|
|
+ <locale implementation="java.lang.String" default-value="default"/>
|
|
+ <mojoExecution implementation="org.apache.maven.plugin.MojoExecution" default-value="${mojoExecution}"/>
|
|
+ <outputDirectory implementation="java.io.File" default-value="${project.build.directory}/reports"/>
|
|
+ <outputEncoding implementation="java.lang.String" default-value="${project.reporting.outputEncoding}">${outputEncoding}</outputEncoding>
|
|
+ <outputFormat implementation="java.lang.String">${output.format}</outputFormat>
|
|
+ <outputName implementation="java.lang.String" default-value="surefire">${outputName}</outputName>
|
|
+ <outputTimestamp implementation="java.lang.String" default-value="${project.build.outputTimestamp}"/>
|
|
+ <project implementation="org.apache.maven.project.MavenProject" default-value="${project}"/>
|
|
+ <reactorProjects implementation="java.util.List" default-value="${reactorProjects}"/>
|
|
+ <remoteProjectRepositories implementation="java.util.List" default-value="${project.remoteProjectRepositories}"/>
|
|
+ <repoSession implementation="org.eclipse.aether.RepositorySystemSession" default-value="${repositorySystemSession}"/>
|
|
+ <settings implementation="org.apache.maven.settings.Settings" default-value="${settings}"/>
|
|
+ <showSuccess implementation="boolean" default-value="true">${showSuccess}</showSuccess>
|
|
+ <siteDirectory implementation="java.io.File" default-value="${basedir}/src/site"/>
|
|
+ <skipSurefireReport implementation="boolean" default-value="false">${skipSurefireReport}</skipSurefireReport>
|
|
+ </configuration>
|
|
+ <requirements>
|
|
+ <requirement>
|
|
+ <role>org.codehaus.plexus.PlexusContainer</role>
|
|
+ <field-name>container</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.codehaus.plexus.i18n.I18N</role>
|
|
+ <field-name>i18n</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.doxia.siterenderer.Renderer</role>
|
|
+ <field-name>siteRenderer</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.doxia.tools.SiteTool</role>
|
|
+ <field-name>siteTool</field-name>
|
|
+ </requirement>
|
|
+ </requirements>
|
|
+ </mojo>
|
|
+ <mojo>
|
|
+ <goal>report-only</goal>
|
|
+ <description>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></description>
|
|
+ <requiresDirectInvocation>false</requiresDirectInvocation>
|
|
+ <requiresProject>true</requiresProject>
|
|
+ <requiresReports>false</requiresReports>
|
|
+ <aggregator>false</aggregator>
|
|
+ <requiresOnline>false</requiresOnline>
|
|
+ <inheritedByDefault>true</inheritedByDefault>
|
|
+ <implementation>org.apache.maven.plugins.surefire.report.SurefireOnlyReport</implementation>
|
|
+ <language>java</language>
|
|
+ <instantiationStrategy>per-lookup</instantiationStrategy>
|
|
+ <executionStrategy>once-per-session</executionStrategy>
|
|
+ <since>2.3</since>
|
|
+ <threadSafe>false</threadSafe>
|
|
+ <parameters>
|
|
+ <parameter>
|
|
+ <name>aggregate</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Whether to build an aggregated report at the root, or build individual reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>alwaysGenerateSurefireReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>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.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>customBundle</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <since>3.1.0</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Path for a custom bundle instead of using the default one.
|
|
+Using this field, you could change the texts in the generated reports.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>inputEncoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>linkXRef</name>
|
|
+ <type>boolean</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>locale</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>mojoExecution</name>
|
|
+ <type>org.apache.maven.plugin.MojoExecution</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputEncoding</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputFormat</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputName</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>The filename to use for the report.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>outputTimestamp</name>
|
|
+ <type>java.lang.String</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>project</name>
|
|
+ <type>org.apache.maven.project.MavenProject</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reactorProjects</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>remoteProjectRepositories</name>
|
|
+ <type>java.util.List</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>repoSession</name>
|
|
+ <type>org.eclipse.aether.RepositorySystemSession</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectories</name>
|
|
+ <type>java.io.File[]</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Directories containing the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>reportsDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <deprecated>No reason given</deprecated>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>(Deprecated, use reportsDirectories) This directory contains the XML Report files that will be parsed and rendered to HTML format.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>settings</name>
|
|
+ <type>org.apache.maven.settings.Settings</type>
|
|
+ <required>true</required>
|
|
+ <editable>false</editable>
|
|
+ <description>The current user system settings for use in Maven.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>showSuccess</name>
|
|
+ <type>boolean</type>
|
|
+ <required>true</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to false, only failures are shown.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>siteDirectory</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description></description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>skipSurefireReport</name>
|
|
+ <type>boolean</type>
|
|
+ <since>2.11</since>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>If set to true the surefire report generation will be skipped.</description>
|
|
+ </parameter>
|
|
+ <parameter>
|
|
+ <name>xrefTestLocation</name>
|
|
+ <type>java.io.File</type>
|
|
+ <required>false</required>
|
|
+ <editable>true</editable>
|
|
+ <description>Location where Test Source XRef is generated for this project.
|
|
+Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test</description>
|
|
+ </parameter>
|
|
+ </parameters>
|
|
+ <configuration>
|
|
+ <aggregate implementation="boolean" default-value="false">${aggregate}</aggregate>
|
|
+ <alwaysGenerateSurefireReport implementation="boolean" default-value="true">${alwaysGenerateSurefireReport}</alwaysGenerateSurefireReport>
|
|
+ <customBundle implementation="java.lang.String" default-value="${basedir}/src/site/custom/surefire-report.properties"/>
|
|
+ <inputEncoding implementation="java.lang.String" default-value="${project.build.sourceEncoding}">${encoding}</inputEncoding>
|
|
+ <linkXRef implementation="boolean" default-value="true">${linkXRef}</linkXRef>
|
|
+ <locale implementation="java.lang.String" default-value="default"/>
|
|
+ <mojoExecution implementation="org.apache.maven.plugin.MojoExecution" default-value="${mojoExecution}"/>
|
|
+ <outputDirectory implementation="java.io.File" default-value="${project.build.directory}/reports"/>
|
|
+ <outputEncoding implementation="java.lang.String" default-value="${project.reporting.outputEncoding}">${outputEncoding}</outputEncoding>
|
|
+ <outputFormat implementation="java.lang.String">${output.format}</outputFormat>
|
|
+ <outputName implementation="java.lang.String" default-value="surefire">${outputName}</outputName>
|
|
+ <outputTimestamp implementation="java.lang.String" default-value="${project.build.outputTimestamp}"/>
|
|
+ <project implementation="org.apache.maven.project.MavenProject" default-value="${project}"/>
|
|
+ <reactorProjects implementation="java.util.List" default-value="${reactorProjects}"/>
|
|
+ <remoteProjectRepositories implementation="java.util.List" default-value="${project.remoteProjectRepositories}"/>
|
|
+ <repoSession implementation="org.eclipse.aether.RepositorySystemSession" default-value="${repositorySystemSession}"/>
|
|
+ <settings implementation="org.apache.maven.settings.Settings" default-value="${settings}"/>
|
|
+ <showSuccess implementation="boolean" default-value="true">${showSuccess}</showSuccess>
|
|
+ <siteDirectory implementation="java.io.File" default-value="${basedir}/src/site"/>
|
|
+ <skipSurefireReport implementation="boolean" default-value="false">${skipSurefireReport}</skipSurefireReport>
|
|
+ </configuration>
|
|
+ <requirements>
|
|
+ <requirement>
|
|
+ <role>org.codehaus.plexus.PlexusContainer</role>
|
|
+ <field-name>container</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.codehaus.plexus.i18n.I18N</role>
|
|
+ <field-name>i18n</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.doxia.siterenderer.Renderer</role>
|
|
+ <field-name>siteRenderer</field-name>
|
|
+ </requirement>
|
|
+ <requirement>
|
|
+ <role>org.apache.maven.doxia.tools.SiteTool</role>
|
|
+ <field-name>siteTool</field-name>
|
|
+ </requirement>
|
|
+ </requirements>
|
|
+ </mojo>
|
|
+ </mojos>
|
|
+ <dependencies>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-logger-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
+ <artifactId>surefire-report-parser</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.eclipse.sisu</groupId>
|
|
+ <artifactId>org.eclipse.sisu.plexus</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>0.9.0.M3</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.slf4j</groupId>
|
|
+ <artifactId>slf4j-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.7.36</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.codehaus.plexus</groupId>
|
|
+ <artifactId>plexus-classworlds</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.8.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.codehaus.plexus</groupId>
|
|
+ <artifactId>plexus-component-annotations</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.1.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.eclipse.sisu</groupId>
|
|
+ <artifactId>org.eclipse.sisu.inject</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>0.9.0.M3</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.codehaus.plexus</groupId>
|
|
+ <artifactId>plexus-utils</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>4.0.1</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>javax.inject</groupId>
|
|
+ <artifactId>javax.inject</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.codehaus.plexus</groupId>
|
|
+ <artifactId>plexus-xml</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.0.1</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.shared</groupId>
|
|
+ <artifactId>maven-shared-utils</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.3.4</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>commons-io</groupId>
|
|
+ <artifactId>commons-io</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.17.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.doxia</groupId>
|
|
+ <artifactId>doxia-sink-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.0.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.doxia</groupId>
|
|
+ <artifactId>doxia-core</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.0.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.commons</groupId>
|
|
+ <artifactId>commons-lang3</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.17.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.commons</groupId>
|
|
+ <artifactId>commons-text</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.12.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.reporting</groupId>
|
|
+ <artifactId>maven-reporting-impl</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>4.0.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.doxia</groupId>
|
|
+ <artifactId>doxia-site-renderer</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.0.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.doxia</groupId>
|
|
+ <artifactId>doxia-skin-model</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.0.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.velocity</groupId>
|
|
+ <artifactId>velocity-engine-core</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.4</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.codehaus.plexus</groupId>
|
|
+ <artifactId>plexus-velocity</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.2.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.doxia</groupId>
|
|
+ <artifactId>doxia-module-xhtml5</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.0.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.doxia</groupId>
|
|
+ <artifactId>doxia-module-xdoc</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.0.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.doxia</groupId>
|
|
+ <artifactId>doxia-integration-tools</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.0.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.reporting</groupId>
|
|
+ <artifactId>maven-reporting-api</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>4.0.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven</groupId>
|
|
+ <artifactId>maven-archiver</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.6.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.codehaus.plexus</groupId>
|
|
+ <artifactId>plexus-archiver</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>4.10.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.codehaus.plexus</groupId>
|
|
+ <artifactId>plexus-io</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>3.5.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.tukaani</groupId>
|
|
+ <artifactId>xz</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.9</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.commons</groupId>
|
|
+ <artifactId>commons-compress</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.27.1</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>commons-codec</groupId>
|
|
+ <artifactId>commons-codec</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.16.1</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.doxia</groupId>
|
|
+ <artifactId>doxia-site-model</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.0.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.maven.doxia</groupId>
|
|
+ <artifactId>doxia-module-apt</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>2.0.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.codehaus.plexus</groupId>
|
|
+ <artifactId>plexus-i18n</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.0-beta-10</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.codehaus.plexus</groupId>
|
|
+ <artifactId>plexus-interpolation</artifactId>
|
|
+ <type>jar</type>
|
|
+ <version>1.27</version>
|
|
+ </dependency>
|
|
+ </dependencies>
|
|
+</plugin>
|
|
diff -urEbwBN 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
|
|
--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_report_plugin/HelpMojo.java 1970-01-01 01:00:00.000000000 +0100
|
|
+++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugin/maven_surefire_report_plugin/HelpMojo.java 2024-11-04 10:39:38.158690041 +0100
|
|
@@ -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.<br>
|
|
+ * Call <code>mvn surefire-report:help -Ddetail=true -Dgoal=<goal-name></code> to display parameter details.
|
|
+ * @author maven-plugin-tools
|
|
+ */
|
|
+@Mojo( name = "help", requiresProject = false, threadSafe = true )
|
|
+public class HelpMojo
|
|
+ extends AbstractMojo
|
|
+{
|
|
+ /**
|
|
+ * If <code>true</code>, 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/<groupId>/<artifactId>/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 );
|
|
+
|
|
+ //<goalPrefix>plugin</goalPrefix>
|
|
+ String goalPrefix = getValue( plugin, "goalPrefix" );
|
|
+
|
|
+ Node mojos1 = getSingleChild( plugin, "mojos" );
|
|
+
|
|
+ List<Node> 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<Node> 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<Node> findNamedChild( Node node, String elementName )
|
|
+ {
|
|
+ List<Node> result = new ArrayList<Node>();
|
|
+ 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<Node> 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<Node> 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 );
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * <p>Repeat a String <code>n</code> times to form a new string.</p>
|
|
+ *
|
|
+ * @param str String to repeat
|
|
+ * @param repeat number of times to repeat str
|
|
+ * @return String with repeated String
|
|
+ * @throws NegativeArraySizeException if <code>repeat < 0</code>
|
|
+ * @throws NullPointerException if str is <code>null</code>
|
|
+ */
|
|
+ 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.
|
|
+ * <b>Note</b>: The last character is always a new line.
|
|
+ *
|
|
+ * @param sb The buffer to append the description, not <code>null</code>.
|
|
+ * @param description The description, not <code>null</code>.
|
|
+ * @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 <code>null</code>.
|
|
+ * @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 <code>null</code>.
|
|
+ * @throws NegativeArraySizeException if <code>indent < 0</code>
|
|
+ */
|
|
+ private static List<String> toLines( String text, int indent, int indentSize, int lineLength )
|
|
+ {
|
|
+ List<String> lines = new ArrayList<String>();
|
|
+
|
|
+ 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 <code>null</code>.
|
|
+ * @param line The line to add, must not be <code>null</code>.
|
|
+ * @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<String> 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 <code>null</code>.
|
|
+ * @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;
|
|
+ }
|
|
+}
|