settings.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- 该 maven 配置文件将成为 oms-server 所使用的 maven 配置文件 -->
  3. <!-- The maven configuration file will become the maven configuration file used by oms-server -->
  4. <!--
  5. Licensed to the Apache Software Foundation (ASF) under one
  6. or more contributor license agreements. See the NOTICE file
  7. distributed with this work for additional information
  8. regarding copyright ownership. The ASF licenses this file
  9. to you under the Apache License, Version 2.0 (the
  10. "License"); you may not use this file except in compliance
  11. with the License. You may obtain a copy of the License at
  12. http://www.apache.org/licenses/LICENSE-2.0
  13. Unless required by applicable law or agreed to in writing,
  14. software distributed under the License is distributed on an
  15. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. KIND, either express or implied. See the License for the
  17. specific language governing permissions and limitations
  18. under the License.
  19. -->
  20. <!--
  21. | This is the configuration file for Maven. It can be specified at two levels:
  22. |
  23. | 1. User Level. This settings.xml file provides configuration for a single user,
  24. | and is normally provided in ${user.home}/.m2/settings.xml.
  25. |
  26. | NOTE: This location can be overridden with the CLI option:
  27. |
  28. | -s /path/to/user/settings.xml
  29. |
  30. | 2. Global Level. This settings.xml file provides configuration for all Maven
  31. | users on a machine (assuming they're all using the same Maven
  32. | installation). It's normally provided in
  33. | ${maven.conf}/settings.xml.
  34. |
  35. | NOTE: This location can be overridden with the CLI option:
  36. |
  37. | -gs /path/to/global/settings.xml
  38. |
  39. | The sections in this sample file are intended to give you a running start at
  40. | getting the most out of your Maven installation. Where appropriate, the default
  41. | values (values used when the setting is not specified) are provided.
  42. |
  43. |-->
  44. <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  45. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  46. xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  47. <!-- localRepository
  48. | The path to the local repository maven will use to store artifacts.
  49. |
  50. | Default: ${user.home}/.m2/repository
  51. <localRepository>/path/to/local/repo</localRepository>
  52. -->
  53. <!-- interactiveMode
  54. | This will determine whether maven prompts you when it needs input. If set to false,
  55. | maven will use a sensible default value, perhaps based on some other setting, for
  56. | the parameter in question.
  57. |
  58. | Default: true
  59. <interactiveMode>true</interactiveMode>
  60. -->
  61. <!-- offline
  62. | Determines whether maven should attempt to connect to the network when executing a build.
  63. | This will have an effect on artifact downloads, artifact deployment, and others.
  64. |
  65. | Default: false
  66. <offline>false</offline>
  67. -->
  68. <!-- pluginGroups
  69. | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
  70. | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
  71. | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
  72. |-->
  73. <pluginGroups>
  74. <!-- pluginGroup
  75. | Specifies a further group identifier to use for plugin lookup.
  76. <pluginGroup>com.your.plugins</pluginGroup>
  77. -->
  78. </pluginGroups>
  79. <!-- proxies
  80. | This is a list of proxies which can be used on this machine to connect to the network.
  81. | Unless otherwise specified (by system property or command-line switch), the first proxy
  82. | specification in this list marked as active will be used.
  83. |-->
  84. <proxies>
  85. <!-- proxy
  86. | Specification for one proxy, to be used in connecting to the network.
  87. |
  88. <proxy>
  89. <id>optional</id>
  90. <active>true</active>
  91. <protocol>http</protocol>
  92. <username>proxyuser</username>
  93. <password>proxypass</password>
  94. <host>proxy.host.net</host>
  95. <port>80</port>
  96. <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
  97. </proxy>
  98. -->
  99. </proxies>
  100. <!-- servers
  101. | This is a list of authentication profiles, keyed by the server-id used within the system.
  102. | Authentication profiles can be used whenever maven must make a connection to a remote server.
  103. |-->
  104. <servers>
  105. <!-- server
  106. | Specifies the authentication information to use when connecting to a particular server, identified by
  107. | a unique name within the system (referred to by the 'id' attribute below).
  108. |
  109. | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
  110. | used together.
  111. |
  112. <server>
  113. <id>deploymentRepo</id>
  114. <username>repouser</username>
  115. <password>repopwd</password>
  116. </server>
  117. -->
  118. <!-- Another sample, using keys to authenticate.
  119. <server>
  120. <id>siteServer</id>
  121. <privateKey>/path/to/private/key</privateKey>
  122. <passphrase>optional; leave empty if not used.</passphrase>
  123. </server>
  124. -->
  125. </servers>
  126. <!-- mirrors
  127. | This is a list of mirrors to be used in downloading artifacts from remote repositories.
  128. |
  129. | It works like this: a POM may declare a repository to use in resolving certain artifacts.
  130. | However, this repository may have problems with heavy traffic at times, so people have mirrored
  131. | it to several places.
  132. |
  133. | That repository definition will have a unique id, so we can create a mirror reference for that
  134. | repository, to be used as an alternate download site. The mirror site will be the preferred
  135. | server for that repository.
  136. |-->
  137. <mirrors>
  138. <!-- mirror
  139. | Specifies a repository mirror site to use instead of a given repository. The repository that
  140. | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
  141. | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
  142. |
  143. <mirror>
  144. <id>mirrorId</id>
  145. <mirrorOf>repositoryId</mirrorOf>
  146. <name>Human Readable Name for this Mirror.</name>
  147. <url>http://my.repository.com/repo/path</url>
  148. </mirror>
  149. -->
  150. </mirrors>
  151. <!-- profiles
  152. | This is a list of profiles which can be activated in a variety of ways, and which can modify
  153. | the build process. Profiles provided in the settings.xml are intended to provide local machine-
  154. | specific paths and repository locations which allow the build to work in the local environment.
  155. |
  156. | For example, if you have an integration testing plugin - like cactus - that needs to know where
  157. | your Tomcat instance is installed, you can provide a variable here such that the variable is
  158. | dereferenced during the build process to configure the cactus plugin.
  159. |
  160. | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
  161. | section of this document (settings.xml) - will be discussed later. Another way essentially
  162. | relies on the detection of a system property, either matching a particular value for the property,
  163. | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
  164. | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
  165. | Finally, the list of active profiles can be specified directly from the command line.
  166. |
  167. | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
  168. | repositories, plugin repositories, and free-form properties to be used as configuration
  169. | variables for plugins in the POM.
  170. |
  171. |-->
  172. <profiles>
  173. <!-- profile
  174. | Specifies a set of introductions to the build process, to be activated using one or more of the
  175. | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
  176. | or the command line, profiles have to have an ID that is unique.
  177. |
  178. | An encouraged best practice for profile identification is to use a consistent naming convention
  179. | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
  180. | This will make it more intuitive to understand what the set of introduced profiles is attempting
  181. | to accomplish, particularly when you only have a list of profile id's for debug.
  182. |
  183. | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
  184. <profile>
  185. <id>jdk-1.4</id>
  186. <activation>
  187. <jdk>1.4</jdk>
  188. </activation>
  189. <repositories>
  190. <repository>
  191. <id>jdk14</id>
  192. <name>Repository for JDK 1.4 builds</name>
  193. <url>http://www.myhost.com/maven/jdk14</url>
  194. <layout>default</layout>
  195. <snapshotPolicy>always</snapshotPolicy>
  196. </repository>
  197. </repositories>
  198. </profile>
  199. -->
  200. <!--
  201. | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
  202. | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
  203. | might hypothetically look like:
  204. |
  205. | ...
  206. | <plugin>
  207. | <groupId>org.myco.myplugins</groupId>
  208. | <artifactId>myplugin</artifactId>
  209. |
  210. | <configuration>
  211. | <tomcatLocation>${tomcatPath}</tomcatLocation>
  212. | </configuration>
  213. | </plugin>
  214. | ...
  215. |
  216. | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
  217. | anything, you could just leave off the <value/> inside the activation-property.
  218. |
  219. <profile>
  220. <id>env-dev</id>
  221. <activation>
  222. <property>
  223. <name>target-env</name>
  224. <value>dev</value>
  225. </property>
  226. </activation>
  227. <properties>
  228. <tomcatPath>/path/to/tomcat/instance</tomcatPath>
  229. </properties>
  230. </profile>
  231. -->
  232. </profiles>
  233. <!-- activeProfiles
  234. | List of profiles that are active for all builds.
  235. |
  236. <activeProfiles>
  237. <activeProfile>alwaysActiveProfile</activeProfile>
  238. <activeProfile>anotherAlwaysActiveProfile</activeProfile>
  239. </activeProfiles>
  240. -->
  241. </settings>