| Author |
ANT newbie question
|
Chris Shepherd
Ranch Hand
Joined: Jun 27, 2000
Posts: 286
|
|
What can ANT (or a script/make file for that matter) do for my project that just using the basic compile in my IDE (IntelliJ) won't do? I'm asking this question because I have never coded in C or any other language that uses a makefile(so please be gentle). I have about 30 classes that I am working with at the moment. I'm willing to try new tools if they offer an obvious advantage in how I code/distribute code. I looked at the FAQ on the ANT site and read a few articles here, but because they expect most people to know what make files do for you, they usually just talk about the advantages of ANT over make/script files. I really want to know what the advantages of ANT are over a standard IDE compile. Thanks for your input.
|
 |
Paul Stevens
Ranch Hand
Joined: May 17, 2001
Posts: 2823
|
|
If you are only talking about compiling a single piece of code (not part of a large project/stand alone), nothing much. If you are talking building a complex application, then it becomes more clear. It is a tool. All tools have their uses. Take a look at this thread. It might give you a better understanding. [ January 13, 2003: Message edited by: Paul Stevens ]
|
 |
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6919
|
|
Using a build tool (such as Ant) gives you the ability to do everything you need to in one go. For example, I have an ant build file which: compiles all the source files in my project "java" directory and creates a "jar" file of the classes.compiles all the source files in my project "loadable" directory and places the class files in a "classes" directorycompiles and runs a complete unit test suite against the classes compiled above.runs a bunch of XML files through an XSLT styleheet to generate nicely decorated HTMLbuilds a complte "war" file from the jar file, loadable classes, generated HTML files, a "web.xml" file and some other resource files.copies the "war" file to a directory monitored by a local test webserverrestarts the test server if necessaryruns an acceptance test suite against the deployed applicationtransfers the "war" file to a remote server by FTPlogs in to the remote server using telnet and restarts its webserver. I can do all this just by typing "ant deploy". If any of the steps fail, the whole process stops with a sensible error message. Can your IDE do this, or would you have to do most of it manually?
|
Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
|
 |
Chris Shepherd
Ranch Hand
Joined: Jun 27, 2000
Posts: 286
|
|
Ah I see... Hmm, I'll have to check out ANT some more that sounds like it would be very useful. Thanks to both of you
|
 |
 |
|
|
subject: ANT newbie question
|
|
|