This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed with ANT

 
pramod talekar
Ranch Hand
Posts: 323
Eclipse IDE Java Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm learning Ant, have downloaded the version 1.8.2 bin from the ANT page on Apache, but it's coming in Bin form and not Source.

I'm coming across difficulty regarding following paragraph :-
Building the Ant Source Distribution with the Build Script

Now that you have the source distribution on your file system, you can build Ant. If you are installing Ant for the first time, you will have to use the build script (build.bat on Windows and build.sh on Unix). If you have a distribution of Ant already, then you can use the build.xml build file. The "Upgrading Ant" section covers the latter situation.

Installing Ant from source for the first time presents an interesting problem: if you don't have a build tool, how do you build Ant? To solve this problem, the Ant source distribution comes with a build script that compiles the source distribution.

Run the build script appropriate for your system as follows:


> build
This will first compile the core Ant classes from source, before using them to build the rest of the distribution. This happens in two stages. First, the build script calls the bootstrap script, which in turn compiles the bare minimum of Ant classes required and then calls org.apache.tools.ant.Main to build the core of the Ant distribution. Listing 2-3 shows the important part of build.xml that creates the bootstrap build.

Listing 2-3: The bootstrap Target from build.xml


<target name="bootstrap" description="--> creates a bootstrap build">
<antcall inheritAll="false" target="dist-lite">
<param name="dist.dir" value="${bootstrap.dir}"/>
</antcall>
</target>




I checked my unzipped ANT folder for this section
Run the build script appropriate for your system as follows:


> build


but it shows me error as build.xml not found when I run Build in command prompt on Win 7 OS.

Please advise.

Thanks.

 
J J Singh
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

To use ant you need only bin not source

Just set the required anvironment variables for ANT_HOME as bin folder of ant and JAVA_HOME for java bin folder.

When you will press on command promt it should show ant verion installed

 
pramod talekar
Ranch Hand
Posts: 323
Eclipse IDE Java Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi J J

Yeah , you are right. installation with just BIN files work fine.
But when I try with SOURCE files, after running BUILD command, it creates just BUILD folder and not BIN folder.

Don't know why it is happening. Until I get BIN folder, I can't set up PATH variable.

Thanks for advice.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have downloaded the version 1.8.2 bin from the ANT page on Apache, but it's coming in Bin form and not Source

There are separate web pages for binary and source downloads. Check the links under Downloads in the menu box to the top-left of the pages on the Ant web site.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic