• 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

start/stop Sun Application server from ant build.xml

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

I am very new to ant. I currently use an ant build.xml to compile my project and build an EAR file. I would like this ant script to further stop then start my sun app server once the building of EAR is done.

Can someone please tell me how I should go about doing this?

currently i start/stop my sun app server via cmd promp like this:


I'd appreciate any help. i looking around on google and found ant code used to start stop tomcat server but not sun app server.

Thanks
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It appears that Sun ONE application server provides some ANT tasks. Is this the version you were looking for?
 
Bhaarat Sharma
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes i have antaks in the version i am running. but my build.xml (one i used to compile my code) is not related to sun app server at all. So i am clueless as to what lines of code i should be adding into this build.xml so that i can start/stop or even deploy/undeploy application on sun app server via this build.xml
 
Bhaarat Sharma
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this is what i've tried

my ant: std.build is the target that does the compiling and building of EAR file after that i call the undeploy target.

sun app server deploy/undeploy targets


however, the error i am getting is:


i am new to ant so..do i need to declare this class someplace?

Also, how does one delete a file in ant
[ September 12, 2007: Message edited by: bhaarat sharma ]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know if this is the cause of the error, because it was correct one place and wrong the other, but -

org.apache.tools.ant.tasksdefs.optional.sun.appserv.DeployTask

should just be -

org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask


Other than that - if the paths to the Jars in the classpaths are correct - everything else looks OK.
 
reply
    Bookmark Topic Watch Topic
  • New Topic