如何使用巡航控制自动构建 websphere 6.1 headless ant

发布于 2024-08-04 03:15:18 字数 187 浏览 2 评论 0原文

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

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

对于此盒子,我是否需要完全安装 WAS 6.1,或者我可以将其他盒子中的部分复制到此盒子中,以便构建能够正常工作吗?如果可能的话,我会尽力避免烧毁许可证。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

倾城°AllureLove 2024-08-11 03:15:18

如果您希望在构建应用程序后就对其进行部署(我假设您这样做),那么最好在环境中安装 WebSphere 服务器。您想要执行此操作的原因是,您需要使用 wsadmin(WAS 的 jacl/jython 接口)部署应用程序,并且您需要盒子上的 WAS 类才能完成此操作。理论上你可以在没有这个的情况下让它工作,但在我看来这是更多的工作和问题。

安装完成后,您可以使用 wsadmin ant 任务安装该应用程序,类似于下面显示的 jython 示例:

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

如果将其保存在名为 update.py 的文件中,则可以从 ANT 中调用该文件,如下所示:

<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>

另请注意, WAS 附带了一个名为 ws_ant 的 ant 版本,这很有用,因为它设置了所有 WebSphere 类路径等以使其工作。在我的构建环境中,我已经设置了这个 ant 变量的路径,以便始终可以调用它。

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.

§普罗旺斯的薰衣草 2024-08-11 03:15:18

我根本无法想象您会需要 Websphere,是吗?我希望您只是构建一个 .ear 或 .war,并将一些特定于实现(Websphere)的 XML 与它们捆绑在一起。标准的 Ant Ear 和 war 任务可以非常轻松地处理包含这些 XML 文件。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文