Solved

AutoBuild ant script for Websphere 6

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

635 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