【发布时间】:2020-05-03 11:16:47
【问题描述】:
当我跑步时
mvn clean install -Djavax.net.debug=ssl
我得到了信任库路径
trustStore 是: /home/user/Downloads/jdk8/openjdk-8u40-b25-linux-x64-10_feb_2015/java-se-8u40-ri/jre/lib/security/cacerts
但那是一条错误的道路,它最终给了我这个错误
Failed to read artifact descriptor for org.springframework.statemachine:spring-statemachine-core:jar:
2.1.3.RELEASE: Could not transfer artifact org.springframework.statemachine:spring-statemachine-core:
pom:2.1.3.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
那么如何更改默认信任库的路径??
我在 ubuntu 18.04 中运行 和openjdk 8
【问题讨论】:
-
为什么这是“错误的路径”?在我看来,(非常旧!)Java 版本是用来运行 Maven 的,所以如果是这样的话,那将是“正确的道路”。
-
@Marged no ,我查看了它,它似乎在 java 应用程序中手动设置了 trustrore,而我正在寻找它来为 maven 配置设置它,所以我不必使用额外的选项即
-Djavax.net.sst.trustStore -
@MarkRotteveel 在下载 zip 文件(位置指向的位置)之后,我使用
apt-get安装了 java,现在我希望 maven 将文件放在/usr文件夹而不是/Downloads文件夹
标签: java maven ubuntu truststore