Jun*_*unv 7 java deployment jboss maven
我已经尝试了几天用于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>
Run Code Online (Sandbox Code Playgroud)
使用这种配置也可以部署到本地主机没有<configuration>,甚至不<username>和<password>.
为了部署到我的真实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>
Run Code Online (Sandbox Code Playgroud)
它也可以工作,但是通过更改<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
Run Code Online (Sandbox Code Playgroud)
谁能告诉我JBoss是不是7.1.0不允许远程部署?
对于一些安全问题?
这绝对不是一个安全问题.
您引用的插件使用JBoss AS7能力使用Server Deployment Manager部署应用程序(这是AS7中的新功能).以前只能通过JMX控制台进行部署,这需要服务器(本地文件或URL)可以访问部署工件.
你需要确保:
小智 6
对我有用的是将jboss-as插件更改为wildfly插件:
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.1.0.Alpha8</version>
</plugin>
Run Code Online (Sandbox Code Playgroud)
然后使用maven命令:
mvn wildfly:deploy
Run Code Online (Sandbox Code Playgroud)
参考:https : //issues.jboss.org/browse/WFLY-3684
| 归档时间: |
|
| 查看次数: |
24971 次 |
| 最近记录: |