Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Eclipse, how can i tell what version of ANT is being used?

Same as original question, using Eclipse, how can i tell what version of ANT it is configured to use?

like image 948
James Raitsev Avatar asked Jun 13 '11 21:06

James Raitsev


2 Answers

In Eclipse Helios:

  • Open the Preferences dialog (Window -> Preferences)
  • Navigate to the Ant -> Runtime page
  • Expand the Ant Home Entries node on the Classpath tab

This shows the path used for Ant classpath, which also reveals ANT_HOME for Eclipse.

So by default in Helios you will have something like:

<ECLIPSE_ROOT>/plugins/org.apache.ant_1.7.1.v20100518-1145\lib\ant.jar
etc

On this same page, you can also change ANT_HOME to use a different version of Ant you have installed on your PC.

like image 87
sudocode Avatar answered Oct 09 '22 12:10

sudocode


Create a build file and echo $ant.version

On Helios

  1. create an empty build.xml
  2. ctrl+space in the empty file and select the default build file template with 2 targets
  3. in the target called "default" add <echo>${ant.version}</echo>
  4. save the file
  5. right click on the build.xml in the navigator
  6. select run as ant build
like image 41
crowne Avatar answered Oct 09 '22 13:10

crowne