2

我正在构建/创建一个构建框,我想在其中使用巡航控制自动化构建过程。

我已经安装了 ClearCase 和巡航控制。我的目标应用服务器是 WebSphere 6.1。

对于这个盒子,我是否需要完全安装 WAS 6.1,或者我可以将另一个盒子中的部分复制到这个盒子,以便构建工作?如果可能,我会尽量避免烧毁许可证。

4

2 回答 2

2

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.

于 2009-09-29T11:29:24.487 回答
0

我无法想象你会需要Websphere,是吗。我希望您只是构建一个 .ear 或 .war 与一些实现(Websphere)特定的 XML 捆绑在一起。标准的 Ant ear 和 war 任务可以很容易地处理包括那些 XML 文件。

于 2009-09-01T21:22:11.683 回答