4
votes

I want to deploy my war-files with the maven wildfly-plugin. I use the wildfly-8.2.0.Final-version and I was to force to change the port of the management-console to http://127.0.0.1:9990.

This is my maven configuration:

             <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>

I get following error:

[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

Any suggestions?

2
sorry my fault! I meant that I changed the port number of the management-console to 127.0.0.1:9999 ! - Hakan Kiyar
Shouldn't you have <port>9999</port> then? - Steve C

2 Answers

4
votes

The error message isn't great, it's been fixed upstream, but the issue is you've got the wrong port defined. The plugin uses the management port which by default is 9990. If you change the configuration to <port>9990</port> or leave it off it should work.

A side note most of the configuration you have is not needed. The jbossHome and serverConfig are only needed for the run and start goals. If you're just deploying you don't need any of that configuration defined. The defaults should be correct.

0
votes

The reason of the problem could be one of the following:

  • The deployment of any archive (jar, war, ear) through wildfly-maven-plugin plugin will happen only if the WildFly is listening at its management port which is 9990 by default. So make sure that WildFly is listening at its management port.
  • If WildFly is listening at its management port then check if your host file located at %SYSTEM_ROOT%\System32\drivers\etc for windows machine is configured correctly. i.e. your local host is mapped correctly for both IPv4 and IPv6.

    127.0.0.1 localhost
    ::1 localhost