<?xml version="1.0" encoding="UTF-8"?>
<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>D:\softwareinstall\repository</localRepository>
<pluginGroups></pluginGroups>
<proxies></proxies>
<servers>
<server>
<id>nexus</id> <!--第一个nexus要和下面的mirror中的id一致,代表拉取是也需要进行身份校验-->
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>Releases_Local</id> <!--第一个nexus要和下面的mirror中的id一致,代表拉取是也需要进行身份校验-->
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>Snapshots_Local</id><!--稳定版仓库,jar上传时候进行的验证,id对应的是pom中id属性的值-->
<username>admin1</username>
<password>admin123</password>
</server>
</servers>
<mirrors>
<mirror>
<id>nexus</id>
<name>internal nexus repository</name>
<url>http://localhost:8081/repository/maven-public/</url><!--镜像采用默认的组的地址-->
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
<profile>
<id>nexus_local</id>
<!--声明一个或多个远程仓库 -->
<repositories>
<!-- 声明一个 Nexus 私服上的仓库 -->
<repository>
<!--仓库id -->
<id>nexus</id>
<!-- 仓库的名称 -->
<name>nexus</name>
<!--仓库的地址 -->
<url>http://localhost:8081/nexus/content/groups/public/</url>
<!-- 是否开启该仓库的 release 版本下载支持 -->
<releases>
<enabled>true</enabled>
</releases>
<!-- 是否开启该仓库的 snapshot 版本下载支持 -->
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<!-- 声明一个或多个远程插件仓库(通常用不着,可以省略不写) -->
<pluginRepositories>
<!--声明一个 Nexus 私服上的插件仓库 -->
<pluginRepository>
<!--插件仓库 id -->
<id>nexus</id>
<!--插件仓库 名称 -->
<name>nexus</name>
<!-- 配置的插件仓库的地址 -->
<url>http://localhost:8081/nexus/content/groups/public/</url>
<!-- 是否开启该插件仓库的 release 版本下载支持 -->
<releases>
<enabled>true</enabled>
</releases>
<!-- 是否开启该插件仓库的 snapshot 版本下载支持 -->
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<!--激活指定环境/配置 -->
<activeProfiles>
<activeProfile>nexus_local</activeProfile>
</activeProfiles>
</settings>
settings.xml
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 一、配置分级 首先需要了解的是Maven配置文件以及配置方式的分级,才能做到我们自己在日常开发配置中灵活使用。根据...
- 一、前言 Maven有一个settings.xml配置文件,它是用来设置 Maven 参数的配置文件,settin...
- 这是maven 自定义仓库配置方案。本地仓库默认放在C盘,如果要想将本地仓库转移到指定到自动以的位置,就需要配置s...
- 概述 settings.xml 文件中的 settings 元素包含用于以各种方式配置 Maven 的元素(就像 ...