title: How to override jetty.xml with jetty.port
body: <p>I'm using maven-jetty-plugin and trying to override my jetty.xml setting with the -Djetty.port=8090 but it's not working. Only when I remove the connector part from the jetty.xml file I get the port to be 8090.</p>
  
  <p>So:</p>
  
  <pre><code> mvn jetty:run -Djetty.port=8090
  </code></pre>
  
  <p>With the connector starts in port 8080</p>
  
  <p>Without the connector starts in port 8090</p>
  
  <p>Problem is I need to configure acceptors, stats and other stuff. I tried removing only the port from the connector but it didn't work.</p>
  
  <p>I'm using:</p>
  
  <pre><code>JAVA 1.7_05
  MAVEN 3.0.4
  Jetty 8.1.4
  Linux Ubuntu 12.04 64bits
  </code></pre>
  
  <p>Here's my pom.xml plugin configuration:</p>
  
  <pre><code>&lt;plugin&gt;
              &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
              &lt;artifactId&gt;jetty-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;8.1.4.v20120524&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;stopKey&gt;foo&lt;/stopKey&gt;
                  &lt;stopPort&gt;9990&lt;/stopPort&gt;
                  &lt;jettyXml&gt;src/main/webapp/WEB-INF/jetty.xml&lt;/jettyXml&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;start-jetty&lt;/id&gt;
                      &lt;!-- &lt;phase&gt;pre-integration-test&lt;/phase&gt; --&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;scanIntervalSeconds&gt;0&lt;/scanIntervalSeconds&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;stop-jetty&lt;/id&gt;
                      &lt;!-- &lt;phase&gt;post-integration-test&lt;/phase&gt; --&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;stop&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Jetty.xml connector conf:</p>
  
  <pre><code>&lt;Call name="addConnector"&gt;
    &lt;Arg&gt;
        &lt;New class="org.eclipse.jetty.server.nio.SelectChannelConnector"&gt;
          &lt;Set name="host"&gt;&lt;Property name="jetty.host" /&gt;&lt;/Set&gt;
          &lt;Set name="port"&gt;&lt;Property name="jetty.port" default="8080"/&gt;&lt;/Set&gt;
          &lt;Set name="maxIdleTime"&gt;300000&lt;/Set&gt;
          &lt;Set name="Acceptors"&gt;4&lt;/Set&gt;
          &lt;Set name="statsOn"&gt;false&lt;/Set&gt;
          &lt;Set name="confidentialPort"&gt;8443&lt;/Set&gt;
      &lt;Set name="lowResourcesConnections"&gt;20000&lt;/Set&gt;
      &lt;Set name="lowResourcesMaxIdleTime"&gt;5000&lt;/Set&gt;
        &lt;/New&gt;
    &lt;/Arg&gt;
  &lt;/Call&gt;
  </code></pre>
  
  <p>Thanks in advance!</p>
  
  <p>UPDATE 1: Also tried using SystemProperty instead of Property in the jetty.xml. Did not work</p>