maven的setting,配置遠程庫。
<mirrors> <mirror> <id>mirror-local</id> <!-- 優先從這個id的遠程倉庫取 --> <mirrorOf>local-repo</mirrorOf> <url>http://10.1.1.1:8081/nexus/content/groups/public/</url> </mirror> <mirror> <id>mirror-aliyun</id> <!-- 不在本地倉庫的文件才從該鏡像獲取 --> <mirrorOf>external:*</mirrorOf> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> </mirror> </mirrors>
本地庫配置
</profiles> <profile> <id>profile-local</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>local-repo</id> <url>http://10.1.1.1:8081/nexus/content/groups/public</url> <releases><enabled>true</enabled></releases> <snapshots> <enable>true</enable> <updatePolicy>daily</updatePolicy> </snapshots> </repository> </repositories> </profile> </profiles>
<activeProfiles> <activeProfile>profile-local</activeProfile> </activeProfiles>