Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bamboo maven task is failing when I add -Dsome_variable=${bamboo.variable} into maven goal field

Dear all,

I am trying to inject into the maven build a variable value according to Bamboo information:

You can then specify the following in the Goal field of your build plan:

clean package -DbambooBuildNumber=${bamboo.buildNumber}

 

Unfortunatelly Bamboo maven task is failing when I add any Bamboo variable using -Dsome_variable=${bamboo.variable} into the maven goal field. If I replace ${bamboo.variable} for any other value it works fine. The build log says:

[ERROR] No goals have been specified for this build. 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]

 nevertheless the log says previously :

Substituting variable: ${bamboo.variable} with Some Value

Could you please tell me why is not working ?

thanks

1 answer

1 accepted

0 votes
Answer accepted

Not 100% positive on this one, but the Maven command line is sensitive to formatting/parsing issues in general, and for property definitions in particular (also depends on OS and shell of course), so I'm usually enclosing them in quotes as soon as I encounter a problem, e.g.:

clean package -D"bambooBuildNumber=${bamboo.buildNumber}"

This usually addresses the problem for me, have you tried that already?

Hi Steffen,

thanks for you help! It worked fine :)  I didn´t try that option.

Regards.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center - Early Access Program

G’day Bamboo customers, The wait is almost over! We are in the final stages of work on the first release of Bamboo Data Center, our self-managed enterprise offering of Bamboo. This Data Center offe...

1,008 views 0 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you