The behavior of wildfly:start
(Maven-Goals of the wildfly-maven-plugin) seems wrong when I change the (management-)port (see https://docs.jboss.org/wildfly/plugins/maven/latest/examples/run-example.html for description).
wildfly:start
should not block further execution while wildfly:run
should so (see https://docs.jboss.org/wildfly/plugins/maven/latest/plugin-info.html for the description). Since I am automatically publishing to a JBoss-server, I'd expect it to startup and then publish, but whenever I change the management-port, it blocks further execution (until the startup-timeout expires) and then the build fails.
[org.jboss.as] (Controller Boot Thread) WFLYSRV0060: HTTP-Management Interface ist empfangsbereit auf http://127.0.0.1:9990/Management
Means something along the lines of "HTTP-Management Interface is listening on http://127.0.0.1:9990/Management
".
Why is it listening on port 9990
even though I told it to listen on port 9995
?
18:15:49,813 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.1.0.GA (WildFly Core 3.0.10.Final-redhat-1) wurde gestartet in 35339ms - 2625 von 2851 Diensten gestartet (379 Services sind "lazy", passiv oder werden bei Bedarf geladen)
Means something along the lines of "JBoss EAP 7.1.0.GA (...) was started successfully in 35339ms - 265 of 2851 services started (379 services are lazy, passive or are started on demand).
It's this message it hangs after - waiting for the startup-timeout to expire and failing thereafter.
Here's a minimal pom.xml showing the problem:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>test</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.install.skip>true</maven.install.skip>
<jar.skipIfEmpty>true</jar.skipIfEmpty>
<plugin.wildfly.port>9995</plugin.wildfly.port>
<plugin.wildfly.httpport>8050</plugin.wildfly.httpport>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>2.0.1.Final</version>
<configuration>
<jboss-home>D:\server\jboss-eap-7.1</jboss-home>
<username>admin</username>
<password>admin</password>
<hostname>localhost</hostname>
<port>${plugin.wildfly.port}</port>
<java-opts>
<java-opt>-Djboss.http.port=${plugin.wildfly.httpport}</java-opt>
</java-opts>
</configuration>
<executions>
<execution>
<id>start-server</id>
<phase>integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
If I change the property plugin.wildfly.port
back to 9990
(default management port), wildfly:start
becomes non-blocking again.
If you've not overridden the management port in your server configuration you'd need to pass -Djboss.management.http.port=${plugin.wildfly.port}
as a java-opt
as well.
Note too the blocking should only last as long as the timeout while plugin attempts to determine if the server is running.