简体   繁体   English

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

[英]How to deploy remotely EAR to JBoss 5.1.0.GA using Cargo maven plugin?

Has someone successfully deployed EAR remotely to JBoss 5.1.0.GA? 有人成功地将EAR远程部署到JBoss 5.1.0.GA吗? My pom.xml configuration is as follows: 我的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>

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

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). 据我所知,使用JBoss进行远程部署并不是开箱即用的(问题是要部署的文件必须在JBoss服务器上本地存在)。 This issue is detailed in CARGO-416 which is still open (I have no idea if the patch can still be applied smoothly). 这个问题在 CARGO-416中有详细说明,它仍然是开放的(我不知道补丁是否仍然可以顺利应用)。

\n

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. 更新: CARGO-416 已在Cargo 1.0.3中修复,JBoss AS上的远程部署现在支持并记录在专用的JBoss Remote Deployer wiki页面中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM