• 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

WebSphere start/stop using ANT

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

Can any body please help me out for the following things,

1) How to Start and Stop Websphere 5.0 using ANT script?

2) I need to copy a *.jar to WebSphere server,The problme is the .jar file has to keep inside the .ear I mean each time when i modify a class my ANT will compile that class and prepare a *.jar (all classes/*.class) and now I need to copy this *.jar file to .ear file inside the server. the .ear file is already existing.
Target is somthing like:
1) open .ear file
2) delte *.jar file inside that .ear
3) copy the new .jar file.

Thanks,
Sirish
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sirish,
1) You have two options for this. You can use the exec task to call a command line script that starts the server. Or you can use IBM's Ant tasks. Just be sure to use IBM's runAnt file rather than running Ant directly so the classpath is set up. Barry Searle wrote a three part article on the later approach.

2) There's a step #4 which is re-zipping the ear once the new jar is updated. Also note that you can merge steps #2 and #3. Java lets you update files in a jar without unzipping it.
 
Sirish Kumar Gongal Reddy
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanne,

Thanks for your help. Let me go thru that artical and I will revert you back if I need any more hlep.

Huge Thanks!
Sirish
 
Sirish Kumar Gongal Reddy
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Janne,

Can you please give me a small snippet for to invoke startServer.bat(websphere) file throught <exec> command. I am facing some problem when i try to call .bat file.

Best Regards,
Sirish
 
Jeanne Boyarsky
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sirish Kumar GongalReddy:
I am facing some problem when i try to call .bat file.


What did you try? What error message did you get?

I recommend trying to get this working using a command line script before involving Ant.
 
Jeanne Boyarsky
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Extracted from your other thread:

Originally posted by Sirish Kumar GongalReddy:
I have posted one issues that I need to start and stop WebSphere through <exec> but I am facing some problmes do you have any snippet for this. I'll help me a lot.


I'm still trying to understand which part you are having trouble with per my above reply. Is it the exec call? Is it the WebSphere bat file? If it is configuration, a sample wouldn't really help.
reply
    Bookmark Topic Watch Topic
  • New Topic