maven 报错 (无法打包)To see the full stack trace of the errors, re-run Maven with the -e switch.Re-run

报错的的内容:

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

解决方案:首先自己Maven中的setting中要有阿里云库

 <mirror>
          <id>alimaven</id>
          <name>aliyun maven</name>
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
          <mirrorOf>central</mirrorOf>
      </mirror>

然后在设置里面:

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

在这里插入图片描述

这样子如果还解决不了的话:那就还有可能是版本的问题:我当时建立了两个项目:
其中一个是:(这是打包没问题)

 <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.3</version>
        <relativePath/> 
    </parent>

但是这个版本的就出现了问题:所以我怀疑版本有可能也会影响:我用的是2018版本的idea

 <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.4.RELEASE</version>
        <relativePath/> 
    </parent>
  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值