views:

805

answers:

2

I am building/creating a build box in which I want to automate the build process using cruise control.

I have install ClearCase and cruise control. My target application server is WebSphere 6.1.

For this box, do I need to do a full install of WAS 6.1 or can I just copy over parts from another box to this box so that the build will work? I am trying to avoid burning a license if possible.

A: 

I can't imagine you're going to need Websphere at all, are you. I would expect you're simply building a .ear or .war with some implementation (Websphere) specific XMLs bundled with those. The standard Ant ear and war tasks can handle including those XML files very easily.

Brian Agnew
We make use of EJB's, currently in the ANT build file there is a call to wsdeploy.bat to build out the EJB jar file for inclusion into the EAR.
boyd4715
+1  A: 

If you want to deploy the application once you build it (I assume that you do) then you are much better off having an installed WebSphere server on the environment. The reason you want to do this is that you will need to deploy the application using wsadmin (jacl/jython interface to WAS) and you need the WAS classes on the box to make this work. You can in theory get it working without this but it is a lot more work and problematic in my opinon.

Once you have it installed you can install the application using the wsadmin ant task, similar to the jython example shown below:

AdminApp.update("MyApp", "app", "[-operation update -contents " + fileToInstall + "]")

If you save this in a file called update.py you can then call that file from within ANT as follows:

<target name="-install-ear" depends="-init">
        <exec executable="${wasHome}/bin/wsadmin.bat" dir="target/wsadmin">
            <arg line="-f installApp.py" />
            <arg line="-lang jython" />
            <arg line="-wsadmin_classpath lib/commons-io-1.4.jar;lib/commons-lang-2.4.jar" />
            <arg line="../my.ear" />
            <arg line="WebSphere_Portal" />
        </exec>
    </target>

Also note, that there is a version of ant that comes with WAS called ws_ant, this is useful in that it sets up all the WebSphere classpaths etc to make it work. On my build environment I have pathed this ant variable so that it can always be called.

Michael Ransley