+bamboo plan variable value with +special characters
Asked by Amit Taware:

How do i define plan veriable which conatins special chracters in its value. For example, I want to run following command using bamboo but it is giving error

'

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| \[ERROR\] Unknown lifecycle phase "@RegressionTests1". 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\] |

'

mvn clean test -Denvironment=qa -Dbrowser=chrome -Dcucumber.options="--tags @RegressionTests1" exec:java

please help. this command works fine with Jenkin


Answers:
author: Lee Hesp
body: I see the same issue in 5.8.1. However, I can get it to work correctly if you quote the whole of the cucumber.options parameter rather than just the tags section

e.g. mvn clean test -Denvironment=qa -Dbrowser=chrome "-Dcucumber.options=--tags @RegressionTests1" exec:java

comments: author: xopherx
body: I'm still encountering this problem on Atlassian Bamboo version 5.9.1 build 5914 - 23 Jun 15. Quoting the entire cucumber options does work for me as a workaround.


author: Krystian Brazulewicz
body: Amit we might have fixed that issue in Bamboo 5.7. Can you please try installing most recent Bamboo 5.7.2 and see if error is there as well?


author: Amit Taware
body: <br />

CSADMIN-ADMINSERVICEREGRESSION-REGTEST-710.log  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/8401/1/CSADMIN-ADMINSERVICEREGRESSION-REGTEST-710.log){#display_116933c4b2dccb_0}


author: Himanshu Chhetri
body: I put

package -Denvironment=qa -Dbrowser=chrome -Dcucumber.options="--tags @RegressionTests1"

int the goal of the Maven 3 task in bamboo 5.7.2 and ran the build. The build succeeded, here is part of the build log:

```
Build TestMVN - TestMVN - Default Job #3 (TES-TES-JOB1-3) started building on agent Default Agentsimple	13-Jan-2015 14:32:28	Build working directory is /var/atlassian/application-data/bamboo_home/xml-data/build-dir/TES-TES-JOB1simple	13-Jan-2015 14:32:28	Executing build TestMVN - TestMVN - Default Job #3 (TES-TES-JOB1-3)simple	13-Jan-2015 14:32:28	Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'simple	13-Jan-2015 14:32:28	Updating source code to revision: 3ad2fea4f7f8b446378751ce7295ec034f432340simple	13-Jan-2015 14:32:28	Fetching 'refs/heads/master' from 'ssh://git@stash:7999/sp/game-of-life.git'.simple	13-Jan-2015 14:32:29	Warning: Permanently added '[127.0.0.1]:52652' (RSA) to the list of known hosts.simple	13-Jan-2015 14:32:29	Checking out revision 3ad2fea4f7f8b446378751ce7295ec034f432340.simple	13-Jan-2015 14:32:29	Already on 'master'simple	13-Jan-2015 14:32:29	Updated source code to revision: 3ad2fea4f7f8b446378751ce7295ec034f432340simple	13-Jan-2015 14:32:29	Finished task 'Checkout Default Repository' with result: Successsimple	13-Jan-2015 14:32:29	Running pre-build action: Clover Grails PreBuild Actionsimple	13-Jan-2015 14:32:29	Running pre-build action: VCS Version Collectorsimple	13-Jan-2015 14:32:30	Starting task 'Maven 3.x' of type 'com.atlassian.bamboo.plugins.maven:task.builder.mvn3'command	13-Jan-2015 14:32:30	Beginning to execute external process for build 'TestMVN - TestMVN - Default Job #3 (TES-TES-JOB1-3)'\n ... running command line: \n/usr/share/apache-maven/bin/mvn --batch-mode -Djava.io.tmpdir=/opt/atlassian/atlassian-bamboo-5.7.2/temp/TES-TES-JOB1 package -Denvironment=qa -Dbrowser=chrome -Dcucumber.options="--tags @RegressionTests1"\n .........build	13-Jan-2015 14:32:45	[INFO] BUILD SUCCESSbuild	13-Jan-2015 14:32:45	[INFO] ------------------------------------------------------------------------build	13-Jan-2015 14:32:45	[INFO] Total time: 13.452 sbuild	13-Jan-2015 14:32:45	[INFO] Finished at: 2015-01-13T14:32:45-05:00build	13-Jan-2015 14:32:45	[INFO] Final Memory: 17M/245Mbuild	13-Jan-2015 14:32:45	[INFO] ------------------------------------------------------------------------simple	13-Jan-2015 14:32:46	Parsing test results under /var/atlassian/application-data/bamboo_home/xml-data/build-dir/TES-TES-JOB1...simple	13-Jan-2015 14:32:46	Finished task 'Maven 3.x' with result: Successsimple	13-Jan-2015 14:32:46	Running post build plugin 'Clover Results Collector'simple	13-Jan-2015 14:32:46	Running post build plugin 'Artifact Copier'simple	13-Jan-2015 14:32:46	Running post build plugin 'NCover Results Collector'simple	13-Jan-2015 14:32:46	Running post build plugin 'npm Cache Cleanup'simple	13-Jan-2015 14:32:46	Finalising the build...simple	13-Jan-2015 14:32:46	Stopping timer.simple	13-Jan-2015 14:32:46	Build TES-TES-JOB1-3 completed.simple	13-Jan-2015 14:32:46	Running on server: post build plugin 'Clover Delta Calculator'simple	13-Jan-2015 14:32:46	Running on server: post build plugin 'Build Hanging Detection Configuration'simple	13-Jan-2015 14:32:46	Running on server: post build plugin 'NCover Results Collector'simple	13-Jan-2015 14:32:46	Running on server: post build plugin 'Maven Dependencies Postprocessor'simple	13-Jan-2015 14:32:46	All post build plugins have finishedsimple	13-Jan-2015 14:32:46	Generating build results summary...simple	13-Jan-2015 14:32:46	Saving build results to disk...simple	13-Jan-2015 14:32:46	Indexing build results...simple	13-Jan-2015 14:32:46	Finished building TES-TES-JOB1-3.
```

I get the same error if I remove the double quotes around

--tags @RegressionTests1

but there is no error if double quotes are used.

comments: author: Amit Taware
body: I used the same but somehow this is not working. I am using 'Continuous integration powered by Atlassian Bamboo version 5.6.2 build 4411 - 03 Sep 14' and Artifactory Maven 3 configuration. Attaching logs for more details.


author: Amit Taware
body: Himanshu C -Have u installed any cucumber plug in in bamboo?


author: Krystian Brazulewicz
body: Can you paste the build log? Also which Bamboo version are you using?

comments: author: Amit Taware
body: I am using 'Continuous integration powered by Atlassian Bamboo version 5.6.2 build 4411 - 03 Sep 14' and Artifactory Maven 3 configuration. Attaching logs for more details.