这是我在pom.xml中的插件信息
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.0.2.Final</version>
</plugin>
我已经在/ jboss文件夹(Mac OSX)下的笔记本电脑上下载了jboss AS 7.0.2 虽然我可以将它作为我的Eclipse IDE上的本地服务器,并且能够通过它运行我的项目。我想尝试使用mvn jboss-as:deploy。
它给出了这个错误:
[INFO] --- jboss-as-maven-plugin:7.0.2.Final:deploy (default-cli) @ propertyfinder ---
[INFO] Executing goal deploy on server localhost (127.0.0.1) port 9999.
Apr 3, 2014 2:08:50 AM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.0.Beta2
Apr 3, 2014 2:08:50 AM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.0.Beta2
Apr 3, 2014 2:08:50 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.0.Beta2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.446s
[INFO] Finished at: Thu Apr 03 02:08:55 EDT 2014
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.2.Final:deploy (default-cli) on project propertyfinder: Could not execute goal deploy on propertyfinder.war. Reason: Could not connect to remote://localhost:9999 in 5000ms. Make sure the server is running and/or consider setting a longer timeout by setting -Dorg.jboss.as.client.connect.timeout=<timeout in ms>. -> [Help 1]
感谢任何帮助。
答案 0 :(得分:3)
如果你是从JBOSS开始的话。在启动JBOSS应用服务器之前。添加管理用户
http://localhost:9990/console
。使用以下maven插件配置。用户名和密码是管理用户和密码
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>${jboss.as.plugin.version}</version>
<configuration>
<hostname>localhost</hostname>
<username>{user name}</username>
<password>{password}</password>
<port>9999</port>
</configuration>
</plugin>
您可以使用jboss-as:deploy或jboss-as:redeploy