Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3516

fix passing parameters with spaces in build.sh

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 5.12.1.Final
    • None
    • None
    • None
    • Undefined

      Double quotes around $@ prevent globbing and word splitting of individual elements, while still expanding to multiple separate arguments. Here is a sample execution -

      ./build.sh validate -Dmaven.local.repo="asd dsa"

      without the fix, it will $@ expand into multiple other arguments like `asd` `dsa` and word splitting will happen.

      and below error will be thrown

      [ERROR] Unknown lifecycle phase "dsa". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]

      but with the fix, it'll consider it as on single argument and the build will be successful.

            rchakrab Ranabir Chakraborty
            rchakrab Ranabir Chakraborty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: