Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Why isn't my Ant task resolving ANT_HOME? Edited

I'm trying to use Ant along with Ivy, and am trying to use Ant to do a user-install of ivy. This command works locally (and on the default Ubuntu elastic bamboo image when run as a Script task):

ant -f ${ANT_HOME}/fetch.xml -Ddest=user ivy

But when I try using the Ant build task configured like so:

ant-config.png

I keep getting this error in my logs:

Buildfile: ${ANT_HOME}/fetch.xml does not exist!

But I see in the blue log box for the Ant task that ANT_HOME is defined:

ant-logs.png

I've verified that the fetch.xml file does exist in /opt/apache-ant-1.10.5, so what am I doing wrong?

1 answer

1 accepted

1 vote
Answer accepted

Hi @Dov Frankel

Usually, the task body does not resolve variables from the terminal. The variable ANT_HOME does not exist in the Bamboo application variable context. You should be able to find a variable called bamboo_capability_system_builder_ant_<name> where <name>is the label you gave to your ANT capability when creating it. You can find the right variable in your build logs.

Your test works on a script task because the variable you add there is evaluated on the terminal and therefore the variable is available.

Please let me know if that makes sense to you.

Thanks! I was able to use:

${bamboo.capability.system.builder.ant.Ant 1.10}/fetch.xml

 It took a little tinkering to get the naming right, but that worked.

Like Daniel Santos likes this

You are welcome!
I'm glad to see that you can now move forward.

Like Dov Frankel likes this

Suggest an answer

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

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

694 views 1 6
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