Solved

AutoBuild ant script for Websphere 6

Posted on 2007-04-08
3
3,694 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
3 Comments
 
LVL 10

Accepted Solution

by:
mbvvsatish earned 500 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
json example 39 163
How can I build my own IDE using ASP.NET MVC? 2 54
eclipse console opening separately 2 29
hashmap order 17 37
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
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.

830 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