Search code examples
javamavenbambooexec-maven-plugin

Unbalanced quotes exception when executing Maven exec plugin in Bamboo plan


So I got this annoying exception in one of my Bamboo plans while I try to execute Maven exec plugin: Unbalanced quotes "-Dargument=value.

The command I'm trying to run is:

mvn exec:exec -Dexec.args="-Dargument=value"

The same command works just fine when I execute it in my command line. Any ideas?


Solution

  • The solution is pretty simple. Thanks to a comment on this Jira ticket I found that the correct way to pass such arguments is:

    mvn exec:exec "-Dexec.args=-Dargument=value"
    

    instead of:

    mvn exec:exec -Dexec.args="-Dargument=value"