aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Help needed with ANT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Help needed with ANT" Watch "Help needed with ANT" New topic
Author

Help needed with ANT

pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 323

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.


Thanks,
Pramod
J J Singh
Greenhorn

Joined: Mar 20, 2010
Posts: 12
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

Joined: Apr 26, 2010
Posts: 323

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

Joined: May 14, 2008
Posts: 5837
    
    7

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.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help needed with ANT