<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/4.0.0 http://maven.apache.org/xsd/settings-4.0.0.xsd">
<!--本地仓库。该值表示构建系统本地仓库的路径。其默认值为%USER_HOME%/.m2/repository。-->
<localRepository>F:\Java\Maven\repository</localRepository> <!--表示Maven是否需要在离线模式下运行。如果构建系统需要在离线模式下运行,则为true,默认为false。当由于网络设置原因或者安全因素,构建服务器不能连接远程仓库的时候,该配置就十分有用。 -->
<offline>false</offline> <!-- 远程服务器部署地址配置,笔者公司信息,敏感原因去掉password -->
<servers>
<server>
<id>public</id>
<username>developer</username>
<password></password>
</server>
<server>
<id>releases</id>
<username>developer</username>
<password></password>
</server>
<server>
<id>snapshots</id>
<username>developer</username>
<password></password>
</server>
</servers> <!--设置包下载路径。-->
<!--定义公共仓库,除此之外,可能还会配置公司仓库地址-->
<mirrors>
<!-- 阿里云仓库 -->
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
<!-- 中央云仓库 -->
<mirror>
<id>repo</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</url>
</mirror> </mirrors> <!--根据环境参数来调整构建配置的列表,笔者公司信息,过滤掉参数。-->
<!--settings.xml中的profile元素是pom.xml中profile元素的裁剪版本。-->
<!--它包含了id,activation, repositories, pluginRepositories和 properties元素。-->
<!--这里的profile元素只包含这五个子元素是因为这里只关心构建系统这个整体(这正是settings.xml文件的角色定位),而非单独的项目对象模型设置。-->
<!--如果一个settings中的profile被激活,它的值会覆盖任何其它定义在POM中或者profile.xml中的带有相同id的profile。 --> <profiles>
<profile>
<id>ht-dev</id>
<!--定义的公共仓库。-->
<repositories>
<repository>
<id>public</id>
<url>http://localhost/nexus/content/groups/public/</url>
<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<url>http://localhost/nexus/content/groups/public/</url>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles> <!--手动激活profiles的列表,按照profile被应用的顺序定义activeProfile。 -->
<!--该元素包含了一组activeProfile元素,每个activeProfile都含有一个profile id。 -->
<!--任何在activeProfile中定义的profile id,不论环境设置如何,其对应的profile都会被激活。如果没有匹配的profile,则什么都不会发生。-->
<!--例如,env-test是一个activeProfile,则在pom.xml(或者profile.xml)中对应id的profile会被激活。如果运行过程中找不到这样一个profile,Maven则会像往常一样运行。 -->
<activeProfiles>
<activeProfile>ht-dev</activeProfile>
</activeProfiles>
</settings>

详细搭建过程参考:https://www.cnblogs.com/xiuxingzhe/p/9250737.html

08.基于IDEA+Spring+Maven搭建测试项目--Maven的配置文件settings.xml的更多相关文章

  1. 02.基于IDEA+Spring+Maven搭建测试项目--详细过程

    一.背景介绍 1.1公司相关技术 Git:是一款免费的开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目,方便多人集成开发 Maven:是基于项目对象模型(POM),可以通过一小段描述信息 ...

  2. 01.基于IDEA+Spring+Maven搭建测试项目--综述

    目前公司的测试工作中常见两种接口:HTTP和Dubbo,这两种接口类型均可以使用相关测试工具进行测试,但都会有一定的局限性和不便之处,具体如下: 1.HTTP接口,当需要对于参数进行加密解密时,就得对 ...

  3. 07.基于IDEA+Spring+Maven搭建测试项目--logback.xml配置

    <?xml version="1.0" encoding="UTF-8"?> <configuration> <!-- 控制台日志 ...

  4. 05.基于IDEA+Spring+Maven搭建测试项目--web.xml配置

    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" " ...

  5. 03.基于IDEA+Spring+Maven搭建测试项目--常用dependency

    <!--常用的依赖配置--> <!--未展示完整的pom.xml文件内容--> <properties> <java.version>1.8</j ...

  6. 06.基于IDEA+Spring+Maven搭建测试项目--dubbo-consumer.xml配置

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  7. 04.基于IDEA+Spring+Maven搭建测试项目--application-context.xml配置

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  8. eclipse中 使用maven搭建ssh项目 思路复习(含有pom.xml)

    首先在web.xml中配置监听器 在服务器启动的时候 进行bean对象的创建(只会创建单例对象 dao service   多例对象action可不会创建  每个多例对象是不同的 创建了有什么意义呢 ...

  9. Maven 搭建 SSM 项目 (oracle)

    简单谈一下maven搭建 ssm 项目 (使用数据库oracle,比 mysql 难,所以这里谈一下) 在创建maven 的web项目时,常常会缺了main/java , main/test 两个文件 ...

随机推荐

  1. MySQL(六)创建用户与授权

    转载自:MySQL创建用户与授权 目录 一.创建用户 二.授权 三.设置和更改用户密码 四.撤销用户权限 五.删除用户 一.创建用户 命令: CREATE USER 'username'@'host' ...

  2. input 内容改变的触发事件

    1. onchange onchange 事件会在域的内容改变时触发.支持的标签<input type="text">, <textarea>, <s ...

  3. js 获取当前页url网址信息

    转载地址:js如何准确获取当前页面url网址信息 摘录: 举例一个URL,然后获得它的各个组成部分:http://i.cnblogs.com/EditPosts.aspx?opt=1 1.window ...

  4. x window的奥秘

    阅读目录 了解自己机器上的 X Window 理解 display 和虚拟控制台 远程连接 X Server 理解 lightdm 和 X Window 桌面环境的启动过程 搞定 xauth X Se ...

  5. Android SDK版本号与API Level 的对应关系-转

    Android SDK版本号 与 API Level 对应关系 http://developer.android.com/guide/appendix/api-levels.html Android ...

  6. 20155207 《网络对抗》 Exp9 Web安全基础

    20155207 <网络对抗> Exp9 Web安全基础 实验内容 关于WebGoat Cross-Site Scripting(XSS)练习 Injection Flaws练习 CSRF ...

  7. libgdx相关知识点

    Gdx.graphics.setContinuousRendering(false); 设置图像为非连续自动渲染. 设置Opengl的混合模式,支持alpha属性 Gdx.gl.glBlendFunc ...

  8. VS Code使用Git管理代码

    Visual Studio Code(简称VS Code)是一个轻量级且强大的代码编辑器,后台是微软,支持Windows.Mac和Linux操作系统,拥有丰富的插件生态系统,可通过安装插件来支持C++ ...

  9. C#用Infragistics 导入导出Excel(一)

    最近项目中有数据的导入导出Excel的需求,这里做简单整理. 公司用的是Infragistics的产品,付费,不需要本地安装Office. 有需要的朋友可以下载 Infragistics.2013.2 ...

  10. 【中间件】Redis 实战之主从复制、高可用、分布式

    目录 简介 持久化 主从复制 高可用 Redis-Sentinel .NET Core开发 分布式 Redis-Cluster 配置说明 常见问题 简介 本节内容基于 CentOS 7.4.1708, ...