完美解决Maven仓库下载jar包慢,龟速!!!

点我 如何下载配置Maven :https://blog.csdn.net/CSDN_java1005/article/details/114320883


我们从网上下载的apche-maven,settings中配置下载镜像是从国外网站下载,所以它下载的不会太快。一下是我收藏的一些国内的下载镜像。亲测很好用,完美解决掉这类问题!!!

打开我们在网上下载的apache-maven-3.6.3\conf ,可以看到如下图的目录,打开settings.xml文件。
在这里插入图片描述

在settings.xml 文件中找到<mirrors>这个标签,如下图,可以看到有一个-->符号,在它的后面添加镜像
在这里插入图片描述

    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>        
    </mirror>
    
    <mirror>  
      <id>CN</id>    
      <name>OSChina Central</name>                                                                                                                           
      <url>http://maven.oschina.net/content/groups/public/</url>    
      <mirrorOf>central</mirrorOf>  
    </mirror>  
    <mirror>      
          <id>repo2</id>      
          <mirrorOf>central</mirrorOf>      
          <name>Human Readable Name for this Mirror.</name>      
          <url>http://repo2.maven.org/maven2/</url>      
    </mirror>      
    <mirror>      
          <id>net-cn</id>      
          <mirrorOf>central</mirrorOf>      
          <name>Human Readable Name for this Mirror.</name>      
          <url>http://maven.net.cn/content/groups/public/</url>       
    </mirror>      
    <mirror>      
          <id>ui</id>      
          <mirrorOf>central</mirrorOf>      
          <name>Human Readable Name for this Mirror.</name>      
         <url>http://uk.maven.org/maven2/</url>      
    </mirror>      
    <mirror>      
          <id>ibiblio</id>      
          <mirrorOf>central</mirrorOf>      
          <name>Human Readable Name for this Mirror.</name>      
         <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>      
    </mirror>      
    <mirror>      
          <id>jboss-public-repository-group</id>      
          <mirrorOf>central</mirrorOf>      
          <name>JBoss Public Repository Group</name>      
         <url>http://repository.jboss.org/nexus/content/groups/public</url>      
    </mirror>     
    <mirror>      
          <id>JBossJBPM</id>  
          <mirrorOf>central</mirrorOf>  
          <name>JBossJBPM Repository</name>  
          <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>  
    </mirror>  
         <mirror>      
          <id>antelink</id>  
          <mirrorOf>central</mirrorOf>  
          <name>antelink Repository</name>  
          <url>http://maven.antelink.com/content/repositories/central/</url>  
    </mirror>  
    <mirror>      
          <id>openkoala</id>  
          <mirrorOf>central</mirrorOf>  
          <name>openkoala Repository</name>  
          <url>http://nexus.openkoala.org/nexus/content/groups/Koala-release/</url>  
    </mirror>  
    <mirror>      
          <id>tmatesoft</id>  
          <mirrorOf>central</mirrorOf>  
          <name>tmatesoft Repository</name>  
          <url>http://maven.tmatesoft.com/content/groups/public/</url>  
    </mirror>  
    <mirror>      
          <id>mavensync</id>  
          <mirrorOf>central</mirrorOf>  
          <name>mavensync Repository</name>  
          <url>http://mavensync.zkoss.org/maven2/</url>  
    </mirror>

猜你喜欢

转载自blog.csdn.net/CSDN_java1005/article/details/114376257