<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.
授权给阿帕奇软件基金会(ASF)下或多个贡献者许可协议。
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 at
http://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:
| 这个是Mavne的配置文件,它可以被指定为两个水平
|
| 1. User Level. This settings.xml file provides configuration for a single user,
| and is normally provided in ${user.home}/.m2/settings.xml.
| 1. 用户 水平 这个setting.xml文件 为单一用户使用提供了配置,
| 这个文件一般会放到${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.
| 2.全局水平 这个setting.xml文件为同一台机器上的所有的Maven用户提供配置。(假设
| 他们用同一个安装目下的Maven),这个文件通常存放在${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.
| 在这个示例的部分文件的目的是给你一个开始运行
| 得到最出你的Maven安装。
| 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
| 本地仓库
| The path to the local repository maven will use to store artifacts.
| Maven用来存储工件的本地仓库路径
| Default: ${user.home}/.m2/repository
| 默认值为:${user.home}/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->
<!-- interactiveMode
|-- 交互模式
| This will determine whether maven prompts you when it needs input.
| 这将决定当Maven需要输入信息时是否提示你。
| If set to false, maven will use a sensible default value, perhaps based on some other setting, for
| the parameter in question.
|
| 当设置为false,需要的参数问题,Maven将使用合理的默认值,可能会基于一些其他的设置
| Default: true
<interactiveMode>true</interactiveMode>
-->
<!-- offline
|-- 离线
| Determines whether maven should attempt to connect to the network when executing a build.
| 决定当maven要是执行项目构建时,是否尝试进行网络连接。
| 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.
| 这是一个附加的group 标签列表,当解析插件时,这个列表将会被他们的前缀所搜索。
| when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
| 也就是说 当执行一行命令,如“mvn prefix:goal”.Maven将自动的添加"org.apache.maven.plugins"和“org.codehaus.mojo” group标签
| "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.
| 指定一个更深一层的group标签用于插件查找
<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.
| 这是一个身份验证配置文件列表,由服务器id键控系统中使用。
| Authentication profiles can be used whenever maven must make a connection to a remote server.
| 每当maven要与远程服务建立连接的时候身份配置文件列表都将被使用。
|-->
<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).
| 当Maven需要连接一个指定的servcie,指定的身份验证信息将要使用,以在系统中唯一的不重名的名称标识
|(下面我们称之为“id”)
|
| NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
| used together.
| 注意:你应该要么指定username/password或者privateKey/passphrase成对的指定。
|
<server>
<id>deploymentRepo</id>
<username>repouser</username>
<password>repopwd</password>
</server>
-->
<!-- Another sample, using keys to authenticate.
另外一个例子,用keys鉴定
<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.
| 它们像这样工作,一个POM可已声明一个仓库用来存储某些工件。
| 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.
| 仓库定义需要有一个唯一的id,所以我们能够为这个仓库创建一个镜像参考,用作一个轮流的下载站点。
| 这个镜像站点被这个仓库用为优先的服务。
|-->
<mirrors>
<!-- 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.
| 在setting.xml中提供的配置文件是为了提供配置本地机器的特殊路径和在本地环境中允许构建项目仓库位置的配置。
|
| 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.
| 例如,如果你有一个集成测试插件 - 例如cactus- 它需要知道你Tomcat实例的安装目录,你能够
| 提供一个变量,在这里这个变量在项目构建过程安装cactus插件时会被间接使用。
|
| 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.
| 作为文档的一部分(setting.xml),我们稍后讨论.
| 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.
| 另一种方式本质上是依靠系统属性上的探查,或者为性能匹配匹配上的特殊值,又或者仅仅是探测它是否存在。
| 配置文件也能够被JDK的版本前缀所激活,这个值“1.4”就可能激活一个配置文件,当这个项目构建运行在“1.4.2_07”
| 版本的JDK上。最后,现有的配置文件列表能够被来自命令行的指令立即指定。
| 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.
| 注意:定义在setting.xml的配置文件,仅限于你指定工件仓库、插件仓库和在POM中被用作配置插件的自由形态的属性
|-->
<profiles>
<!-- 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>
-->
</profiles>
<!-- activeProfiles
| List of profiles that are active for all builds.
|
<activeProfiles>
<activeProfile>alwaysActiveProfile</activeProfile>
<activeProfile>anotherAlwaysActiveProfile</activeProfile>
</activeProfiles>
-->
</settings>
相关推荐
用于maven setting.xml文件丢失,eclipse集成maven插件.m2下无setting.xml文件需要配置的情况
Maven的setting.xml下载
maven setting.xml 配置文件,maven依赖包资源阿里代理配置
国内连接maven官方的仓库更新依赖,收集一些国内快速的maven仓库镜像以备用。 settings.xml配置好的国内私服,直接可以下载使用!
改为使用国内的阿里镜像
在Maven的世界里,`pom.xml`和`settings.xml`是两个至关重要的配置文件,它们共同决定了Maven项目的构建过程和环境配置。`pom.xml`(Project Object Model)文件是每个Maven项目的核心,它包含了项目的基本信息、...
一、Idea关联的maven本地仓库配置文件settings.xml (1)必须使用默认文件名 D:\developsoft\javaweb\commonPlugins\maven\apache-maven-3.8.1_first\conf\settings.xml 二、Myeclipse关联的maven本地仓库配置文件...
Maven setting.xml配置
<url>http://maven.aliyun.com/nexus/content/groups/public/</url> * ``` 这段代码中,`id`是镜像的唯一标识,`name`是镜像的描述,`url`是阿里云镜像的地址,`mirrorOf`设定为`*`表示所有仓库请求都将...
maven 连接阿里云仓库setting.xml配置
settings.xml配置
分享一个快的飞起的maven的settings.xml文件. 直接使用开源中国的中央仓库。
ali maven setting.xml 配置文件,
这是我配置阿里云的maven私服的setting.xml文件,MirroOf配置不是*号,是central,这样在项目pom中配置repository依然生效
maven的华为云镜像的setting.xml文件
默认情况下该列表包含了org.apache.maven.plugins和org.codehaus.mojo。 * proxies:用来配置不同的代理,多代理profiles可以应对笔记本或移动设备的工作环境:通过简单的设置profile id就可以很容易的更换整个代理...
maven linux 安装时配置文件 settings.xml 配置阿里云镜像 使用时请修改本地仓库路径
Maven原版settings.xml配置文件,根据个人需要,可以打开对应注释或替换相关阿里云镜像或远程仓库地址即可使用。
maven的settings.xml 配置文件。自己用的阿里的源。 有需要的朋友可以下载,遇到问题可以私信我。
Maven的配置文件,settings.xml文件