aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes start/stop Sun Application server from ant build.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "start/stop Sun Application server from ant build.xml" Watch "start/stop Sun Application server from ant build.xml" New topic
Author

start/stop Sun Application server from ant build.xml

Bhaarat Sharma
Ranch Hand

Joined: Jun 04, 2007
Posts: 96
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


omnipresent
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

It appears that Sun ONE application server provides some ANT tasks. Is this the version you were looking for?


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Bhaarat Sharma
Ranch Hand

Joined: Jun 04, 2007
Posts: 96
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

Joined: Jun 04, 2007
Posts: 96
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

Joined: Oct 18, 2000
Posts: 4121

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.
 
Don't get me started about those stupid light bulbs.
 
subject: start/stop Sun Application server from ant build.xml