commit ceffb6c96c49cd7f6b039aa7dd7c1a6f6b9baae780eb252791bf032233768056 Author: Fridrich Strba Date: Tue Oct 1 22:53:45 2024 +0000 move out of test OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-surefire?expand=0&rev=42 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Port-to-TestNG-7.4.0.patch b/0001-Port-to-TestNG-7.4.0.patch new file mode 100644 index 0000000..c77afca --- /dev/null +++ b/0001-Port-to-TestNG-7.4.0.patch @@ -0,0 +1,54 @@ +From 900884b9e9f4d359d173bfb0251ccdc44d885f11 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Mon, 10 Jul 2017 10:37:50 +0200 +Subject: [PATCH 1/2] Port to TestNG 7.4.0 + +--- + surefire-providers/surefire-testng/pom.xml | 3 +-- + .../maven/surefire/testng/conf/AbstractDirectConfigurator.java | 2 +- + .../maven/surefire/testng/conf/TestNGMapConfigurator.java | 2 +- + 3 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/surefire-providers/surefire-testng/pom.xml b/surefire-providers/surefire-testng/pom.xml +index 0bd39be71..19e1b6e32 100644 +--- a/surefire-providers/surefire-testng/pom.xml ++++ b/surefire-providers/surefire-testng/pom.xml +@@ -56,8 +56,7 @@ + + org.testng + testng +- ${testngVersion} +- jdk15 ++ 7.4.0 + provided + + +diff --git a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java +index b73b9bacd..ab187b6d5 100644 +--- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java ++++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java +@@ -57,7 +57,7 @@ public void configure(TestNG testng, Map options) throws TestSet + testng.setUseDefaultListeners(false); + configureInstance(testng, options); + // TODO: we should have the Profile so that we can decide if this is needed or not +- testng.setListenerClasses(loadListenerClasses(listeners)); ++ testng.setListenerClasses((List)loadListenerClasses(listeners)); + } + + @Override +diff --git a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java +index d91e76afc..06dbd2316 100755 +--- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java ++++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java +@@ -71,7 +71,7 @@ protected void configureThreadCount(XmlSuite suite, Map options) + protected void configureParallel(XmlSuite suite, Map options) throws TestSetFailedException { + String parallel = options.get(PARALLEL_PROP); + if (parallel != null) { +- suite.setParallel(parallel); ++ suite.setParallel(XmlSuite.ParallelMode.getValidParallel(parallel)); + } + } + +-- +2.46.1 + diff --git a/LICENSE-2.0.txt b/LICENSE-2.0.txt new file mode 100644 index 0000000..81fbaf6 --- /dev/null +++ b/LICENSE-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..3bd2cbc --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + maven-surefire-plugins + maven-surefire-provider-junit5 + diff --git a/_service b/_service new file mode 100644 index 0000000..a371164 --- /dev/null +++ b/_service @@ -0,0 +1,17 @@ + + + git + https://github.com/apache/maven-surefire.git + surefire-3.5.1 + surefire-* + @PARENT_TAG@ + surefire-(.*) + **/*.jar + **/*.class + + + *.tar + xz + + + diff --git a/cpl-v10.html b/cpl-v10.html new file mode 100644 index 0000000..25310dd --- /dev/null +++ b/cpl-v10.html @@ -0,0 +1,131 @@ + + + +Common Public License - v 1.0 + + + + + + +

Common Public License - v 1.0 + +

Updated 16 Apr 2009 + +

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

+

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

+

1. DEFINITIONS +

"Contribution" means: + +

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

+

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

+

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

+

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

+

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

+

2. GRANT OF RIGHTS + +

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

3. REQUIREMENTS +

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

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

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

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

+

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

+

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

+

4. COMMERCIAL DISTRIBUTION +

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

+

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

+

5. NO WARRANTY +

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

+

6. DISCLAIMER OF LIABILITY +

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

+

7. GENERAL +

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

+

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

+

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

+

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

+

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

+

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

Repeat a String n times to form a new string.

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

Repeat a String n times to form a new string.

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

Repeat a String n times to form a new string.

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