Maven阿里云镜像仓库配置
添加阿里云的镜像到maven的setting.xml配置中,这样就不需要每次在pom中,添加镜像仓库的配置,在mirrors节点下面添加子节点:
<mirrors>
  <mirror>
    <id>nexus-aliyun</id> 
    <mirrorOf>central</mirrorOf>
    <name>Nexus aliyun</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public</url> 
  </mirror>
 </mirrors>
注:< mirrorOf>可以设置为哪个中央仓库做镜像,为名为“central”的中央仓库做镜像,写作< mirrorOf>central< /mirrorOf>;为所有中央仓库做镜像,写作< mirrorOf>< /mirrorOf>。
Maven默认中央仓库的id 为 central。id是唯一的。
重要:除非你有把握,否则不建议使用< mirrorOf>< /mirrorOf>的方式。
重要:除非你有把握,否则不建议使用< mirrorOf>< /mirrorOf>的方式。
                    
                
                
            
        
浙公网安备 33010602011771号