Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-9234

Maven arguments with spaces confuse Windows build agents

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Timed out
    • Icon: Low Low
    • None
    • 3.2 M3
    • Agents

      I'm passing an argument with a space to a Maven build (-Dsqlcmd.auth="-U sa -P xxxxxxxx"). Bamboo is tokenizing it correctly as a single argument, but Maven sees it as separate arguments and fails:

      > [WARNING]
      > Profile with id: 'xxxxxxxx' has not been activated.
      ...
      > build 11-Jul-2011 20:37:51 [INFO] ------------------------------------------------------------------------
      > build 11-Jul-2011 20:37:51 [ERROR] BUILD FAILURE
      > build 11-Jul-2011 20:37:51 [INFO] ------------------------------------------------------------------------
      > build 11-Jul-2011 20:37:51 [INFO] Invalid task 'sa': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
      > build 11-Jul-2011 20:37:51 [INFO] ------------------------------------------------------------------------
      > build 11-Jul-2011 20:37:51 [INFO] For more information, run Maven with the -e switch

      Suggesting that Maven's seeing 'sa', '-P' and 'xxxxxxxx' as separate arguments.

              Unassigned Unassigned
              jwalton joe
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: