jbossmaven-pluginjboss6.x

Unable to deploy using wildfly-maven-plugin 2.0.1 in JBoss EAP 6.4 environment


Getting the below error while trying to deploy in JBoss EAP 6.4 environment using wildfly-maven-plugin 2.0.1. While changing the native port from default (9999) to any other port it's failing with the below error. java.net.ConnectException: WFLYPRT0053: Could not connect to remote+http://localhost:9993. The connection failed: Invalid response

<plugin>
    <groupId>org.wildfly.plugins</groupId>
    <artifactId>wildfly-maven-plugin</artifactId>
    <version>2.0.1.Final</version>
    <configuration>
        <hostname>${wild.hostname}</hostname>
        <port>${wild.port}</port>
        <username>${wild.username}</username>
        <password>${wild.password}</password>
        <name>${wild.name}</name>
        <timeout>60000</timeout>
        <server-groups>${wild.servergroups}</server-groups>
    </configuration>
</plugin>

Solution

  • It looks like there is some special code that automatically overrides the protocol when using port 9999. Since you've changed the port you're also going to need to override the protocol. From the command line you can use -Dwildfly.protocol=remoting.

    For your configuration you'd just need to add <protocol>remoting</protocol>.

    <plugin>
        <groupId>org.wildfly.plugins</groupId>
        <artifactId>wildfly-maven-plugin</artifactId>
        <version>2.0.1.Final</version>
        <configuration>
            <hostname>${wild.hostname}</hostname>
            <port>${wild.port}</port>
            <username>${wild.username}</username>
            <password>${wild.password}</password>
            <name>${wild.name}</name>
            <timeout>60000</timeout>
            <protocol>remoting</protocol>
            <server-groups>${wild.servergroups}</server-groups>
        </configuration>
    </plugin>