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

Apache Maven setting.xml的更多相关文章

  1. maven - setting.xml

    <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Soft ...

  2. Maven setting.xml文件详解(转)

    maven的配置文件settings.xml存在于两个地方: 1.安装的地方:${M2_HOME}/conf/settings.xml 2.用户的目录:${user.home}/.m2/setting ...

  3. maven setting.xml 中文配置详解(全配置)

    春节假期在家养病,乘有时间整理了下之前的知识——知识贵在归纳总结. 参照了官方文档,针对其中的一些未描述详尽的内容翻查了不少资料,补充到了配置文件中,同时再加上一些说明.例子,方便查阅. 内容虽然比较 ...

  4. 浅谈maven setting.xml 设置的mirrorof标签作用。

    https://blog.csdn.net/whbing1471/article/details/53983779 A 看这一段 背景:写好的java项目放置到linux服务器上进行编辑的时候,由于m ...

  5. maven setting.xml文件配置详情

    1 首先,setting.xml一般存在与两个地方:maven的安装目录/conf/,和${user.home}/.m2/下.他们的区别是在maven安装目录下的setting.xml是所有用户都可以 ...

  6. maven setting.xml 阿里云镜像 没有一句废话

    <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Soft ...

  7. maven setting.xml配置说明

    文件存放位置 全局配置: ${M2_HOME}/conf/settings.xml 用户配置: ${user.home}/.m2/settings.xml note:用户配置优先于全局配置.${use ...

  8. Maven setting.xml 文件剖析

    全局配置: ${M2_HOME}/conf/settings.xml (配置环境变量  新建 M2_HOME    安装目录到版本名那里(D:\apache-maven-3.0.2) 编辑path 环 ...

  9. Maven setting.xml 文件配置

    全局配置: ${M2_HOME}/conf/settings.xml (配置环境变量  新建 M2_HOME    安装目录到版本名那里(D:\apache-maven-3.0.2) 编辑path 环 ...

随机推荐

  1. VMware虚拟机中CentOS7的硬盘空间扩容

    查看centos7系统挂载点信息 扩展VMWare-centos7硬盘空间 对新增加的硬盘进行分区.格式化 添加新LVM到已有的LVM组,实现扩容 1.查看centos7系统挂载点信息 df -h查看 ...

  2. 【谷歌浏览器】修改和添加Cookie

    一.使用谷歌浏览器 1.1.修改ookie 方法一:直接用开发者工具修改: 操作如图:   参考: 检查和删除 Cookie · Chrome 开发者工具中文文档 http://www.css88.c ...

  3. 最新 小红书java校招面经 (含整理过的面试题大全)

    从6月到10月,经过4个月努力和坚持,自己有幸拿到了网易雷火.京东.去哪儿.小红书等10家互联网公司的校招Offer,因为某些自身原因最终选择了小红书.6.7月主要是做系统复习.项目复盘.LeetCo ...

  4. soapUI对webservices进行压力测试

    1.进行压力测试步骤 1.创建soap项目file--new soap project 为项目命名,输入wsdl,之后会出现下图 其中matchToApply是webservice对外提供访问的接口( ...

  5. Java基础---Java变量

    变量:程序运行期间,内容可以发生改变的量. 创建一个变量并且使用的格式: 数据类型 变量名称;         // 创建了一个变量 变量名称 = 数据值;           // 赋值,将右边的数 ...

  6. 【C++札记】指针函数与函数指针

    指针函数 指针函数是一个函数,只不过指针函数返回的类型是某一类型的指针. 格式: 类型名* 函数名(函数参数列表) 如下代码存在问题 void test(char *p) { p = (char*)m ...

  7. VirtualBox中CentOS7.2 网络配置(固定IP+联网)(亲测有效)

           https://www.linuxidc.com/Linux/2018-04/151924.htm 一.前言 用虚拟机装Linux系统时,经常会出现一些问题.比如:从主机到虚拟机之间网络 ...

  8. electron客户端开发

    如何新建一个 Electron 项目? electron快速入门笔记: https://www.jianshu.com/p/f134878af30f 然后自己新建一个 Electron 项目,在项目中 ...

  9. SVM的概率输出(Platt scaling)

    SVM的概率输出(Platt scaling) 2015-10-22 10:38:19 闲渔Love吉他 阅读数 8121 文章标签: Platt Scaling Calibr 更多 分类专栏: 计算 ...

  10. 安装Docker step by step

    1. 系统要求 centos7以上   使用cat /etc/redhat-release查看系统版本,我的Centos 7.6 centos-extra 仓库 enable,默认是打开的 2.安装d ...