• 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

ANT newbie question

 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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" directory
  • compiles 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 HTML
  • builds 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 webserver
  • restarts the test server if necessary
  • runs an acceptance test suite against the deployed application
  • transfers the "war" file to a remote server by FTP
  • logs 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?
     
    Chris Shepherd
    Ranch Hand
    Posts: 286
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
      Bookmark Topic Watch Topic
    • New Topic