Solved

AutoBuild ant script for Websphere 6

Posted on 2007-04-08
3
3,687 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
FizzBuzz challenge 9 73
Best free Visio Editor? 2 105
sumHeights2  challenge 7 78
Unable to start eclipse ? 17 87
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…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now