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

mvn.bat fail on TTC/LE when -Dkey=value parameters are not quoted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.0.4
    • None
    • Command Line
    • None
    • windows-7, tccle.ex
    • Patch

    Description

      When the mvn command contains an unquoted -Dkey=value parameter then mvn fail with a:
      [ERROR] Unknown lifecycle phase "<value>". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or...

      The problem is that the bat file execute:
      set MAVEN_CMD_LINE_ARGS=%$ (on line 129)
      instead of
      set MAVEN_CMD_LINE_ARGS=%* (on line 124)
      when it detect TCC/LE (on line 121)

      from http://www.robvanderwoude.com/parameters.php
      %$ replace '=' by space unless they are part of a string in doublequotes.
      %* will leave all delimiters intact

      A possible fix is to use %* in both case.
      Another possible fix is to remove (or comment out) the TCC/LE detection on line 121 and let the script fall-through to the "Regular WinNT" case.

      Attachments

        1. mvn_bat.patch
          0.3 kB
          pascal jacob
        2. mvn_bat.patch
          0.5 kB
          pascal jacob

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zartc@wanadoo.fr zart colwing
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: