maven install 报错 Non-resolvable parent POM for
【摘要】 D:\Downloads\supersonic-master>mvn install[INFO] Scanning for projects...[INFO] Artifact org.springframework.boot:spring-boot-dependencies:pom:3.2.4 is present in the local repository, but cached f...
D:\Downloads\supersonic-master>mvn install
[INFO] Scanning for projects...
[INFO] Artifact org.springframework.boot:spring-boot-dependencies:pom:3.2.4 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [aliyunmaven (https://maven.aliyun.com/repository/public, default, releases)]
[INFO] Artifact org.springframework.boot:spring-boot-dependencies:pom:3.2.4 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [aliyunmaven (https://maven.aliyun.com/repository/public, default, releases)]
Downloading from aliyunmaven: https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-dependencies/3.2.4/spring-boot-dependencies-3.2.4.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.springframework.boot:spring-boot-starter-parent:3.2.4: The following artifacts could not be resolved: org.springframework.boot:spring-boot-dependencies:pom:3.2.4 (present, but unavailable): Could not transfer artifact org.springframework.boot:spring-boot-dependencies:pom:3.2.4 from/to aliyunmaven (https://maven.aliyun.com/repository/public): Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty @ org.springframework.boot:spring-boot-starter-parent:3.2.4, D:\Documents\.m2\repository\org\springframework\boot\spring-boot-starter-parent\3.2.4\spring-boot-starter-parent-3.2.4.pom, line 4, column 11
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.tencent.supersonic:supersonic:${revision} (D:\Downloads\supersonic-master\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.springframework.boot:spring-boot-starter-parent:3.2.4: The following artifacts could not be resolved: org.springframework.boot:spring-boot-dependencies:pom:3.2.4 (present, but unavailable): Could not transfer artifact org.springframework.boot:spring-boot-dependencies:pom:3.2.4 from/to aliyunmaven (https://maven.aliyun.com/repository/public): Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty @ org.springframework.boot:spring-boot-starter-parent:3.2.4, D:\Documents\.m2\repository\org\springframework\boot\spring-boot-starter-parent\3.2.4\spring-boot-starter-parent-3.2.4.pom, line 4, column 11 -> [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 构建错误信息来看,主要问题在于 Maven 无法从配置的阿里云 Maven 仓库(aliyunmaven)下载所需的 spring-boot-dependencies POM 文件。错误提示中出现了 java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty,这通常表明 Java 的 SSL/TLS 配置存在问题,特别是与信任库(trust store)有关。
因此,我们选择通过以下两种方式忽略证书校验
- 命令行忽略SSL校验
mvn -X clean install -Dmaven.resolver.transport=wagon -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
- IDEA忽略SSL校验
Build,Execution.Deployment --> Build Tools --> Maven --> Importing : VM options for importer 增加1中忽略ssl校验的实例;
Build,Execution.Deployment --> Build Tools --> Maven --> Runner: VM Options 增加1中忽略ssl校验的实例;
maven Runner 是在执行goals时自动添加的。
maven Importing 时idea引入依赖时的操作,此时并没有执行goals。
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)