This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

ANT BUILD.xml Vs BATCH

 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Bartender
Posts: 2653
18
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Ben! I lost my association with ranch for a long time. Thanks for reminding me the discipline on Javaranch
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a problem.
Did the other post answer your question?
 
Tauri Valor
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
What's brown and sticky? ... a stick. Or a tiny ad.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!