File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant primer?

 
Michael Brewer
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A co-worker of mine asked me what Ant is used for. I told him that you use it to automate building applications rather than compiling everything by hand. He probed a bit further and asked how we would benefit from it because we typically only compile our classes individually during development and after completion. I thought about it for a second, and couldn't come up with much.
I've installed Ant on my Mac at home, and used it to build the JDBC driver for PostgreSQL. But, to be honest I really don't know why I should or should not use it. Can someone link me to a good primer on the pros and cons of Ant? I looked at the Ant site but "Ant is a Java-based build tool. In theory, it is kind of like Make, without Make's wrinkles and with the full portability of pure Java code" just doesn't do it for me.
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this javaranch newsletter article on ant.
http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.jsp#ant
Others have asked this question before you. e.g., post title: "Why is Ant so good? " I'm not sure if I'll get this link right:
Why is ant so good?
on the other hand, if you don't need it don't add it to your project.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Michael Brewer:
He probed a bit further and asked how we would benefit from it because we typically only compile our classes individually during development and after completion. I thought about it for a second, and couldn't come up with much.

Did you ever encounter situations where you said to each other "You need to use this switch to compile the classes", "you forgot to include the images in the jarfile" or the like? Do you need to type several command in sequence to build a full distribution?
If not, you don't need Ant...
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ANT is useful for other things. I use Ant to compile from a source directory into a set of build directories that I create on the fly, jar up the class files and move them to my WEB-INF/lib directory, and then bounce Tomcat. Then it deletes the build directories.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic