我想使用 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
有什么建议吗?
最佳答案
错误信息不是很好,一直是fixed upstream ,但问题是您定义了错误的端口。该插件使用管理端口,默认为 9990
.如果将配置更改为 <port>9990</port>
或将其关闭它应该可以工作。
请注意,您拥有的大部分配置都不是必需的。 jbossHome
和 serverConfig
只需要 run
和 start
目标。如果您只是部署,则不需要定义任何配置。默认值应该是正确的。
关于java - Maven WildFly 插件 : Could not execute goal deploy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35141325/