使用阿里云远程仓库下载jar包依赖

曾经在使用maven的默认远程仓库下载jar包时,总是得不到需要的jar包,有可能是远程仓库中的jar包不存在,或者是远程仓库地址已经废弃,改用阿里云远程仓库就可以解决问题。

在maven的conf/settings.xml配置文件中<mirrors>标签下添加子标签 <mirror>内容

<mirrors>
    <!-- 使用阿里云远程仓库下载jar包依赖 -->
    <mirror>  
        <id>nexus-aliyun</id>  
        <mirrorOf>central</mirrorOf>    
        <name>Nexus aliyun</name>  
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>  
    </mirror>

  </mirrors>

猜你喜欢

转载自blog.csdn.net/qq_16645099/article/details/82913765