Posted by: Ayus February 15, 2011
IT -- Solutions Center[Forum]
Login in to Rate this Post:     1       ?         Liked by
@default 061.

Yeah, there is inbuilt ANT in ide. Ant needs build.xml file to build the war, ear file. Once war, ear file is built, we deploy those war/ear files in  web/application server. war/ear are nothing but zipped files. Once we deploy they unpack hence ready to get accessed.

Ant is a build tool that creates war/ear file for deployment and it needs build.xml. When we write build.xml by ourselves, we can configure the way we want. Let's say we want to create a target(ant command) :ant start-jboss which means we want to start server from ant, then ant script generated by IDE doesnt help. we have to manually write that target in build.xml. Advantage is, we can configure the build.xml we want.
when we install ant: type   ant -p
that will show u list of targets(commands) in build.xml. So we can manually configure those targets acccording to our need.

ear file generally contains more than one war file. For ant to work according to our wish, we need to configure in build.xml.

Hope this helps !

Read Full Discussion Thread for this article