maven 报错 To see the full stack trace of the errors, re-run Maven with the -e switch.Re-run Maven using the -X switch to enable full debug logging

"C:\Program Files\Java\jdk1.8.0_171\bin\java.exe" -Dmaven.multiModuleProjectDirectory=E:\A_Develop\marry\marry2.2\marry -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true "-Dmaven.home=E:\A_Development Kit\apache-maven-3.6.3" "-Dclassworlds.conf=E:\A_Development Kit\apache-maven-3.6.3\bin\m2.conf" "-Dmaven.ext.class.path=E:\A_Development Kit\IntelliJ IDEA 2020.1.3\plugins\maven\lib\maven-event-listener.jar" "-javaagent:E:\A_Development Kit\IntelliJ IDEA 2020.1.3\lib\idea_rt.jar=51683:E:\A_Development Kit\IntelliJ IDEA 2020.1.3\bin" -Dfile.encoding=UTF-8 -classpath "E:\A_Development Kit\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;E:\A_Development Kit\apache-maven-3.6.3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version2020.1.3 -s "E:\A_Development Kit\apache-maven-3.6.3\conf\settings.xml" -DskipTests=true clean
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.6.RELEASE/spring-boot-starter-parent-2.1.6.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com:marry:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.6.RELEASE/spring-boot-starter-parent-2.1.6.RELEASE.pom and 'parent.relativePath' points at wrong local POM @ line 5, column 10
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com:marry:0.0.1-SNAPSHOT (E:\A_Develop\marry\marry2.2\marry\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com:marry:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.6.RELEASE/spring-boot-starter-parent-2.1.6.RELEASE.pom and 'parent.relativePath' points at wrong local POM @ line 5, column 10: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.24.215] failed: Connection timed out: connect -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

1.首先在Maven的setting.xml里设置新版HTTPS的阿里云仓库

<mirror>    
<id>aliyunmaven</id>    
<mirrorOf>*</mirrorOf>    
<name>阿里云公共仓库</name>    
<url>https://maven.aliyun.com/repository/public</url>
</mirror>

2.然后在IDEA中设置,忽略HTTPS的SSL证书验证就好了,注意是在Maven-Importing-VM options for importer里添加

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

然后clean就会进行正常下载了。(删除lastUpdated文件)

参考一位真正负责的大佬:https://www.zhihu.com/question/350864269

posted @ 2020-08-15 01:15  cchilei  阅读(35150)  评论(0编辑  收藏  举报