Solved

AutoBuild ant script for Websphere 6

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jar file executable 12 68
runtime exception 2 67
sql import cannot be resolved jsp 3 117
going to wrong jsp page 2 70
-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 …
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 …
The viewer will learn how to implement Singleton Design Pattern in Java.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

751 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