0


解决IDEA Maven 下载依赖包速度过慢问题 实测有效

解决IDEA Maven 下载依赖包速度过慢问题 ,jar包下载过慢,有一部分网络原因,很大一部分是因为需要请求到国外镜像仓库,响应比较慢

右键点击项目,找到maven,选择 Open ‘settings.xml’或者Create ‘settings.xml’

将以下代码粘入文件中,重启idea即可提高速度

idea超级镜像库,这是阿里云镜像库和junit镜像库

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
 
<!--    <mirror>-->
<!--      <id>mirrorId</id>-->
<!--      <mirrorOf>repositoryId</mirrorOf>-->
<!--      <name>Human Readable Name for this Mirror.</name>-->
<!--      <url>http://my.repository.com/repo/path</url>-->
<!--    </mirror>-->
 
    <mirror>
        <id>alimaven</id>
        <name>aliyun maven</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
 
    <mirror>
        <id>uk</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name for this Mirror.</name>
        <url>http://uk.maven.org/maven2/</url>
    </mirror>
 
    <mirror>
        <id>CN</id>
        <name>OSChina Central</name>
        <url>http://maven.oschina.net/content/groups/public/</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
 
    <mirror>
        <id>nexus</id>
        <name>internal nexus repository</name>
        <url>http://repo.maven.apache.org/maven2</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
 
    <!-- junit镜像地址 -->
    <mirror>
        <id>junit</id>
        <name>junit Address/</name>
        <url>http://jcenter.bintray.com/</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
 
<!--    <mirrors>-->
        <!-- mirror
         | Specifies a repository mirror site to use instead of a given repository. The repository that
         | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
         | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
         |
        <mirror>
          <id>mirrorId</id>
          <mirrorOf>repositoryId</mirrorOf>
          <name>Human Readable Name for this Mirror.</name>
          <url>http://my.repository.com/repo/path</url>
        </mirror>
         -->
 
        <mirror>
            <!--This sends everything else to /public -->
            <id>nexus-aliyun</id>
            <mirrorOf>*</mirrorOf>
            <name>Nexus aliyun</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        </mirror>
 
        <mirror>
            <id>osc</id>
            <mirrorOf>*</mirrorOf>
            <url>http://maven.oschina.net/content/groups/public/</url>
        </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>
 
    </mirrors>
</settings>
 

解决IDEA Maven 下载依赖包速度过慢问题_idea maven下载慢_离岸&南墙的博客-CSDN博客


本文转载自: https://blog.csdn.net/weixin_41695009/article/details/134339659
版权归原作者 乐高积木 所有, 如有侵权,请联系我们删除。

“解决IDEA Maven 下载依赖包速度过慢问题 实测有效”的评论:

还没有评论