The Maven goal that Bamboo will execute

Hi All,

I'm an absolute newbie (just started yesterday) to maven & bamboo; hence my question:

What should I specify for the Maven 2.x Configuration Goal * setting? Is there any relation between this goal text area withpom.xml & settings.xml?

Kind Regards,

Podumo

2 answers

1 accepted

Solved my issue by removing the value I had specified for the sub directory field.

Put whatever it is in the Goal field that you use to build your maven project. For example, if you run 'mvn clean test' on the command line to build and test your project, put 'clean test' in the Goal field.

settings.xml just holds the settings for your Maven setup and the pom.xml contains the instructions to build your project. The goal field really depends on what goals you need to call to run plugins defined in the pom.xml :)

Thank you so much for the response.

On command line, I use: mvn install so going by your advice, I put 'install' in the Goal field. When I run the job I get:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Starting task 'CustomerCare Maven Continuous Integration build' of type 'com.atlassian.bamboo.plugins.maven:task.builder.mvn2'

Beginning to execute external process for build 'CustomerCare - CustomerCare Integration Deploy - Build Job'
... running command line:
/opt/apache-maven-2.0.9/bin/mvn
-Djava.io.tmpdir=/tmp/####-#####-XXXXX
install
... in: /root/pandafood/Bamboo/bamboo-home/xml-data/build-dir//####-#####--XXXXX/@@@
... using extra environment variables:
MAVEN2_HOME=/opt/apache-maven-2.0.9
JAVA_HOME=/opt/jdk1.6.0_13/
useMavenReturnCode=
M2_HOME=/opt/apache-maven-2.0.9
PATH=/opt/jdk1.6.0_13//bin:/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/opt/apache-maven-2.0.9/bin

Failing task since return code was -1 while expected 0

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Thank you in advance....

I'm assuming you read this page: https://confluence.atlassian.com/display/BAMBOO/Maven

And also that your project/Maven build works locally on your box when you run "mvn install". The log you posted show barely any information that would help diagnose what is going on.

If you are still having problems please try to attach a picture as well of the Job configuration and the full log of the execution.

Cheers,
Felipe

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,491 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you