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

喜欢而已 提交于 2019-12-07 15:34:33

问题


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

回答1:


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.



来源:https://stackoverflow.com/questions/2273172/how-to-deploy-remotely-ear-to-jboss-5-1-0-ga-using-cargo-maven-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!