title: How to customize the servlet port for an embedded JBoss server using Maven plugin 'jboss-as-maven-plugin'?
body: <p>I'm using Maven 3.0.4 with jboss-as-maven-plugin for embedded JBoss server. I would like to customize the port on which JBoss listens for requests, normally 8080. However, I can't customize it with the "port" property in the configuration section. Below is my configuration:</p>
  
  <pre><code>    &lt;plugin&gt;
          &lt;groupId&gt;org.jboss.as.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-as-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;7.4.Final&lt;/version&gt;                
          &lt;configuration&gt;
               &lt;port&gt;8082&lt;/port&gt;
          &lt;/configuration&gt;                
      &lt;/plugin&gt;
  </code></pre>
  
  <p>I've checked the official documentation for jboss-as-maven-plugin: <a href="https://docs.jboss.org/jbossas/7/plugins/maven/latest/run-mojo.html" rel="nofollow">https://docs.jboss.org/jbossas/7/plugins/maven/latest/run-mojo.html</a>
  but don't know what's wrong in it.</p>
  
  <p>In server.log, there is no ERROR message but stop at below:</p>
  
  <pre><code>...
  12:52:03,385 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-8) Pausing Coyote HTTP/1.1 on http--127.0.0.1-8080
  12:52:03,385 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-8) Stopping Coyote HTTP/1.1 on http--127.0.0.1-8080
  12:52:12,859 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
  12:52:12,866 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
  12:52:12,876 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
  12:52:12,877 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
  12:52:12,888 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
  12:52:12,910 INFO  [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
  12:52:12,936 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
  12:52:12,964 INFO  [org.jboss.as.security] (MSC service thread 1-5) JBAS013100: Current PicketBox version=4.0.7.Final
  12:52:12,978 INFO  [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: Starting Naming Service
  12:52:13,016 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]
  12:52:13,078 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
  12:52:13,112 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-2) JBoss Web Services - Stack CXF Server 4.0.2.GA
  12:52:13,393 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Started FileSystemDeploymentService for directory D:\mshello\SWS-Client\target\jboss-as-run\jboss-as-7.1.1.Final\standalone\deployments
  12:52:13,400 INFO  [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /127.0.0.1:4447
  12:52:13,401 INFO  [org.jboss.as.remoting] (MSC service thread 1-8) JBAS017100: Listening on /127.0.0.1:9999
  12:52:13,408 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
  12:52:13,523 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
  12:52:15,125 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
  12:52:15,127 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 3534ms - Started 133 of 208 services (74 services are passive or on-demand)
  &lt;&lt; stopped here &gt;&gt;
  </code></pre>
  
  <p>I can see [org.apache.coyote.http11.Http11Protocol] is still listening on http--127.0.0.1-8080, is it the cause? If yes, how to configurate it in pom.xml?</p>
  
  <p>After removing the whole configuration about port 8082, the server can be startup successfully by <code>mvn jboss-as:run</code> without any problem.</p>
  
  <p>Any suggestion?</p>