Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

AutoBuild ant script for Websphere 6

Posted on 2007-04-08
3
Medium Priority
?
3,702 Views
Last Modified: 2013-12-14
Urgent! I am relatively new to Websphere (have worked on Weblogic before) and am working on an Ant build script for Websphere 6 with the intent to automate the build process (in Unix). The build machine has websphere 6 on it but no RAD. (I do have RAD on my local dev machine though). I don't want any IDE specific stuff in the build script. The more generic it is, the better.

- How do I identify/isolate the websphere specific jars required for building and deploying? (there are like a zillion jars in /lib dir).
- Would appreciate concrete working examples.
- Any tips\suggestions to go about developing this script.
 
Couldn't find any clear documentation on IBM site. Googling pointed me to ejbDeploy.bat but could not find any concrete examples. This must be a common problem for many who use Websphere so someone would have sorted this mess out.

these are the  sites that indicated using ejbDeploy.bat

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=46&t=008206 
http://mail-archives.apache.org/mod_mbox/ant-user/200510.mbox/%3CB5D80AEEF599D411AD6100508BEF34D5169FE8AD@kwdmsx11.lgnet.co.uk%3E
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.etools.ejbbatchdeploy.doc/topics/regenc.html

Thanks in advance.
0
Comment
Question by:avi247
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
mbvvsatish earned 2000 total points
ID: 18881378
you need to use wsadmin.bat that comes with websphere application server.
here is how you use in your build. xml file
#######################build.xml################
<?xml version="1.0" encoding="UTF-8"?>
<project name="DeployWar" default="deployOnServer">
<property file="common.properties" />
<target name="deployOnServer">            
<echo message="****** Deploying Application******"/>
<replace file="deployApplication.txt" token="@@@Build_Path@@@" value="${project.build.path}" />
<exec executable="wsadmin.bat" input="deployApplication.txt">      
</exec>                                          
</target>
</project>

###############deployApplication.txt ######################
$AdminControl invoke [$AdminControl queryNames type=ApplicationManager,process=server1,*] stopApplication {<Your Webapp name>}
$AdminApp uninstall {<Your Webapp name>}
$AdminConfig save
$AdminApp install @@@Build_Path@@@/MyWebApp.ear {-appname {<Your Webapp name>} -server server1 -defaultbinding.virtual.host default_host -usedefaultbindings}
$AdminConfig save
$AdminControl invoke [$AdminControl queryNames type=ApplicationManager,process=server1,*] startApplication {{<Your Webapp name>}}

############################################
you need to give your webapp name and your server instance name in the deployApplication.txt file

common.properties file should contains the properties required for the wsadmin.bat
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question