我想用maven wildfly-plugin部署我的war文件。
我使用wildfly-8.2.0.Final
- 版本,我强迫将管理控制台的端口更改为http://127.0.0.1:9990。
这是我的maven配置:
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.0.2.Final</version>
<configuration>
<jbossHome>C:\wildfly-8.2.0.Final</jbossHome>
<hostname>127.0.0.1</hostname>
<port>8080</port>
<serverConfig>standalone-full.xml</serverConfig>
</configuration>
</plugin>
我收到以下错误:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.705 s
[INFO] Finished at: 2016-02-01T22:46:43+01:00
[INFO] Final Memory: 21M/171M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) on project wildfly: Could not execute goal deploy on C:\Users\laudatio\Documents\Java\wildfly\target\wildfly.war. Reason: I/O Error could not execute operation '{
[ERROR] "operation" => "read-attribute",
[ERROR] "address" => [],
[ERROR] "name" => "launch-type"
[ERROR] }': java.io.IOException: Unknown service name
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
有什么建议吗?
答案 0 :(得分:3)
错误消息不是很好,它已经fixed upstream,但问题是您已经定义了错误的端口。该插件使用管理端口,默认情况下为9990
。如果您将配置更改为<port>9990</port>
或将其关闭,则应该可以正常工作。
附注说明您不需要大部分配置。仅jbossHome
和serverConfig
目标才需要run
和start
。如果您只是部署,则不需要定义任何配置。默认值应该是正确的。
答案 1 :(得分:0)
问题的原因可能是以下之一:
如果WildFly正在其管理端口侦听,请检查是否配置了位于 %SYSTEM_ROOT%\ System32 \ drivers \ etc 的主机文件以用于Windows机器正确。即您的本地主机已正确映射IPv4和IPv6。
127.0.0.1 localhost
:: 1 localhost