<?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:\repository</localRepository>
<servers>
<!--具有部署構件權限的用戶 -->
<server>
<id>releases</id>
<username>deployment</username>
<password>deployment123</password>
</server>
<server>
<id>snapshots</id>
<username>deployment</username>
<password>deployment123</password>
</server>
</servers>
<!--配置鏡像 -->
<mirrors>
<!--這裏配置mirrorOf的值爲*,代表maven的所有訪問請求都會指向到Nexus倉庫組-->
<!--<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://127.0.0.1:8081/nexus/content/groups/public/</url>
</mirror>-->
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
<!--maven提供了profile來配置倉庫信息 -->
<profiles>
<profile>
<id>myprofile</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.7.0_80</jdk>
</activation>
<properties>
<maven.compiler.source>1.7.0_80</maven.compiler.source>
<maven.compiler.target>1.7.0_80</maven.compiler.target>
<maven.compiler.compilerVersion>1.7.0_80</maven.compiler.compilerVersion>
</properties>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<!--激活profile -->
<activeProfile>myprofile</activeProfile>
</activeProfiles>
</settings>
maven settings提速
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.