<?xml version="1.0" encoding="UTF-8"?><!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
--><!--| This is the configuration file for Maven. It can be specified at two levels:||  1. User Level. This settings.xml file provides configuration for a single user,|                 and is normally provided in ${user.home}/.m2/settings.xml.||                 NOTE: This location can be overridden with the CLI option:||                 -s /path/to/user/settings.xml||  2. Global Level. This settings.xml file provides configuration for all Maven|                 users on a machine (assuming they're all using the same Maven|                 installation). It's normally provided in|                 ${maven.home}/conf/settings.xml.||                 NOTE: This location can be overridden with the CLI option:||                 -gs /path/to/global/settings.xml|| The sections in this sample file are intended to give you a running start at| getting the most out of your Maven installation. Where appropriate, the default| values (values used when the setting is not specified) are provided.||-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"><localRepository>F:\rrt-maven\repository</localRepository><!-- localRepository| The path to the local repository maven will use to store artifacts.|| Default: ${user.home}/.m2/repository<localRepository>/path/to/local/repo</localRepository>--><!-- interactiveMode| This will determine whether maven prompts you when it needs input. If set to false,| maven will use a sensible default value, perhaps based on some other setting, for| the parameter in question.|| Default: true<interactiveMode>true</interactiveMode>--><!-- offline| Determines whether maven should attempt to connect to the network when executing a build.| This will have an effect on artifact downloads, artifact deployment, and others.|| Default: false<offline>false</offline>--><!-- pluginGroups| This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.| when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers| "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.|--><pluginGroups><!-- pluginGroup| Specifies a further group identifier to use for plugin lookup.<pluginGroup>com.your.plugins</pluginGroup>--></pluginGroups><!-- proxies| This is a list of proxies which can be used on this machine to connect to the network.| Unless otherwise specified (by system property or command-line switch), the first proxy| specification in this list marked as active will be used.|--><proxies><!-- proxy| Specification for one proxy, to be used in connecting to the network.|<proxy><id>optional</id><active>true</active><protocol>http</protocol><username>proxyuser</username><password>proxypass</password><host>proxy.host.net</host><port>80</port><nonProxyHosts>local.net|some.host.com</nonProxyHosts></proxy>--></proxies><!-- servers| This is a list of authentication profiles, keyed by the server-id used within the system.| Authentication profiles can be used whenever maven must make a connection to a remote server.|--><servers><!-- server| Specifies the authentication information to use when connecting to a particular server, identified by| a unique name within the system (referred to by the 'id' attribute below).|| NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are|       used together.|<server><id>deploymentRepo</id><username>repouser</username><password>repopwd</password></server>--><!-- Another sample, using keys to authenticate.<server><id>siteServer</id><privateKey>/path/to/private/key</privateKey><passphrase>optional; leave empty if not used.</passphrase></server>--></servers><!-- mirrors| This is a list of mirrors to be used in downloading artifacts from remote repositories.|| It works like this: a POM may declare a repository to use in resolving certain artifacts.| However, this repository may have problems with heavy traffic at times, so people have mirrored| it to several places.|| That repository definition will have a unique id, so we can create a mirror reference for that| repository, to be used as an alternate download site. The mirror site will be the preferred| server for that repository.|--><mirrors><!-- <mirror><id>UK</id><name>UK Central</name><url>http://uk.maven.org/maven2</url><mirrorOf>central</mirrorOf></mirror><mirror><id>sonatype</id><name>sonatype Central</name><url>http://repository.sonatype.org/content/groups/public</url><mirrorOf>central</mirrorOf>
</mirror><mirror><id>jboss-public-repository-group</id><name>JBoss Public Repository Group</name><url>http://repository.jboss.org/nexus/content/groups/public</url><mirrorOf>central</mirrorOf>
</mirror>
<mirror><id>mulesoft-public-repository-group</id><name>Mulesoft Public Repository Group</name><url>https://repository-master.mulesoft.org/nexus/content/groups/public</url><mirrorOf>central</mirrorOf>
</mirror>
<mirror><id>gradle-public-repository-group</id><name>Gradle Public Repository Group</name><url>http://gradle.artifactoryonline.com/gradle/libs</url><mirrorOf>central</mirrorOf>
</mirror><mirror>  <id>CN</id>  <name>OSChina Central</name><url>http://maven.oschina.net/content/groups/public</url>  <mirrorOf>central</mirrorOf>  </mirror>   <mirror>     <id>Central</id><name>Central</name>  <url>http://repo1.maven.org/maven2</url><mirrorOf>central</mirrorOf>     </mirror> --><!--   <mirror>     <id>Central</id>     <url>http://localhost:8081/nexus/content/groups/public/</url>     <mirrorOf>central</mirrorOf>     </mirror>   --><!-- mirror| Specifies a repository mirror site to use instead of a given repository. The repository that| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.|<mirror><id>mirrorId</id><mirrorOf>repositoryId</mirrorOf><name>Human Readable Name for this Mirror.</name><url>http://my.repository.com/repo/path</url></mirror>--></mirrors><!-- profiles| This is a list of profiles which can be activated in a variety of ways, and which can modify| the build process. Profiles provided in the settings.xml are intended to provide local machine-| specific paths and repository locations which allow the build to work in the local environment.|| For example, if you have an integration testing plugin - like cactus - that needs to know where| your Tomcat instance is installed, you can provide a variable here such that the variable is| dereferenced during the build process to configure the cactus plugin.|| As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles| section of this document (settings.xml) - will be discussed later. Another way essentially| relies on the detection of a system property, either matching a particular value for the property,| or merely testing its existence. Profiles can also be activated by JDK version prefix, where a| value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.| Finally, the list of active profiles can be specified directly from the command line.|| NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact|       repositories, plugin repositories, and free-form properties to be used as configuration|       variables for plugins in the POM.||--><profiles>  <profile>  <id>dev</id><repositories><repository>
              <id>central</id><name>Central Repository</name><url>http://192.168.6.1/nexus/content/groups/public</url><layout>default</layout><snapshots><enabled>false</enabled></snapshots></repository><repository><id>central2</id><name>Central Repository2</name><url>http://repo1.maven.apache.org/maven2</url><layout>default</layout><snapshots><enabled>false</enabled></snapshots></repository></repositories><pluginRepositories>  <pluginRepository>  <id>nexus</id>  <url>http://192.168.6.1/nexus/content/groups/public</url>  <releases>  <enabled>true</enabled>  </releases>  <snapshots>  <enabled>true</enabled>  </snapshots>  </pluginRepository><pluginRepository>  <id>repoplugin</id>  <url>http://repo1.maven.org/maven2</url>  <releases>  <enabled>true</enabled>  </releases>  <snapshots>  <enabled>true</enabled>  </snapshots>  </pluginRepository><pluginRepository>  <id>oschinaplug</id>  <url>http://maven.oschina.net/content/groups/public</url>  <releases>  <enabled>true</enabled>  </releases>  <snapshots>  <enabled>true</enabled>  </snapshots>  </pluginRepository></pluginRepositories>  </profile> </profiles><activeProfiles><activeProfile>dev</activeProfile></activeProfiles><!-- profile| Specifies a set of introductions to the build process, to be activated using one or more of the| mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>| or the command line, profiles have to have an ID that is unique.|| An encouraged best practice for profile identification is to use a consistent naming convention| for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.| This will make it more intuitive to understand what the set of introduced profiles is attempting| to accomplish, particularly when you only have a list of profile id's for debug.|| This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.<profile><id>jdk-1.4</id><activation><jdk>1.4</jdk></activation><repositories><repository><id>jdk14</id><name>Repository for JDK 1.4 builds</name><url>http://www.myhost.com/maven/jdk14</url><layout>default</layout><snapshotPolicy>always</snapshotPolicy></repository></repositories></profile>--><!--| Here is another profile, activated by the system property 'target-env' with a value of 'dev',| which provides a specific path to the Tomcat instance. To use this, your plugin configuration| might hypothetically look like:|| ...| <plugin>|   <groupId>org.myco.myplugins</groupId>|   <artifactId>myplugin</artifactId>||   <configuration>|     <tomcatLocation>${tomcatPath}</tomcatLocation>|   </configuration>| </plugin>| ...|| NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to|       anything, you could just leave off the <value/> inside the activation-property.|<profile><id>env-dev</id><activation><property><name>target-env</name><value>dev</value></property></activation><properties><tomcatPath>/path/to/tomcat/instance</tomcatPath></properties></profile>--><!-- activeProfiles| List of profiles that are active for all builds.|<activeProfiles><activeProfile>alwaysActiveProfile</activeProfile><activeProfile>anotherAlwaysActiveProfile</activeProfile></activeProfiles>--><!--  <activeProfiles>  <activeProfile>dev</activeProfile>  </activeProfiles>
--></settings>

如果在本地搭建了私有仓库,可以使用上述的配置方式,这样,先从本地的maven仓库来获取资源,速度会快很多

转载于:https://www.cnblogs.com/avivaye/p/6519166.html

[maven] settings 文件 本地maven仓库相关推荐

  1. linux maven .m2文件夹,maven本地仓库.m2文件夹路径讲解

    Maven是一个项目管理工具,它包含了一个项目对象模型 (Project Object Model),一组标准集合,一个项目生命周期(Project Lifecycle),一个依赖管理系统(Depen ...

  2. maven settings 文件位置

    一般在企业中我们都会在maven 的settings文件中配置代理什么的,用来去公司的仓库中拉取代码.在入职第一天,除了安装开发环境,我想最重要的就是找同事要settings文件的内容了吧! sett ...

  3. linux maven .m2文件夹,Maven .m2文件夹创建(示例代码)

    settings.xml存在于两个地方: 1.安装的地方:$M2_HOME/conf/settings.xml 2.用户的目录:${user.home}/.m2/settings.xml 前者又被叫做 ...

  4. 【maven】论 maven settings 文件 mirrors 对 IDEA 的影响

    文章目录 1.概述 1.概述 事情是这样的.我们要升级flink 1.9.1 升级到 1.12.4,然后因为在内网,所以我拷贝了大量的jar包,然后先放在本地,然后再放入内网的私服上,结果,我的代码需 ...

  5. mac苹果 配置maven settings文件【注意,与win环境不一样!!!】

    打开settings.xml文件 在中粘贴一下内容 <mirror><id>nexus</id><mirrorOf>*</mirrorOf> ...

  6. Maven settings.xml 文件详解

    概述 settings.xml 文件中的 settings 元素包含用于以各种方式配置 Maven 的元素(就像 pom.xml 文件一样),但不应捆绑到任何特定项目,或分发给受众.其中包括本地存储库 ...

  7. Maven配置环境变量、修改本地仓库、修改settings.xml以及添加为settings.xml配置镜像仓库

    一.配置环境变量 配置maven环境变量 在我的电脑-------属性-------高级系统设置---------环境变量---------系统变量--------新建 变量名:MAVEN_HOME变 ...

  8. Maven 添加本地 jar 包、添加依赖 jar 文件到本地 Maven 仓库、引用本地 jar

    前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. 1. 把要用的jar放在固定位置: 2.打开CMD,进入到libs文件夹: 3.运行如下命令: mv ...

  9. Gradle 设置 本地maven仓库及发布mavenLocal()路径的方法

    2019独角兽企业重金招聘Python工程师标准>>> 最近在学习Gradle,在配置maven仓库时遇到一个很奇怪的问题.因为之前已经在自己机器上下载了一些maven的本地缓存,所 ...

最新文章

  1. GitHub开源蔡徐坤打篮球
  2. Redis适用于高并发的递增、递减功能
  3. 影视或游戏:中国视效人才的「进与退」
  4. Tesseract 3 语言数据的训练方法【转】http://blog.csdn.net/dragoo1/article/details/8439373
  5. Redis一个命令请求从发送到完成的步骤以及初始化服务器步骤
  6. git如何选择性合并_小姐姐用 10 张动图,教会你 Git 命令使用
  7. Anatomy of a Flink Program(Flink程序的剖析)
  8. JS模拟实现数组的map方法
  9. 热炉法则:规章制度面前人人平等 | 每天成就更大成功
  10. a113 智能音箱芯片方案_智能音箱九大芯片方案商及其生产厂商和代表作品介绍...
  11. PYTHON 之 多线程 and 多进程
  12. Unity开发VR项目(四)—— 创建VR场景
  13. dataframe类型数据的遍历_pandas中遍历dataframe的每一个元素
  14. docker安装mysql 并挂载目录
  15. 《联邦学习实战》杨强 读书笔记十七——联邦学习加速方法
  16. JSP页面调用log4j写日志文件
  17. 自动驾驶定位技术之争:融合定位才是出路
  18. telnet ip地址报接口23连接失败。
  19. 页面自动化之 selenium(一) 自动签到与签退
  20. JavaScript我的常用函数库

热门文章

  1. react不同环境不同配置angular_DevOps 前端项目(angular、vue、react)打包静态资源生成一份Docker镜像支持部署不同环境...
  2. Mysql while 嵌套 cursor 游标, 数据迁移
  3. 网站PC端跟移动端有哪些不同的区别所在?
  4. 浅析如何扩大企业网站营销利益
  5. 如何有效建设网站外链?
  6. java sessionstate_在Java Web开发中自定义Session
  7. docker lamp php7,如何用docker安装lamp
  8. gpu浮点计算能力floaps_聊聊 GPU 峰值计算能力
  9. 开发日记-20190704 关键词 读书笔记《Linux 系统管理技术手册(第二版)》DAY 10
  10. DDos攻击,使用深度学习中 栈式自编码的算法