• 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
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

How to deploy application with Ant?

 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to deploy application with Ant?

Now, i'm using Eclipse + Ant + Tomcat +JBoss for develop my project. But i don't know how to config in build.xml .

Step :
1. Complie *.java in /src and keep class in /build/WEB-INF/classes
2. Pack all data in /build to test.war
3. Deploy test.war into Tomcat or JBoss
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your Tomcat as hot deployment enabled, it's enough to just copy the latest version of the .war file to the 'webapps' directory and Tomcat will redeploy the application automatically after a few seconds.
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hopefully my example in An earlier message should give u an idea abt implementing step 1 & 2.

packing all data - ant zip
deploy the build - ant copy ..

then u need to restart the servlet engine.. am not sure if you can do that with ant.. maybe..
 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

then u need to restart the servlet engine.. am not sure if you can do that with ant.. maybe..



If hot deployment is enabled you dont need to restart.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for all reply.
 
author
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And if hot deploy is not enabled, you can chain together Tomcat's Ant tasks to effectively mimic what hot deploy does. The Tomcat Ant tasks are described at

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant

Mike
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mike Clark:
And if hot deploy is not enabled, you can chain together Tomcat's Ant tasks to effectively mimic what hot deploy does. The Tomcat Ant tasks are described at

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant

Mike



Can i use this solution in Ant 1.6 or not ? and How?
 
Mike Clark
author
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by somkiat puisungnoen:
Can i use this solution in Ant 1.6 or not ? and How?



I'm using the Tomcat Ant tasks with Ant 1.6.2 and it's working fine.

I use the tasks in much the same way as prescribed by the Tomcat documentation:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant

Mike
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ant sucks! But be cautious that depoyment work may be product dependent. For example, to deploy app. to Websphere need additional work than Tomcat.
 
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic