Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
3.8.4
-
None
-
None
Description
In order to skip or debug integration tests or run a single test we need to define system properties on the command line.
Whenever I try to define a system property with a dot in the name I get the following error:
mvn install -Dmaven.test.skip=true [ERROR] Unknown lifecycle phase ".test.skip=true". You must specify a valid lifecycle phase or a goal in the format
This command works OK
mvn install -DskipITs
There are several examples in the documentation which call for dotted system properties to be passed, all of which seem to be affected by this issue:
- mvn -Dit.test=ITCircle verify
- mvn -Dmaven.failsafe.debug verify
- mvn install -Dmaven.test.skip=true
I have noticed that if I put a space after the -D then it appears to work.
- mvn -D maven.failsafe.debug verify
- mvn install -D maven.test.skip=true
Doc Links:
- https://maven.apache.org/surefire/maven-failsafe-plugin/examples/debugging.html
- https://maven.apache.org/surefire/maven-failsafe-plugin/examples/single-test.html
- https://maven.apache.org/surefire/maven-failsafe-plugin/examples/skipping-tests.html