Advertisement
efrenv

Untitled

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