[SUREFIRE-823] Decouple -DskipTests from Failsafe plugin#3371
Open
olamy wants to merge 1 commit into
Open
Conversation
olamy
force-pushed
the
gh-1766-disable-skipTests-it-tests
branch
from
June 30, 2026 17:59
0e0cbdd to
2a7a3e9
Compare
Signed-off-by: Olivier Lamy <olamy@apache.org>
olamy
force-pushed
the
gh-1766-disable-skipTests-it-tests
branch
from
July 12, 2026 08:31
2a7a3e9 to
b3333c7
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements SUREFIRE-823 by changing the Maven Failsafe Plugin so that the -DskipTests user property no longer skips integration tests; it now only affects the Maven Surefire Plugin (unit tests). The change is validated via a new integration test fixture and accompanying IT, and is documented in both plugin sources and site docs.
Changes:
- Decouple Failsafe’s legacy
skipTestsparameter from theskipTestsuser property by removing@Parameter(property = "skipTests")bindings and keeping<skipTests>config support via a deprecated, config-only parameter. - Add a new integration-test fixture project and IT coverage to verify behavior for
-DskipTests,-DskipITs, and-Dmaven.test.skip. - Update user-facing documentation and Javadocs to describe the new skip semantics.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| surefire-its/src/test/resources/failsafe-1766-skip-decoupled/src/test/java/MyTest.java | Adds a unit test class used by the new IT fixture to validate Surefire behavior. |
| surefire-its/src/test/resources/failsafe-1766-skip-decoupled/src/test/java/MyIT.java | Adds an integration test class used by the new IT fixture to validate Failsafe behavior. |
| surefire-its/src/test/resources/failsafe-1766-skip-decoupled/pom.xml | Defines a minimal project using both Surefire and Failsafe to exercise skip behavior end-to-end. |
| surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1766SkipTestsDecoupledIT.java | Adds integration tests asserting skipTests only skips Surefire, while skipITs / maven.test.skip behave as expected. |
| maven-surefire-plugin/src/site/apt/examples/skipping-tests.apt.vm | Updates documentation to explain the new -DskipTests vs -DskipITs semantics (one section still needs correction per review comment). |
| maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java | Updates Javadoc on skipTests to reflect that Failsafe no longer binds to the skipTests user property. |
| maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java | Makes skipTests config-only (not bound to the user property) and deprecates it in favor of skipITs. |
| maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java | Introduces a deprecated, config-only skipTests parameter and overrides isSkipTests() so -DskipTests no longer skips IT execution. |
Comment on lines
92
to
+94
| Since <<<skipTests>>> is also supported by the ${thatPlugin} Plugin, this will have the effect | ||
| of not running any tests. If, instead, you want to skip only the integration tests | ||
| being run by the ${thisPlugin} Plugin, you would use the <<<skipITs>>> property instead: | ||
| of not running any tests. If, instead, you want to skip only the integration tests | ||
| being run by the ${thatPlugin} Plugin, you would use the <<<skipITs>>> property instead: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Failsafe plugin's skipTests parameter is no longer bound to the
skipTests user property. -DskipTests now only skips Surefire (unit tests)
while leaving Failsafe (integration tests) untouched.
Use -DskipITs to skip integration tests from the command line, or
-Dmaven.test.skip to skip both. The plugin configuration
element is still honoured when set explicitly.
Following this checklist to help us incorporate your
contribution quickly and easily:
mvn clean installto make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
mvn -Prun-its clean install).If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.