IDEA maven报错To see the full stack trace of the errors, re-run Maven with the -e switch

  • Post author:
  • Post category:其他


这里写自定义目录标题

报错内容:

[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]     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] 

解决办法:

这个问题其实就是pom.xml文件中缺少goal,在里面补上

<defaultGoal>compile</defaultGoal>

位置如下

在这里插入图片描述

加上后,问题解决

在这里插入图片描述



版权声明:本文为weixin_45745735原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。