如何使用 Cargo maven 插件将 EAR 远程部署到 JBoss 5.1.0.GA?
有人成功地将 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,使用 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-416has 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.