如何使用 Cargo maven 插件将 EAR 远程部署到 JBoss 5.1.0.GA?

发布于 2024-08-21 12:31:16 字数 1581 浏览 7 评论 0原文

有人成功地将 EAR 远程部署到 JBoss 5.1.0.GA 吗?我的 pom.xml 配置如下:

<plugin>
    <groupId>org.codehaus.cargo</groupId>
    <artifactId>cargo-maven2-plugin</artifactId>
    <version>1.0.1-SNAPSHOT</version>

    <configuration>
        <container>
            <containerId>jboss51x</containerId>
            <type>remote</type>
            <timeout>600000</timeout>
        </container>

        <configuration>
            <type>runtime</type>
            <properties>
                <cargo.remote.username>username</cargo.remote.username>
                <cargo.remote.password>password</cargo.remote.password>
                <cargo.hostname>myserver</cargo.hostname>
                <cargo.servlet.port>8888</cargo.servlet.port>
            </properties>
        </configuration>

        <deployer>
            <type>remote</type>
            <deployables>
                <deployable>
                </deployable>
            </deployables>
        </deployer>
    </configuration>
</plugin>

这会导致以下错误消息:

java.io.IOException: Server returned HTTP response code: 500 for URL:
 http://myserver:8888/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=file:d%3A%5Cear%5Cmy-ear-1.0-SNAPSHOT.ear

Has someone successfully deployed EAR remotely to JBoss 5.1.0.GA? My pom.xml configuration is as follows:

<plugin>
    <groupId>org.codehaus.cargo</groupId>
    <artifactId>cargo-maven2-plugin</artifactId>
    <version>1.0.1-SNAPSHOT</version>

    <configuration>
        <container>
            <containerId>jboss51x</containerId>
            <type>remote</type>
            <timeout>600000</timeout>
        </container>

        <configuration>
            <type>runtime</type>
            <properties>
                <cargo.remote.username>username</cargo.remote.username>
                <cargo.remote.password>password</cargo.remote.password>
                <cargo.hostname>myserver</cargo.hostname>
                <cargo.servlet.port>8888</cargo.servlet.port>
            </properties>
        </configuration>

        <deployer>
            <type>remote</type>
            <deployables>
                <deployable>
                </deployable>
            </deployables>
        </deployer>
    </configuration>
</plugin>

This results in the following error message:

java.io.IOException: Server returned HTTP response code: 500 for URL:
 http://myserver:8888/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=file:d%3A%5Cear%5Cmy-ear-1.0-SNAPSHOT.ear

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

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

发布评论

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

评论(1

多情出卖 2024-08-28 12:31:16

据我所知,使用 JBoss 进行远程部署并不是开箱即用的(问题是要部署的文件必须存在于 JBoss 服务器本地)。这个问题在 CARGO-416 中有详细说明,该文件仍然处于开放状态(我不知道是否补丁仍然可以顺利应用)。

有人在 此帖子 中提到了一个肮脏的解决方法(简而言之,fting 您的首先可以部署到远程计算机),但似乎不太令人满意。

更新: CARGO-416 已在 Cargo 1.0.3 中修复,现在支持 JBoss AS 上的远程部署,并在专用的 JBoss 远程部署器 wiki 页面。

To my knowledge, remote deployment with JBoss doesn't work out of the box (the problem being that the file to be deployed must exist locally on the JBoss server). This issue is detailed in CARGO-416 which is still open (I have no idea if the patch can still be applied smoothly).

Someone is mentioning a dirty workaround in this thread (in short, ftping your deployable to the remote machine first) but it doesn't seem very satisfying.

Update: CARGO-416 has been fixed in Cargo 1.0.3 and remote deployments on JBoss AS is now supported and documented in the dedicated JBoss Remote Deployer wiki page.

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