Win a copy of TDD for a Shopping Website LiveProject this week in the Testing 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • 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.
 
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic