Neil Crow created MNG-7415:
------------------------------

             Summary: Cannot define system property with a dot in the name : 
[ERROR] Unknown lifecycle phase
                 Key: MNG-7415
                 URL: https://issues.apache.org/jira/browse/MNG-7415
             Project: Maven
          Issue Type: Bug
          Components: Command Line
    Affects Versions: 3.8.4
            Reporter: Neil Crow


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:  

 
{noformat}
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
{noformat}
This command works OK

 
{noformat}
mvn install -DskipITs{noformat}
 

 

 

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|http://example.com/]
 * 
[https://maven.apache.org/surefire/maven-failsafe-plugin/examples/single-test.html|http://example.com/]
 * 
[https://maven.apache.org/surefire/maven-failsafe-plugin/examples/skipping-tests.html|http://example.com/]

 

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to