| Author |
Ant vs Batch files
|
Naren Chivukula
Ranch Hand
Joined: Feb 03, 2004
Posts: 542
|
|
Hi, Can anyone tell me what all we can do using Ant that can't be done using batch files? As I'm new to Ant tool, tell me the areas where Ant is powerful compared to batch files Regards, Narendranath
|
Cheers,
Naren (SCJP, SCDJWS and SCWCD)
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26173
|
|
Naren, A few advantages of Ant over batch files: platform independence - you can develop on Windows and run a build on UNIX/LINUXintegrates into IDEs - you can run the build from the IDE or command lineknowledge - more people know Ant than advanced batch scriptingsupport - since Ant is standard, there are many extensions and custom tasksmore powerful tasks - how easy is it to send out an e-mail in a batch file?
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
Originally posted by Naren Chivukula: Can anyone tell me what all we can do using Ant that can't be done using batch files?
Nothing, in the same sense as that you can't do anything in Java that couldn't be done using Assembler instead.
|
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
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14475
|
|
More accurately, there's a whole raft of things that are trivial in Ant that are difficult or even impossible in that rather feeble scripting language used for Windows batch files (I'm assuming that's what you meant and not the more powerful Unix shell scripting, though Ant has advantages even there). Just aside from providing an intelligent and extensible build environment for Java, Ant scripts also have minimal OS dependency. If you want to create or delete a directory, for example, the same Ant task works under both Windows and Unix. I have, in fact, some ant buildfiles that allow me to do development under Windows, then export the entire project to Solaris, where I rerun them and they detect the Solaris OS and build Solaris install packages. One of my projects also understands that when it's running under Linux, it's supposed to build an RPM.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: Ant vs Batch files
|
|
|