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 两个文件 ...
随机推荐
- Android 一个相对完整的自动升级功能实现代码
由于项目的需要最近做了一个关于Android自动升级的功能,下面将贴出Android手机客户端的完整代码.这段代码参考别的代码居多,由于不满足需求,所以自己仅仅改了一些需要变动的内容,其他功能都是按照 ...
- Centos6.4安装配置sendmail
一.安装sendmail yum install -y sendmail yum install -y sendmail-cf 二. 安装salauthd //使用SMTP认证,需要安装saslaut ...
- python利用beautifulSoup写爬虫
python BeautifulSoup模块的安装 安装包下载地址:http://www.crummy.com/software/BeautifulSoup/#Download 文档:http://w ...
- Linux 下的编译安装说明
https://www.linuxidc.com/Linux/2017-02/140309.htm
- 学习JAVA第一章的心得
我抱着万分期待的心情开始了我第一天的JAVA学习课程,其实在第一开始的时候我对计算机行业便有很高地兴趣了.这主要归功于我真的从很小开始就就接触了电脑.进入学校以来,我就很期待老师会怎样教我们,会怎样带 ...
- JS计算混合字符串长度
用的是正则表达式 var str = ”坦克是tank的音译”; var len = str.match(/[^ -~]/g) == null ? str.length : str.length + ...
- SpringBoot日记——MQ消息队列整合(一)
除了之前讲到的缓存,我们还会用到消息队列来存储一些消息,为了提升系统的异步性能等等: 消息服务有两个概念需要知道:消息代理-message broker,目的地-destination.消息发送由代理 ...
- Docker_容器化gitlab
Docker部署接口自动化持续集成环境第一步,容器化一个Gitlab! 1:开放防火墙端口 sudo yum install curl openssh-server openssh-clients p ...
- 用opencv实现工控机的开机录像
需要训练一个神经网络模型,可能需要用到很多视频数据,所以我想把手头的工控机设置为上电自启动,再借助opencv编译一个可执行文件,放在windows开机启动文件夹里,这样只要连接好摄像头和工控机以及电 ...
- B1010.一元多项式求导
12/25 #include<bits/stdc++.h> using namespace std; void solve(){ int A,B,coef,exp; cin>> ...