maven setting.xml 多倉庫配置(外掛依賴來自不同私服,須保證pom.xml中外掛版本的唯一性)
阿新 • • 發佈:2019-02-04
<?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
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<mirrors>
<mirror>
<id>nexus-public</id>
<name>Maven China Mirror</name>
<url>http://maven.net.cn/content/groups/public/</url>
<mirrorOf>*</mirrorOf>
</mirror>
<mirror>
<id>local-public</id>
<name>local Mirror</name>
<url>http://maven.net.cn/content/groups/public/</url>
<mirrorOf>rockRelease</mirrorOf>
</mirror>
</mirrors>
<proxies/>
<profiles>
<profile>
<id>jdk-1.7</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.7</jdk>
</activation>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
</properties>
</profile>
<profile>
<id>sit</id>
<properties>
<env>sit</env>
</properties>
</profile>
<profile>
<id>sit</id>
<properties>
<env>sit</env>
</properties>
<!-- 設定預設打包環境 -->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 設定私服profile -->
<profile>
<id>chinaRepo</id>
<repositories>
<repository>
<id>control-release</id>
<name>provate Nexus of Control</name>
<url>http://200.201.202.203:18081/nexus/content/repositories/control-release/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>control-snapshots</id>
<name>provate Nexus of Control</name>
<url>http://200.201.202.203:18081/nexus/content/repositories/control-snapshots/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
<!-- 倉庫配置2 -->
<profile>
<id>ggyLocalRepo</id>
<repositories>
<repository>
<id>rockRelease</id>
<name>provate Nexus of Local</name>
<url>http://200.201.202.203:9999/nexus/content/repositorie/thirdparty/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
<server>
<id>tomcat</id>
<username>admin</username>
<password>admin</password>
</server>
</profiles>
<activeProfiles>
<!-- 倉庫1 -->
<activeProfile>chinaRepo<activeProfile>
<!-- 倉庫2 -->
<activeProfile>ggyLocalRepo<activeProfile>
</activeProfiles>
</settings>
<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
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<mirrors>
<mirror>
<id>nexus-public</id>
<name>Maven China Mirror</name>
<url>http://maven.net.cn/content/groups/public/</url>
<mirrorOf>*</mirrorOf>
</mirror>
<mirror>
<id>local-public</id>
<name>local Mirror</name>
<url>http://maven.net.cn/content/groups/public/</url>
<mirrorOf>rockRelease</mirrorOf>
</mirror>
</mirrors>
<proxies/>
<profiles>
<profile>
<id>jdk-1.7</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.7</jdk>
</activation>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
</properties>
</profile>
<profile>
<id>sit</id>
<properties>
<env>sit</env>
</properties>
</profile>
<profile>
<id>sit</id>
<properties>
<env>sit</env>
</properties>
<!-- 設定預設打包環境 -->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 設定私服profile -->
<profile>
<id>chinaRepo</id>
<repositories>
<repository>
<id>control-release</id>
<name>provate Nexus of Control</name>
<url>http://200.201.202.203:18081/nexus/content/repositories/control-release/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>control-snapshots</id>
<name>provate Nexus of Control</name>
<url>http://200.201.202.203:18081/nexus/content/repositories/control-snapshots/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
<!-- 倉庫配置2 -->
<profile>
<id>ggyLocalRepo</id>
<repositories>
<repository>
<id>rockRelease</id>
<name>provate Nexus of Local</name>
<url>http://200.201.202.203:9999/nexus/content/repositorie/thirdparty/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
<server>
<id>tomcat</id>
<username>admin</username>
<password>admin</password>
</server>
</profiles>
<activeProfiles>
<!-- 倉庫1 -->
<activeProfile>chinaRepo<activeProfile>
<!-- 倉庫2 -->
<activeProfile>ggyLocalRepo<activeProfile>
</activeProfiles>
</settings>