【发布时间】:2012-03-03 03:59:39
【问题描述】:
我已经尝试了几天使用jboss-as-maven-plugin 将 Web 项目部署到远程 JBoss AS7,但没有成功。
这是我的pom.xml:
<!-- JBoss Application Server -->
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.1.0.CR1b</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
<!-- Only remote server needs -->
<configuration>
<hostname>192.168.1.104</hostname>
<port>9999</port>
<username>admin</username>
<password>admin123</password>
</configuration>
</execution>
</executions>
</plugin>
使用此配置,我可以在没有<configuration>,甚至没有<username> 和<password> 的情况下部署到localhost。
为了部署到我的真实 IP 地址,我修改了 ${JBOSS_HOME}/configuration/standlone.xml,将 jboss.bind.address 从 127.0.0.1 更改为 >0.0.0.0(解除绑定JBoss地址),所以我可以使用以下方式部署项目:
<configuration>
<!-- 192.168.1.106 is my ip -->
<hostname>192.168.1.06</hostname>
<port>9999</port>
</configuration>
它也可以,但是通过将<hostname> 更改为指向我的另一台计算机(在同一路由器中)它不起作用,但是该计算机收到了请求,并且请求被某些东西切断了。 (我以为可能是JBoss)
Maven控制台报错信息如下:
INFO: JBoss Remoting version 3.2.0.CR8
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.572s
[INFO] Finished at: Fri Feb 10 23:41:25 CST 2012
[INFO] Final Memory: 18M/170M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.1.0.
CR1b:deploy (default) on project MessagePushX-RELEASE: Could not execute goal de
ploy on MessagePush.war. Reason: java.net.ConnectException: JBAS012144: Could no
t connect to remote://192.168.1.104:9999. The connection timed out -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
谁能告诉我 JBoss 是 7.1.0 不允许远程部署?
对于一些安全问题?
【问题讨论】:
标签: java deployment maven jboss