How to automate websphere 6.1 w40 headless design using cruise control

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

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

For this window, do I need to do a full WAS 6.1 install, or just copy parts from another box to that box for the build to work? I try to avoid burning my license if possible.

+2


source to share


2 answers


If you want to deploy the application after building it (I assume you do), you are much better off having WebSphere Server installed in your environment. The reason you want to do this is because you will need to deploy your application using wsadmin (jacl / jython interface for WAS) and for that you need the WAS classes. You can theoretically get it to work without this, but in my opinion it is much more work and problems.

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

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

      



If you save it in a file called update.py, you can call this file from ant like this:

<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 ships with WAS called ws_ant, this is useful in that it sets all the WebSphere classpaths and so on to get it working. In my build environment, I fixed this ant variable so that it can always be called.

+2


source


I can't imagine that you would need Websphere at all, can you. I expect you to just create a .ear or .war with some specific XML (Websphere) versions associated with them. The standard Ant ear and war tasks can process XML files very easily.



0


source







All Articles