Maven:trustAnchors参数必须为非空且'parent.relativePath'@ InvalidAlgorithmParameterException @不可解析的父POM [英] Maven: trustAnchors parameter must be non-empty and 'parent.relativePath' @ InvalidAlgorithmParameterException @ Non-resolvable parent POM

查看:569
本文介绍了Maven:trustAnchors参数必须为非空且'parent.relativePath'@ InvalidAlgorithmParameterException @不可解析的父POM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Maven和Spring的新手.

I'm new to Maven and Spring.

该项目在我的本地测试环境中运行,但不在已部署的系统上运行. 在已部署的系统上: 我用OpenSDK 10.0.1,Maven 3.5.2重新安装了Ubuntu 我在不同的防火墙后面,并且具有不同的keyStore和trustStore.

The project runs in my local test environment, but not on the deployed system. On deployed system: I got a fresh installed Ubuntu with OpenSDK 10.0.1, Maven 3.5.2 I'm behind a different firewall and have a different keyStore and trustStore.

Maven吐出:

组织的不可解析的父POM.[%mything%] .app:useraut:0.0.1-SNAPSHOT:无法传输工件org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE从/到中央( https://repo.maven.apache.org/maven2 ):java .lang.RuntimeException:意外错误:java.security.InvalidAlgorithmParameterException:trustAnchors参数必须为非空且'parent.relativePath'指向无本地POM的@ 14行,第10列-> [帮助2]

Non-resolvable parent POM for org.[%mything%].app:useraut:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty and 'parent.relativePath' points at no local POM @ line 14, column 10 -> [Help 2]

pom片段:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.9.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

(未定义代理)

看来我可以找到解决方案的想法:错误-必须使用trustAnchors参数不是空的但是我不知道从哪里开始配置Spring,Maven或trustStore

It seems I can find ideas for the solution: Error - trustAnchors parameter must be non-empty But I have no clue where to begin configuring Spring, Maven or trustStore

推荐答案

根据我的发现,在适用于OpenJDK Java 9及更高版本的Ubuntu Linux上,分发软件包中存在一个弱点.因此,安装default-jdk可能会破坏事情.

According to what I found out there is a weakness in the distribution package on Ubuntu Linux for OpenJDK Java 9 and above. So installing default-jdk may break things.

引用来自:( https://bugs.launchpad. net/ubuntu/+ source/openjdk-lts/+ bug/1768799 )+其他证书更新.

Citation from: (https://bugs.launchpad.net/ubuntu/+source/openjdk-lts/+bug/1768799) + additional certificate updates.

请注意,重新安装default-jdk是可选的,并且可以继续使用openjdk-8.

Note that re-installing default-jdk is optional and openjdk-8 could be continually to be used.

解决方法:删除default-jdk,安装openjdk-8,删除openjdk-8,然后重新安装default-jdk:

Workaround: remove default-jdk, install openjdk-8, remove openjdk-8 and reinstall default-jdk:

sudo apt清除openjdk-default java-common

sudo apt purge openjdk-default java-common

sudo apt purge default-jdk java-common

sudo apt purge default-jdk java-common

sudo dpkg --purge --force-depends ca-certificates-java

sudo dpkg --purge --force-depends ca-certificates-java

sudo apt安装openjdk-8-jre

sudo apt install openjdk-8-jre

sudo apt-get install ca-certificates-java

sudo apt-get install ca-certificates-java

sudo apt清除openjdk-8-jre

sudo apt purge openjdk-8-jre

sudo apt install default-jdk

sudo apt install default-jdk

在此之后,我还发现我使用的Spring版本在Java 10.0.1上无法很好地运行,因此请回到Java8.x.

After this i also found out that the version of Spring I was using didn't run well on Java 10.0.1 so back to Java 8.x for that purpose.

这篇关于Maven:trustAnchors参数必须为非空且'parent.relativePath'@ InvalidAlgorithmParameterException @不可解析的父POM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆