IDEA下Maven依赖包下载不下来的问题解决方案

在Mac下使用IDEA作为开发环境时,如果遇到maven依赖的包不能下载,可以看看是不是其setting.xml文件配置的问题,注意默认情况下,其指向的镜像服务器是否是http://repo.maven.apache.org/maven2。

设置方法,可以通过右键项目找到maven选项,open setting.xml选项进行时修改配置文件。
 
 
 
 
<?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">
    <servers>

        <server>
            <id>nexus-snapshots</id>
            <username>deployment</username>
            <password>123456</password>
        </server>

    </servers>

    <mirrors>

        <mirror>
            <id>nexus</id>
            <name>internal nexus repository</name>
            <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
            <url>http://repo.maven.apache.org/maven2</url>
            <mirrorOf>central</mirrorOf>
        </mirror>

    </mirrors>

</settings>
已标记关键词 清除标记
项目一下载jar就报这个错误,而且这个jar本身是在.m2的文件夹下是存在的,不知道为什么就报错,删除重新下载也不行,整个文件夹删除下载也不行,设置强制下载也不行,我现在都无语了,maven 不知道是怎么回事,是不是重装系统的问题啊,我的配置没问题啊,在cmd下查看版本号环境变量也没问题: C:\Users\dl>mvn -v Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00) Maven home: C:\apache-maven-3.3.9\bin\.. Java version: 1.7.0_79, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.7.0_79\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "windows" **在cmd下用 mvn help:system 命令可以下载jar,而且很快,eclipe下右键update就不行,运行一会九堡下边的错误.** 还有就是jar下载特别特别慢,基本上是下载下来,重装之前不这样啊,下载一会就 报边的错误。.m2文件夹下全是sha1..properties 文件,就是下载下来jar,自己下载,放进去也不管用,照样重新下载。 报的下面的错误 Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'plate-prototype'. Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页