• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Well, there are dumb questions

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've never worked on ANT. but isnt ANT just an XML-ized version of a make file? I agree,it provides for cross platform builds. Is that it? or are there any other advantages of using ANT?
 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One advantage of Ant is the number and quality of the tasks included with the distribution. Granted, each optional task may depend on a corresponding third-party library, but this dependence is well-documented such that you should have no trouble acquiring the dependencies. See the Ant manual for more information.
Another advantage of Ant is that it's extensible: if there is not a built-in or optional task that suits your needs, you can write a custom task according to an API. Furthermore, if your task is valuable to many people, and you wish to provide it to the Ant team, it could be included in a later release!
A third advantage of Ant is that it allows you to hook into build events fairly easily.
In summary, more simply than makefiles, Ant gives you the power to automate your build process to a high degree. Others who have even more experience than I do thus far can chime in with the advantages that Ant has brought to their development work.
Craig
[ March 12, 2002: Message edited by: Craig Demyanovich ]
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have very limited experience with ant but i found it useful for java development in that it had (as craig mentioned) built in tasks for java. due to this ant isn't as useful (out of the box) for other programming languages as make is.
so (IMHO):
ant = java on many platforms
make = many programming langauges on fewer platforms
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote an article about how to use ANT for the JavaRanch newsletter. Perhaps this will help:
http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.jsp#ant
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Thomas paul,
your article was a big help.
-lester
 
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another big advantage is the deterministic nature of the XML build script in place of makefiles. How many times have you broken a makefile by putting whitespace in the wrong place?
bear
 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with Bear in that XML makes the scripts more robust as well as, in my opinion, more readable than Make scripts.
Ant is more portable and has a healthy number of built in tasks or third party tasks available. It definitely does lend itself more easily to Java applications.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That was a big help.
Thanks.
We're beginning to use JUnit at my job. Your book would be helpful.
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by timothy zimmerman:
Ant is more portable and has a healthy number of built in tasks or third party tasks available. It definitely does lend itself more easily to Java applications.


Yes. Ant benefits from XML's portability and structural data format.
Thomas, do you write JSP documents, i.e. JSP in XML style? That should be cool but maybe bothersome at beginning.
 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's why I use ant:
I have an open source Java project that has some users developing in Windows and other in Linux. Ant allows me to have cross platform build files that everyone can use.
"Make is evil" OK, maybe not evil, but to do complex things with make you quite often have to write a bunch of shell script code. That code is almost never cross platform compatible.
Make uses tabs to start a target. There is no way visually to determine the difference between a tab and several spaces. An extra space at the end of a line in "make" will cause that annoying "missing separator" error.
Ant has so many built in task that it just seems easier to compile things with ant. I currently have a project that cleans the build directory, compiles the files, builds the jars, runs the jars through WebSphere's jetace tool, deploys the EJBs into WebSphere, and even stops and restarts WebSphere all via ant.
At least when compiling Java files Ant will automatically find any dependencies between files and compile them in the proper order. Having to write code to compile every file in the proper order with "make" was always a pain.
For me, ant seems much clearer and easier to implement than make. The ant build.xml file just seems easier to understand and debug than even a moderatly complex makefile.
Now, for bonus points: How did "Ant" get it's name?
[ March 14, 2002: Message edited by: Greg Brouelette ]
 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I read some where
Ant stands for another neat tool! Its actually developed by opensource team of tomcat and later published as a separate tool.
 
timothy zimmerman
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe Ram is right about ANT being Another Neat Tool. Started internally for doing builds and then spun into it's own project.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by timothy zimmerman:
I believe Ram is right about ANT being Another Neat Tool. Started internally for doing builds and then spun into it's own project.


Didn't you guys read my article?!
http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.jsp#ant
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greg, what is your open source project?
 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Thomas,
That is where i read the info, well too much info going into brain these days due to javaranch and so need more organization in brain
 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Prash Po:
... are there any other advantages of using ANT?


You'll be able to compile the Wrox jsp book code without too much hassle
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic