You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Neil Crow (Jira)" <ji...@apache.org> on 2022/02/17 07:00:00 UTC
[jira] [Updated] (MNG-7415) Cannot define system property with a dot in the name : [ERROR] Unknown lifecycle phase
[ https://issues.apache.org/jira/browse/MNG-7415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Neil Crow updated MNG-7415:
---------------------------
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:
{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/]
was:
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/]
> 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
> Priority: Major
>
> 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)