ANT builder task and JAVA Bamboo build

This question is in reference to Atlassian Documentation: Ant

Hi,

Issue: What should i mention in the 'Target' field in ANT Builder Task ?

I don't have any tests to be included in this task. Just simply i need to Build my 'build.xml' file.

Can anyone help, please. 

 

Thanks.

1 answer

1 votes

An Apache Ant target denotes a set of tasks you want to be executed. When starting Ant, you can select which target(s) you want to have executed. When no target is given, the project's default is used - see Writing a Simple Buildfile and for Running Apache Ant more on this.

While specifying the target for Ant is optional as such (Ant will simply execute all top level targets in case), the Bamboo Ant Task's resp. 'Target' parameter strangely requires a value. Accordingly, you need to be explicit about what Ant is doing by default when run from the command line by looking into your build.xml file to determine the default target configured there.

In case your build.xml does not have a default target configured, you need to deduce an appropriate target for your use case depending on the targets that are available in build.xml .

  • For example, as outlined in the Ant tutorial's Four steps to a running applicationit's a good practise to have a "clean" target, which deletes all the generated stuff. Many failures could be solved just by a "clean build".

Many projects use a target named build or compile accordingly.

 

Suggest an answer

Log in or Join to answer
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,066 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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot