title: How can I change WildFly listening ports with Maven?
body: <p>I'm using wildfly-maven-plugin for my integration tests.</p>
  
  <p>How can I change port default numbers(8080, 8443)?</p>
  
  <p>I couldn't find any configuration property for those port numbers.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I tried <a href="https://stackoverflow.com/users/2220997/yntelectual">yntelectual</a>'s <a href="https://stackoverflow.com/a/44518730/330457">answer</a> but ports numbers are still in their default values.</p>
  
  <p>I found <a href="http://lists.jboss.org/pipermail/wildfly-dev/2016-April/004849.html" rel="nofollow noreferrer">this</a> and the port numbers are changed. But the start goal fails yielding "failed to start in XX seconds" may some signaling procedure doesn't know the changed port.</p>
  
  <pre><code>    &lt;executions&gt;
        &lt;execution&gt;
          &lt;id&gt;wildfly-start&lt;/id&gt;
          &lt;phase&gt;pre-integration-test&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;start&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
        &lt;execution&gt;
          &lt;id&gt;wildfly-deploy&lt;/id&gt;
          &lt;phase&gt;pre-integration-test&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;deploy&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
        &lt;execution&gt;
          &lt;id&gt;wildfly-undeploy&lt;/id&gt;
          &lt;phase&gt;post-integration-test&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;undeploy&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
        &lt;execution&gt;
          &lt;id&gt;wildfly-shutdown&lt;/id&gt;
          &lt;phase&gt;post-integration-test&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;shutdown&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
      &lt;/executions&gt;
  </code></pre>
  
  <h3>Using <code>jvmArgs</code></h3>
  
  <pre><code>&lt;configuration&gt;
    &lt;jvmArgs&gt;-Djboss.socket.binding.port-offset=40000&lt;/jvmArgs&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Ports number are still in their default values.</p>
  
  <pre><code>14:25:34,244 INFO  ... Undertow HTTP listener default listening on 127.0.0.1:8080
  14:25:35,107 INFO  ... Undertow HTTPS listener https listening on 127.0.0.1:8443
  14:25:40,183 INFO  ... Http management interface listening on http://127.0.0.1:9990/management
  14:25:40,183 INFO  ... Admin console listening on http://127.0.0.1:9990
  </code></pre>
  
  <h3>Using <code>server-args</code></h3>
  
  <pre><code>&lt;configuration&gt;
    &lt;server-args&gt;
      &lt;server-arg&gt;-Djboss.socket.binding.port-offset=40000&lt;/server-arg&gt;
    &lt;/server-args&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Port numbers changed but the <code>start</code> goal doesn't finish.</p>
  
  <pre><code>14:29:35,535 INFO  ... Undertow HTTP listener default listening on 127.0.0.1:48080
  14:29:36,543 INFO  ... Undertow HTTPS listener https listening on 127.0.0.1:48443
  14:29:41,535 INFO  ... Http management interface listening on http://127.0.0.1:49990/management
  14:29:41,535 INFO  ... Admin console listening on http://127.0.0.1:49990
  BUILD FAILURE
  ------------------------------------------------------------------------
  14:30:07,345 INFO  ... Undertow HTTPS listener https stopped, was bound to 127.0.0.1:48443
  14:30:07,347 INFO  ... Undertow HTTP listener default suspending
  14:30:07,357 INFO  ... Undertow HTTP listener default stopped, was bound to 127.0.0.1:48080
  14:30:07,359 INFO  ... Undertow 1.4.0.Final stopping
  14:30:07,365 INFO  ... WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) stopped in 34ms
  [INFO] Final Memory: 34M/460M
  ------------------------------------------------------------------------
  Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.2.0.Alpha5:start (wildfly-start) on project ...
  The server failed to start: 
  The server did not start within 60 seconds. -&gt; [Help 1]
  </code></pre>
  
  <h3>Issues to track</h3>
  
  <ul>
  <li><a href="https://issues.jboss.org/browse/WFMP-12" rel="nofollow noreferrer">https://issues.jboss.org/browse/WFMP-12</a></li>
  <li><a href="https://issues.jboss.org/browse/WFMP-14" rel="nofollow noreferrer">https://issues.jboss.org/browse/WFMP-14</a></li>
  </ul>