• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ANT BUILD.xml Vs BATCH

 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic