File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant primer? 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 "Ant primer?" Watch "Ant primer?" New topic
Author

Ant primer?

Michael Brewer
Ranch Hand

Joined: Jun 27, 2002
Posts: 54
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

Joined: Oct 10, 2000
Posts: 1364
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

Joined: Jul 11, 2001
Posts: 14112
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...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
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.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Ant primer?