How to use bamboo capability as a variable

kalubi christian June 9, 2013

I try to se a bamboo capability as a variable by following explanation from this page : https://confluence.atlassian.com/display/BAMBOO/Using+global%2C+plan+or+build-specific+variables but it doesn't work.

When I tried in my build.xml file to make <echo>${bamboo.capability.system.jdk.JDK}</echo>

It display "${bamboo.capability.system.jdk.JDK}" instead of "D:\bamboo\jdk1.6.0_29 "

Can you help me please?

thank you

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Jan Swaelens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 9, 2013

Hi,

What you are missing, according to me, is that you still need to inject the Bamboo variable into one of your own variables. By that I mean that you should add

-Dyour.property=${bamboo.capability.system.jdk.JDK}

to the Ant task configuration (target field after the target you want to call) after which you will be able to echo the 'your.property' value in the Ant script.

Not all variables are automatically injected into the Ant runtime to avoid excessive clobbering of the environment I assume.

Hope this helps.

kalubi christian June 9, 2013

Thank you It works perfectly

TAGS
AUG Leaders

Atlassian Community Events