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

Ant and War file

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm really new to java and have a few questions.

Can ant be used to deploy a war file?

I have readed that a build.xml file must be created can this be used to deploy a web app?
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. You don't have to use Ant, you could use an IDE. Ant has tasks to perform all the steps required to build and deploy a web app. I'd advise you learn these steps (for whatever web container you are using) manually though before automating this process with Ant. Learning one new technology at a time is easier than trying to learn them all at once.
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is how to create a war file for a webapp.
<war destfile="${webapps.dir}/ROOT.war" webxml="${webapps.dir}/ROOT/WEB-INF/web.xml">
<fileset dir="${webapps.dir}/ROOT" excludes="**/web.xml"/>
</war>

To Deploy to app servers, there are plugins available, as standard or addon to ANT, that can be used.
They are simple as Tomcat, deploy war="ROOT.war" host="HOSTNAME".
 
I love a woman who dresses in stainless steel ... and carries tiny ads:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic