Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Help needed with ANT

 
Ranch Hand
Posts: 367
Eclipse IDE Opera Java
  • 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.

 
Greenhorn
Posts: 12
  • 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: 367
Eclipse IDE Opera Java
  • 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.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • 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.
 
This will take every ounce of my mental strength! All for a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!