You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <?xml version="1.0"?>
  2. <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
  3. <!--
  4. ~ Licensed to the Apache Software Foundation (ASF) under one
  5. ~ or more contributor license agreements. See the NOTICE file
  6. ~ distributed with this work for additional information
  7. ~ regarding copyright ownership. The ASF licenses this file
  8. ~ to you under the Apache License, Version 2.0 (the
  9. ~ "License"); you may not use this file except in compliance
  10. ~ with the License. You may obtain a copy of the License at
  11. ~
  12. ~ http://www.apache.org/licenses/LICENSE-2.0
  13. ~
  14. ~ Unless required by applicable law or agreed to in writing,
  15. ~ software distributed under the License is distributed on an
  16. ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  17. ~ KIND, either express or implied. See the License for the
  18. ~ specific language governing permissions and limitations
  19. ~ under the License.
  20. -->
  21. <!-- ============================================================================= -->
  22. <!-- Configure the Jetty Server -->
  23. <!-- -->
  24. <!-- Documentation of this file format can be found at: -->
  25. <!-- https://www.eclipse.org/jetty/documentation/9.4.x/reference-section.html -->
  26. <!-- -->
  27. <!-- ============================================================================= -->
  28. <Configure id="Server" class="org.eclipse.jetty.server.Server">
  29. <Arg name="threadpool">
  30. <New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool">
  31. <Arg name="minThreads" type="int">10</Arg>
  32. <Arg name="maxThreads" type="int">200</Arg>
  33. <Arg name="idleTimeout" type="int">60000</Arg>
  34. <Set name="detailedDump">false</Set>
  35. </New>
  36. </Arg>
  37. <Call name="addBean">
  38. <Arg>
  39. <New class="org.eclipse.jetty.util.thread.ScheduledExecutorScheduler"/>
  40. </Arg>
  41. </Call>
  42. <!-- =========================================================== -->
  43. <!-- Set connectors -->
  44. <!-- =========================================================== -->
  45. <!-- =========================================================== -->
  46. <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
  47. <Set name="secureScheme">https</Set>
  48. <Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set>
  49. <Set name="outputBufferSize">32768</Set>
  50. <Set name="requestHeaderSize">8192</Set>
  51. <Set name="responseHeaderSize">8192</Set>
  52. <Set name="headerCacheSize">512</Set>
  53. </New>
  54. <Call name="addConnector">
  55. <Arg>
  56. <New class="org.eclipse.jetty.server.ServerConnector">
  57. <Arg name="server"><Ref refid="Server" /></Arg>
  58. <Arg name="factories">
  59. <Array type="org.eclipse.jetty.server.ConnectionFactory">
  60. <Item>
  61. <New class="org.eclipse.jetty.server.HttpConnectionFactory">
  62. <Arg name="config"><Ref refid="httpConfig" /></Arg>
  63. </New>
  64. </Item>
  65. </Array>
  66. </Arg>
  67. <Set name="host"><Property name="jetty.host" /></Set>
  68. <Set name="port"><Property name="jetty.port" default="8080" /></Set>
  69. <Set name="idleTimeout">30000</Set>
  70. </New>
  71. </Arg>
  72. </Call>
  73. <Set name="handler">
  74. <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
  75. <Set name="handlers">
  76. <Array type="org.eclipse.jetty.server.Handler">
  77. <Item>
  78. <New class="org.eclipse.jetty.webapp.WebAppContext">
  79. <Set name="contextPath">/</Set>
  80. <Set name="war"><SystemProperty name="appserver.base" default="./apps/archiva"/>/apps/archiva</Set>
  81. <Set name="extractWAR">false</Set>
  82. <Set name="copyWebDir">false</Set>
  83. </New>
  84. </Item>
  85. <Item>
  86. <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
  87. </Item>
  88. </Array>
  89. </Set>
  90. </New>
  91. </Set>
  92. <Call name="setRequestLog">
  93. <Arg>
  94. <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
  95. <Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/request-yyyy_mm_dd.log</Set>
  96. <Set name="filenameDateFormat">yyyyMMdd</Set>
  97. <Set name="retainDays">90</Set>
  98. <Set name="append">true</Set>
  99. <Set name="extended">true</Set>
  100. <Set name="logCookies">false</Set>
  101. <Set name="LogTimeZone">GMT</Set>
  102. </New>
  103. </Arg>
  104. </Call>
  105. <!-- =========================================================== -->
  106. <!-- extra options -->
  107. <!-- =========================================================== -->
  108. <Set name="stopAtShutdown">true</Set>
  109. <Call name="setAttribute">
  110. <Arg>org.eclipse.jetty.webapp.configuration</Arg>
  111. <Arg>
  112. <Array type="java.lang.String">
  113. <Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
  114. <Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item>
  115. <Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item>
  116. <Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item>
  117. <Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
  118. <Item>org.eclipse.jetty.plus.webapp.PlusConfiguration</Item>
  119. <Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
  120. </Array>
  121. </Arg>
  122. </Call>
  123. <!-- ARCHIVA CONFIG -->
  124. <New id="validation_mail" class="org.eclipse.jetty.plus.jndi.Resource">
  125. <Arg>mail/Session</Arg>
  126. <Arg>
  127. <New class="org.eclipse.jetty.jndi.factories.MailSessionReference">
  128. <Set name="user"></Set>
  129. <Set name="password"></Set>
  130. <Set name="properties">
  131. <New class="java.util.Properties">
  132. <Put name="mail.smtp.host">localhost</Put>
  133. </New>
  134. </Set>
  135. </New>
  136. </Arg>
  137. </New>
  138. <New id="users" class="org.eclipse.jetty.plus.jndi.Resource">
  139. <Arg>jdbc/users</Arg>
  140. <Arg>
  141. <New class="com.zaxxer.hikari.HikariDataSource">
  142. <Set name="driverClassName">org.apache.derby.jdbc.EmbeddedDriver</Set>
  143. <Set name="jdbcUrl">jdbc:derby:<SystemProperty name="appserver.base" default=".."/>/data/databases/users;create=true</Set>
  144. <Set name="username">sa</Set>
  145. <Set name="maximumPoolSize">20</Set>
  146. <Set name="minimumIdle">5</Set>
  147. <!-- very rigourous sql query validation -->
  148. <!--Set name="connectionTestQuery">select 1</Set-->
  149. </New>
  150. </Arg>
  151. </New>
  152. <!--
  153. <New id="usersShutdown" class="org.eclipse.jetty.plus.jndi.Resource">
  154. <Arg>jdbc/usersShutdown</Arg>
  155. <Arg>
  156. <New class="com.zaxxer.hikari.HikariDataSource">
  157. <Set name="driverClassName">org.apache.derby.jdbc.EmbeddedDriver</Set>
  158. <Set name="jdbcUrl">jdbc:derby:<SystemProperty name="appserver.base" default=".."/>/data/databases/users</Set>
  159. <Set name="username">sa</Set>
  160. </New>
  161. </Arg>
  162. </New>
  163. -->
  164. </Configure>