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
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.
精彩评论