java - com.example:demo:0.0.1-SNAPSHOT 的不可解析父 POM
问题描述
这只是一个从https://start.spring.io/下载的演示项目
我对此很陌生,不知道如何进行
我得到的构建错误。
[INFO] Scanning for projects...
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.0.4.RELEASE/spring-boot-starter-parent-2.0.4.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from/to central (https://repo.maven.apache.org/maven2): Unrecognized SSL message, plaintext connection? and 'parent.relativePath' points at no local POM @ line 14, column 10
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.example:demo:0.0.1-SNAPSHOT (C:\Users\U660221\Downloads\demo\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from/to central (https://repo.maven.apache.org/maven2): Unrecognized SSL message, plaintext connection? and 'parent.relativePath' points at no local POM @ line 14, column 10 -> [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
解决方案
您可以像这样在 POM 中使用标签:
<parent>
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<version>1.5.7.RELEASE</version>
<relativePath/>
</parent>
推荐阅读
- amazon-web-services - 使用 CloudFormation 错误创建 ECS 集群
- cucumber - 通过传入 REST API JSON 主体对象来使用不同数据集的场景大纲
- javascript - 如何将对象推入嵌套数组
- ios - 在 Swift 中调整 UIImage 的大小以具有 512 x 512 的分辨率并保持大小小于 100 KB
- spring-boot - 第 1 行的“密码”列的数据太长
- validation - Rails 6:如何有条件地验证存在的关联?
- android - Android E/CAM_StateSaveOuc:保存结果 ro URI 时出现异常 - 没有这样的目录
- c - STM32 MCU GCC 编译行为
- javascript - 传单 TimeDimension 路径线颜色
- google-apps-script - webhooks:我在填写表格时丢失了事件