错误 运行 PuppyCrawl 的 Maven Checkstyle 插件
Error running PuppyCrawl's Maven Checkstyle Plugin
好吧,我正在尝试为我目前正在处理的项目配置 Maven 的 Checkstyle 插件,我得到以下信息:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (verify-style) on project email: Failed during checkstyle execution: Failed during checkstyle configuration: unable to parse configuration stream: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
所以,运行 mvn install -X
我得到了以下堆栈跟踪:
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
at sun.security.validator.Validator.validate(Validator.java:260)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
... 52 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
... 58 more
这似乎与 google-checks.xml 上指定的 DTD 有关 我在 Github 上的 link 上找到了以下内容: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml:
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
我尝试将该证书添加到我的 JVM 信任库,但它不起作用。
有人能找出问题所在吗?
提前谢谢你。
https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
请为您正在使用的 Checkstyle 版本使用配置 DTD。 master
是当前开发的地方。由于我们正在更改和添加 master 中的新内容,因此 Checkstyle 的发行版本可能不支持它并最终出现异常。
下面是 8.10.1 版本的示例 Google XML:https://github.com/checkstyle/checkstyle/blob/checkstyle-8.10.1/src/main/resources/google_checks.xml
好吧,我正在尝试为我目前正在处理的项目配置 Maven 的 Checkstyle 插件,我得到以下信息:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (verify-style) on project email: Failed during checkstyle execution: Failed during checkstyle configuration: unable to parse configuration stream: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
所以,运行 mvn install -X
我得到了以下堆栈跟踪:
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
at sun.security.validator.Validator.validate(Validator.java:260)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
... 52 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
... 58 more
这似乎与 google-checks.xml 上指定的 DTD 有关 我在 Github 上的 link 上找到了以下内容: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml:
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
我尝试将该证书添加到我的 JVM 信任库,但它不起作用。 有人能找出问题所在吗?
提前谢谢你。
https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
请为您正在使用的 Checkstyle 版本使用配置 DTD。 master
是当前开发的地方。由于我们正在更改和添加 master 中的新内容,因此 Checkstyle 的发行版本可能不支持它并最终出现异常。
下面是 8.10.1 版本的示例 Google XML:https://github.com/checkstyle/checkstyle/blob/checkstyle-8.10.1/src/main/resources/google_checks.xml