08.基于IDEA+Spring+Maven搭建测试项目--Maven的配置文件settings.xml
<?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的更多相关文章
- 02.基于IDEA+Spring+Maven搭建测试项目--详细过程
一.背景介绍 1.1公司相关技术 Git:是一款免费的开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目,方便多人集成开发 Maven:是基于项目对象模型(POM),可以通过一小段描述信息 ...
- 01.基于IDEA+Spring+Maven搭建测试项目--综述
目前公司的测试工作中常见两种接口:HTTP和Dubbo,这两种接口类型均可以使用相关测试工具进行测试,但都会有一定的局限性和不便之处,具体如下: 1.HTTP接口,当需要对于参数进行加密解密时,就得对 ...
- 07.基于IDEA+Spring+Maven搭建测试项目--logback.xml配置
<?xml version="1.0" encoding="UTF-8"?> <configuration> <!-- 控制台日志 ...
- 05.基于IDEA+Spring+Maven搭建测试项目--web.xml配置
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" " ...
- 03.基于IDEA+Spring+Maven搭建测试项目--常用dependency
<!--常用的依赖配置--> <!--未展示完整的pom.xml文件内容--> <properties> <java.version>1.8</j ...
- 06.基于IDEA+Spring+Maven搭建测试项目--dubbo-consumer.xml配置
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
- 04.基于IDEA+Spring+Maven搭建测试项目--application-context.xml配置
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
- eclipse中 使用maven搭建ssh项目 思路复习(含有pom.xml)
首先在web.xml中配置监听器 在服务器启动的时候 进行bean对象的创建(只会创建单例对象 dao service 多例对象action可不会创建 每个多例对象是不同的 创建了有什么意义呢 ...
- Maven 搭建 SSM 项目 (oracle)
简单谈一下maven搭建 ssm 项目 (使用数据库oracle,比 mysql 难,所以这里谈一下) 在创建maven 的web项目时,常常会缺了main/java , main/test 两个文件 ...
随机推荐
- C++的命名空间的使用
C++语言引入命名空间(Namespace)这一概念主要是为了避免命名冲突,其关键字为 namespace. 科技发展到如今,一个系统通常都不会仅由一个人来开发完成,不同的人开发同一个系统,不可避免地 ...
- Python开发简单爬虫
简单爬虫框架: 爬虫调度器 -> URL管理器 -> 网页下载器(urllib2) -> 网页解析器(BeautifulSoup) -> 价值数据 Demo1: # codin ...
- java中CyclicBarrier简单入门使用
一个同步辅助类,它同意一组线程互相等待,直到到达某个公共屏障点 (common barrier point). 在涉及一组固定大小的线程的程序中,这些线程必须不时地互相等待.此时 CyclicBarr ...
- Regionserver启动后又关闭
今天启动hbase shell,输入hbase命令时报错: ERROR [regionserver/regionserver1/172.18.0.61:16020] reggionserver.HRe ...
- 20155210 Exp8 WEB基础实践
Exp8 WEB基础实践 Apache环境配置 apache是kali下的web服务器,通过访问ip地址+端口号+文件名称可以打开对应的网页. 输入命令vi /etc/apache2/ports.co ...
- 2017-2018 Exp9 网络欺诈技术防范 20155214
目录 Exp9 网络欺诈技术防范 实验内容 Webgoat General Access Control Flaws Crossing-Site Scripting Injection Flaws 知 ...
- 20155227《网络对抗》Exp7 网络欺诈防范
20155227<网络对抗>Exp7 网络欺诈防范 实践内容(3.5分) 本实践的目标理解常用网络欺诈背后的原理,以提高防范意识,并提出具体防范方法.具体实践有 (1)简单应用SET工具建 ...
- 【第四课】Linux的基础命令使用
目录 一.passwd重置密码 二.单用户模式 三.救援模式 四.设置SElinux 五.Linux的常用基础命令详解 5.1.mkdir命令 5.2.ls命令 5.3.cd命令 5.4.chmod命 ...
- LOJ.#6468. 魔法[差分+树状数组]
题意 题目链接 分析 将询问差分并不断加入颜色. 每种颜色,一个位置 \(p\) 都只会走到与之左右相邻的两个位置之一,分类讨论 \(\rm |A-B|\) 的符号. 实现可以使用树状数组. 总时间复 ...
- 设计模式 笔记 单例模式 Singleton
//---------------------------15/04/09---------------------------- //Singleton 单例模式-----对象创建型模式 /* 1: ...