Maven Shared Components
  1. Maven Shared Components
  2. MSHARED-141

MavenCommandLineBuilder incorrectly adds system properties

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: maven-invoker-2.0.7, maven-invoker-2.0.8, maven-invoker-2.0.9, maven-invoker-2.0.10, maven-invoker-2.0.11
    • Fix Version/s: None
    • Component/s: maven-invoker
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      Class MavenCommandLineBuilder adds system properties with spaces.
      For example, given the following properties:

      {skipTests=true, listScmChanges=}

      MavenCommandLineBuilder generates the following command line:
      cmd.exe /X /C "C:\Programs\apache-maven-2.2.1\bin\mvn.bat -B -N -e -D skipTests=true -D listScmChanges="

      The correct form is without spaces: "-DskipTests=true -DlistScmChanges"

        Activity

        Hide
        Andrei Solntsev added a comment -

        Patch is provided

        Show
        Andrei Solntsev added a comment - Patch is provided
        Hide
        Robert Scholte added a comment -

        I'm not sure if this will always work. For instance: IIUC there's a difference of quoting arguments between Windows and Linux.
        For Windows it is -Darg="some value with spaces", whereas with Linux it's '-Darg=some value with spaces' (correct me if I'm wrong).

        Show
        Robert Scholte added a comment - I'm not sure if this will always work. For instance: IIUC there's a difference of quoting arguments between Windows and Linux. For Windows it is -Darg="some value with spaces" , whereas with Linux it's '-Darg=some value with spaces' (correct me if I'm wrong).

          People

          • Assignee:
            Unassigned
            Reporter:
            Andrei Solntsev
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: