Global variable cannot be passed to maven

I have global variable bamboo.sonar.url and maven3 task Goal field looks like
clean test package sonar:sonar -Dsonar.host.url=${bamboo.sonar.url}
Unfotunately this configuration does not seem working.

In execution logs I see this line /usr/share/maven/bin/mvn --batch-mode -Djava.io.tmpdir=/srv/bamboo/current/temp/SERVER-SERSKKM10-SR clean test package sonar:sonar -Dsonar.host.url=${bamboo.sonar.url}
and this line
bamboo_sonar_url=sonarqube.esc.hq

As a result maven task falis on sonarqube connection.
Please explain how global variable can be passed to maven

2 answers

This widget could not be displayed.

Is it not possible to configure maven task using variables?

This widget could not be displayed.

So did you configure a variable (probably a global variable) with the name sonar.url

Once you do that you should be able to pass ${bamboo.sonar.url} as an argument.  Keep in mind that sonar is looking for a URL so sonarqube.esc.hq would not be a valid url.  That whole nuisance "http://" thing must be there for it to qualify as a URL.

 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

147 views 16 7
Join discussion

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