1. Sebastian Sdorra
  2. scm-manager

Source

scm-manager / scm-server / src / main / conf / server-config.xml

<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : server-config.xml
    Created on : January 20, 2011, 6:05 PM
    Author     : sdorra
    Description:
        Purpose of the document follows.
-->

<Configure class="org.eclipse.jetty.server.Server">

  <Call name="addConnector">
    <Arg>
      <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
        <Set name="host">
          <SystemProperty name="jetty.host" />
        </Set>
        <Set name="port">
          <SystemProperty name="jetty.port" default="8080"/>
        </Set>
        <!-- for mod_proxy -->
        <!--
        <Set name="forwarded">true</Set>
        -->
      </New>
    </Arg>
  </Call>

  <New id="scm-webapp" class="org.eclipse.jetty.webapp.WebAppContext">
    <Set name="contextPath">/scm</Set>
    <Set name="war"><SystemProperty name="basedir" default="."/>/var/webapp/scm-webapp.war</Set>
  </New>

  <New id="docroot" class="org.eclipse.jetty.webapp.WebAppContext">
    <Set name="contextPath">/</Set>
    <Set name="baseResource">
      <New class="org.eclipse.jetty.util.resource.ResourceCollection">
        <Arg>
          <Array type="java.lang.String">
            <Item><SystemProperty name="basedir" default="."/>/var/webapp/docroot</Item>
          </Array>
        </Arg>
      </New>
    </Set>
  </New>
  
  <Set name="handler">
    <New class="org.eclipse.jetty.server.handler.HandlerCollection">
      <Set name="handlers">
        <Array type="org.eclipse.jetty.server.Handler">
          <Item>
            <Ref id="scm-webapp" />
          </Item>
          <Item>
            <Ref id="docroot" />
          </Item>
        </Array>
      </Set>
    </New>
  </Set>

  <!-- mod_proxy_ajp or mod_jk -->
  <!--
  <Call name="addConnector">
    <Arg>
       <New class="org.eclipse.jetty.ajp.Ajp13SocketConnector">
         <Set name="port">8009</Set>
       </New>
    </Arg>
  </Call>
  -->

  <!-- SSL-Connector -->
  <!--
     Documentation for the SSL-Connector: 
     http://wiki.eclipse.org/Jetty/Reference/SSL_Connectors
  -->
  <!--
  <Call name="addConnector">
      <Arg>
        <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
        <Set name="Port">8181</Set>
        <Set name="maxIdleTime">30000</Set>
        <Set name="keystore"><SystemProperty name="basedir" default="." />/conf/keystore.jks</Set>
        <Set name="password">OBF:xxx</Set>
        <Set name="keyPassword">OBF:xxx</Set>
        <Set name="truststore"><SystemProperty name="basedir" default="." />/conf/keystore.jks</Set>
        <Set name="trustPassword">OBF:xxx</Set>
      </New>
    </Arg>
  </Call>
  -->

  <!-- JMX support -->
  <!--
  <Call id="MBeanServer" class="java.lang.management.ManagementFactory"
    name="getPlatformMBeanServer" />

  <New id="MBeanContainer" class="org.eclipse.jetty.jmx.MBeanContainer">
    <Arg>
      <Ref id="MBeanServer" />
    </Arg>
  </New>

  <Get id="Container" name="container">
    <Call name="addEventListener">
      <Arg>
        <Ref id="MBeanContainer" />
      </Arg>
    </Call>
  </Get>
  -->

</Configure>