参考文章:

https://www.cnblogs.com/hwaggLee/p/4579418.html

1、<localRepository/>

该值maven本地仓库的路径

<localRepository>/usr/local/maven/Repositories</localRepository>   ---可自行设定;

2、<interactiveMode/>

表示maven是否需要和用户交互以获得输入;如果maven需要和用户交互以获得输入,则设置成true,反之则应为false。默认为true。

<interactiveMode>true</interactiveMode>

3、<usePluginRegistry/>

表示maven是否需要使用plugin-registry.xml文件来管理插件版本。如果需要让maven使用文件~/.m2/plugin-registry.xml来管理插件版本,则设为true。默认为false。

<usePluginRegistry>false</usePluginRegistry>

4、<offline/>

表示maven是否需要在离线模式下运行,如果构建系统需要在离线模式下运行,则为true,默认为false,当由于网络设置原因或者安全因素,构建服务器不能连接远程仓库的时候,该配置就十分有用。

<offline>false</offline>

5、<pluginGroups/>

当插件的组织id(groupId)没有显式提供时,供搜寻插件组织Id(groupId)的列表该元素

包含一个pluginGroup元素列表,每个子元素包含了一个组织Id(groupId)。

<pluginGroups>

       <pluginGroup>org.codehaus.mojo</pluginGroup>

</pluginGroups>

6、<servers/>      ----常用配置项,常用于设置pom文件中指定的仓库的用户和密码

一般仓库的下载和部署是在pom.xml文件中的repositoriesdistributionManagement元素中定义的。然而,一般类似用户名、密码(有些仓库访问是需要安全认证的)等信息不应该在pom.xml文件中配置,这些信息可以配置在settings.xml中。

<servers>
        <server>
             <id>releases</id>                                                    ----该id与pom.xml文件中的distributionManagement中repository元素的id相匹配
             <username>admin</username>
             <password>admin123</password>
       </server>
        <server>
              <id>snapshots</id>
              <username>admin</username>
              <password>admin123</password>
        </server>
</servers>

7、<mirrors/>

为仓库列表配置的下载镜像列表,即指定默认下载仓库地址

<mirrors>
       <mirror>
            <id>nexus</id>                                                  该镜像的唯一标识符。id用来区分不同的mirror元素
            <mirrorOf>*</mirrorOf>                                     镜像的服务器的id。例如,如果我们要设置了一个Maven中央仓库(http://repo.maven.apache.org/maven2/)的镜像,就需要                                                                                        将该元素设置成central。这必须和中央仓库的id central完全一致                                         
            <name>Nexus</name>                                     镜像名称 自行设定
            <url>http://nexus.bqjr.club:8081/nexus/content/groups/public</url>            该镜像的URL。构建系统会优先考虑使用该URL,而非使用默认的服务器URL
       </mirror>
</mirrors>

maven常用配置setting.xml详解的更多相关文章

  1. Maven配置文件setting.xml详解

    注:本文来源于:大话JAVA的那些事 <Maven配置文件setting.xml详解> <?xml version="1.0" encoding="UT ...

  2. 【转】maven核心,pom.xml详解

    感谢如下博主: http://www.cnblogs.com/qq78292959/p/3711501.html maven核心,pom.xml详解 什么是pom?    pom作为项目对象模型.通过 ...

  3. Maven全局配置文件settings.xml详解(转)

    Maven全局配置文件settings.xml详解   目录 一.概要 1.settings.xml的作用2.settings.xml文件位置3.配置的优先级 二.settings.xml元素详解 1 ...

  4. Maven学习小结(六 setting.xml详解[转])

    当Maven运行过程中的各种配置,例如pom.xml,不想绑定到一个固定的project或者要分配给用户时,我们使用settings.xml中的settings元素来确定这些配置.这包含了本地仓库位置 ...

  5. maven全局配置文件settings.xml详解

    概要 settings.xml有什么用? 如果在Eclipse中使用过Maven插件,想必会有这个经验:配置settings.xml文件的路径. settings.xml文件是干什么的,为什么要配置它 ...

  6. maven核心,pom.xml详解(转)

    什么是pom?    pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者需要遵循的规则,缺陷管理系统,组织和licenses,项目的u ...

  7. [转]maven全局配置文件settings.xml详解

    概要 settings.xml有什么用? 如果在Eclipse中使用过Maven插件,想必会有这个经验:配置settings.xml文件的路径. Paste_Image.png settings.xm ...

  8. maven核心,pom.xml详解

    什么是pom?    pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者需要遵循的规则,缺陷管理系统,组织和licenses,项目的u ...

  9. [转]Maven 全局配置文件settings.xml详解

    原文地址:https://www.jianshu.com/p/110d897a5442 概要 settings.xml有什么用? 如果在Eclipse中使用过Maven插件,想必会有这个经验:配置se ...

随机推荐

  1. 【LeetCode】找出所有数组中消失的数字

    [问题] 给定一个范围在  1 ≤ a[i] ≤ n ( n = 数组大小 ) 的 整型数组,数组中的元素一些出现了两次,另一些只出现一次.找到所有在 [1, n] 范围之间没有出现在数组中的数字. ...

  2. 10. Regular Expression Matching正则表达式匹配

    Implement regular expression matching with support for '.' and '*'. '.' Matches any single character ...

  3. css文字实例锦集

    在画布上创建向上的3D拉影文字 <canvas id="myCanvas" width="410" height="130">& ...

  4. mysql导入导出无权限

    error:The MySQL server is running with the --secure-file-priv option so it cannot execute this state ...

  5. Git内部原理探索

    目录 前言 Git分区 .git版本库里的文件/目录是干什么的 Git是如何存储文件信息的 当我们执行git add.git commit时,Git背后做了什么 Git分支的本质是什么 HEAD引用 ...

  6. 016.CI4框架CodeIgniter数据库操作之:Insert插入一条数据

    01.在Model中,写入插入的语句 <?php namespace App\Models\System; use CodeIgniter\Model; class User_model ext ...

  7. parameterType和resultType

    在MyBatis中,我们通过parameterType完成输入映射(指将值映射到sql语句的占位符中,值的类型与dao层响应方法的参数类型一致),通过resultType完成输出映射(从数据库中输出, ...

  8. python 求两个数的最大公约数

    给定两个整数a,b,求他们的最大公约数 def gcd(a,b): if a<b: a,b=b,a while(a%b != 0): c = a%b a=b b=c return b a,b = ...

  9. 095-PHP遍历关联数组,并修改数组元素值

    <?php $arr=array('I'=>1,'II'=>2,'III'=>3,'IV'=>4,'V'=>5); //定义一个数组 echo '修改之前数组信息: ...

  10. 箭头函数arrow funtion

    1.定义一个匿名函数常规语法: function (x) { return x * x; } 2.该函数使用箭头函数可以使用仅仅一行代码搞定! x => x * x 箭头函数相当于匿名函数,并且 ...