之前maven本地的setting.xml的仓库配置,都是直接设置mirror节点
| 
					 1 2 3 4 5 6 7 8  | 
						    <mirrors>         <mirror>                 <id>aliyun</id>                 <name>aliyun</name>                 <mirrorOf>central</mirrorOf>                 <url>https://maven.aliyun.com/repository/central</url>             </mirror>     </mirrors>  | 
					
当多个仓库是就想到再加个mirror节点,但是这样不行
正确的配置需要再profiles节点下配置多个profile,配置完成后还需要通过activeProfiles子节点激活。
| 
					 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37  | 
							<!-- 多仓库配置  --> 	<profiles> 		<!--内网配置--> 		<profile> 			<id>maven</id> 			<repositories> 				<repository> 					<id>maven</id> 					<url>http://xxx/repository/maven-public/</url> 					<releases> 						<enabled>true</enabled> 					</releases> 					<snapshots> 						<enabled>true</enabled> 						<updatePolicy>always</updatePolicy> 					</snapshots> 				</repository> 			</repositories> 		</profile> 		<!--阿里云配置--> 		<profile> 			<id>aliyun</id> 			<repositories> 				<repository> 					<id>aliyun</id> 					<url>https://maven.aliyun.com/repository/central</url> 					<releases> 						<enabled>true</enabled> 					</releases> 					<snapshots> 						<enabled>true</enabled> 						<updatePolicy>always</updatePolicy> 					</snapshots> 				</repository> 			</repositories> 		</profile> 	</profiles>  | 
					
activeProfiles子节点激活| 
					 1 2 3 4 5  | 
						    <!--配置 activeProfiles 子节点激活-->     <activeProfiles>         <activeProfile>maven</activeProfile>         <activeProfile>aliyun</activeProfile>     </activeProfiles>  | 
					
如需配置更多,可以查看官方文档:
https://maven.apache.org/settings.html
from:https://www.shuzhiduo.com/A/x9J2YVaKz6/