• 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
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Ant tool?

 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am just getting started with J2EE. I am using something called Ant. I have the path set up to find the ant bin directory. ANT_HOME points to the ant top ant directory. The classpath is set up for the bin and library directories.
Can you explain how to run ant?
 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Charlie,
You'll need to create an xml file and name it build.xml. Inside there you'll specify targets, like compile, etc..
These target will call commands called tasks to do different things. Take a look at the ant documentation for examples.
Once this is done, make sure your in the directory that contains the build.xml file. At the prompt, type in ant. That should run the file for you.
If you have any other questions, let me now. You might want to look the Jakarta Forum here at the ranch. A lot of questions on ant get posted there..
HTH,
/rick
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ant is excellent, but quite complex to get into ... moving this to the Jakarta Projects forum.
 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Charlie,
In your ANT bin directory there is an exe file called ant/ant2, dunno what but u can chk and all u have to do is call that from the cmd line, pass the name of the ant file that u want to run, (generally u write a main.xml that calls all the ant files that u want to run) and also pass the source for the classes that u want to compile/copy in the arguments(if u have specified any in your dtd, generally there is a SOURCE_HOME)
e.g
D:\ant\bin\ant2 -buildfile main.xml -DSOURCE_HOME=D:\ant\build
Please mail me at gupta_sahil@yahoo.com if you need any more info
HTH
Sahil
 
sandy gupta
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By exe i meant an executable batch/command file
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Might I recommend this article written by one of the JavaRanch Sheriffs?
http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.jsp#ant
 
There is no greater crime than stealing somebody's best friend. I miss you tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic