Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7415

Cannot define system property with a dot in the name : [ERROR] Unknown lifecycle phase

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 3.8.4
    • None
    • Command Line
    • 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:

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            crowne Neil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: