| Author |
ANT BUILD.xml Vs BATCH
|
Tauri Valor
Ranch Hand
Joined: Aug 03, 2005
Posts: 166
|
|
What is the difference between using Ant and Using a batch file to execute the tasks ? There must be a big advantage of using Ant ... Can someone pls throw some light ?
|
A Moment's insight is sometimes worth a Life's experience.
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
A big advantage is that Ant is cross-platform. Your Ant build file can work on Windows, Unix, ... Batch files are operating system dependent by nature. .cmd or .bat files for windows, .shell scripts for Unix, ... Regards, Jan
|
OCUP UML fundamental
ITIL foundation
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
It's also that ANT, being a general purpose build tool, can do a lot of other things as well. The manager tasks are usually part of a larger build process that can involve pulling from CVS/SVN, compiling, FTPing, packaging apps into jar and war files, running unit tests, etc... Having the ability to deploy and un-deploy apps directly into Tomcat from your build script means that, for many people, the entire build, test, and deploy process can be accomplished with one command. [ September 01, 2007: Message edited by: Ben Souther ]
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Originally posted by Tauri Valor: Can someone pls throw some light ?
Welcome to JavaRanch! In an effort to help you get the most from our forums, we've compiled a list of tips for asking questions here. You can find the list in our FAQ section here. In particular please see: UseRealWords Abbreviations such as "u" or "ur" in place of "you" and "you are" or "you're" confound language translation software making it hard for our non-English speaking members to read your posts. "plz" is not a word in the English language. Again, welcome to JavaRanch and good luck with your question. -Ben [ September 01, 2007: Message edited by: Ben Souther ]
|
 |
Tauri Valor
Ranch Hand
Joined: Aug 03, 2005
Posts: 166
|
|
Sorry Ben! I lost my association with ranch for a long time. Thanks for reminding me the discipline on Javaranch
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Not a problem. Did the other post answer your question?
|
 |
Tauri Valor
Ranch Hand
Joined: Aug 03, 2005
Posts: 166
|
|
Having the ability to deploy and un-deploy apps directly into Tomcat from your build script means that, for many people, the entire build, test, and deploy process can be accomplished with one command.
Ben dont you think we can do the same with a .bat ?
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
You probably could but it would be a lot harder. It also, as Jan Cumps mentioned, would only work on Windows. One of the reasons people choose Java is that it is platform independent. It is very common for people to develop their apps on a Mac or an other operating system but test and deploy on Linux, Solaris, or some other flavor of Unix. With Ant, you don't need to write multiple versions of the build script.
|
 |
 |
|
|
subject: ANT BUILD.xml Vs BATCH
|
|
|