• 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

compiling with ANT  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since Ive always relied on IDEs Ive not usedAnt, but have however compiled in the cmd tool. Whats the advantage of Ant - do I need to set classpath for the java compiler as well as for Ant? Need some clarification.
Many thanks
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We had an article about installing and using ANT in the JavaRanch newsletter:
http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.jsp#ant
 
Sheriff
Posts: 9087
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wonder if you'd get more info if you posted this question in the ANT forum.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to The Ant Forum...
 
Sheriff
Posts: 3015
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No doubt it is covered by the linked article, but there are several advantages of using Ant to build your project instead of a "cmd tool:. (I assume by command tool, you mean an IDE, like JBuilder.)
Ant is free. As long users as have Ant they will be able to build your project. With an IDE, you need a copy on each machine (and possibly even the right version) and have set up your project file exactly the same way to repeat the build on another machine.
Ant is cross platform. So are some IDEs to some extent. However, even though I've done JBuilder development, I've never, for example, tried to import a whole project begun on Windows onto the Linux version. I'm guessing some tweaks would be needed, but that may not be true.
Ant does more. Some of the IDEs have amazing build tools. Besides compiling code, they can compile JSPs, create jars, generate EJB interfaces and descriptors, and even execute an app server. However, they don't come close to all the things Ant can do. In the project I'm working on now, I use Ant to create jars, wars, and ears, run JUnit tests, deploy files locally, or remotely via FTP, generate Castor classes, generate EJB interfaces (via XDoclet), run the obfuscator, etc. If I ever got really stuck (and ambitious), I could write my own Ant task to do whatever I want.
OK, I got carried away. That's probably longer than the article. :roll: Obviously I'm a big fan of Ant. I recommend you give it a try!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!