3

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
Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
tputkonen
  • 5,579
  • 16
  • 60
  • 88
  • I've seen this plugin used before. It hasn't worked perfectly for me, though, so YMMV. http://mojo.codehaus.org/jboss-maven-plugin/ – cwash Mar 09 '10 at 23:41

1 Answers1

6

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.

Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
  • as I understand it, the problem isn't with Cargo itself, but with the JBoss deployer expecting the file to be local. – Ken Liu Feb 17 '10 at 18:50
  • @Ken Yes, indeed, this sounds more like a problem with JBoss deployer (how can it be called "remote" without handling the upload) but at the end, this doesn't work with/from Cargo. – Pascal Thivent Feb 17 '10 at 19:38