问题描述
当尝试构建从Git存储库下载的Apache Storm时,出现storm-core
(或者也许是storm-hive
?)构建错误:
When trying to build Apache Storm downloaded from Git repository I get storm-core
(or maybe storm-hive
?) build error:
[INFO] Reactor Summary:
[INFO]
[INFO] Storm .............................................. SUCCESS [ 1.366 s]
[INFO] multilang-javascript ............................... SUCCESS [ 0.801 s]
[INFO] multilang-python ................................... SUCCESS [ 0.138 s]
[INFO] multilang-ruby ..................................... SUCCESS [ 0.111 s]
[INFO] maven-shade-clojure-transformer .................... SUCCESS [ 1.482 s]
[INFO] storm-maven-plugins ................................ SUCCESS [ 1.949 s]
[INFO] Storm Core ......................................... SUCCESS [02:08 min]
[INFO] storm-rename-hack .................................. SUCCESS [ 1.966 s]
[INFO] storm-kafka ........................................ SUCCESS [ 3.924 s]
[INFO] storm-hdfs ......................................... SUCCESS [01:23 min]
[INFO] storm-hbase ........................................ SUCCESS [ 13.381 s]
[INFO] storm-hive ......................................... FAILURE [ 43.185 s]
[INFO] storm-jdbc ......................................... SKIPPED
[INFO] storm-redis ........................................ SKIPPED
[INFO] storm-eventhubs .................................... SKIPPED
[INFO] flux ............................................... SKIPPED
....
....
....
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.2.1:process (default) on project storm-hive:
Error resolving project artifact: Failure to transfer org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.3-jhyde from https://clojars.org/repo/ was cached in the local repository, resolution will not be reattempted until the update interval of clojars has elapsed or updates are forced.
Original error: Could not transfer artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.3-jhyde from/to clojars (https://clojars.org/repo/): sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target for project org.pentaho:pentaho-aggdesigner-algorithm:jar:5.1.3-jhyde -> [Help 1]
[ERROR]
....
....
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :storm-hive
使用-e
选项(mvn -e clean install -DskipTests
)运行相同的构建时,我得到如下附加信息:
When running the same build with -e
option (mvn -e clean install -DskipTests
) I get additional info as follows:
[INFO] Reactor Summary:
[INFO]
[INFO] Storm .............................................. SUCCESS [ 4.136 s]
[INFO] multilang-javascript ............................... SUCCESS [ 1.441 s]
[INFO] multilang-python ................................... SUCCESS [ 0.151 s]
[INFO] multilang-ruby ..................................... SUCCESS [ 0.150 s]
[INFO] maven-shade-clojure-transformer .................... SUCCESS [ 1.915 s]
[INFO] storm-maven-plugins ................................ SUCCESS [ 2.727 s]
[INFO] Storm Core ......................................... FAILURE [ 9.685 s]
[INFO] storm-rename-hack .................................. SKIPPED
[INFO] storm-kafka ........................................ SKIPPED
[INFO] storm-hdfs ......................................... SKIPPED
[INFO] storm-hbase ........................................ SKIPPED
[INFO] storm-hive ......................................... SKIPPED
[INFO] storm-jdbc ......................................... SKIPPED
....
....
....
....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
....
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.7.2.201409121644:prepare-agent (prepare-agent) on project storm-core:
Execution prepare-agent of goal org.jacoco:jacoco-maven-plugin:0.7.2.201409121644:prepare-agent failed: Plugin org.jacoco:jacoco-maven-plugin:0.7.2.201409121644 or one of its dependencies could not be resolved:
Failed to collect dependencies at org.jacoco:jacoco-maven-plugin:jar:0.7.2.201409121644 -> org.apache.maven:maven-project:jar:2.2.1 -> org.apache.maven:maven-settings:jar:2.2.1 -> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 -> junit:junit:jar:4.8.2:
Failed to read artifact descriptor for junit:junit:jar:4.8.2:
Could not transfer artifact junit:junit:pom:4.8.2 from/to central (https://repo.maven.apache.org/maven2):
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException:
Failed to execute goal org.jacoco:jacoco-maven-plugin:0.7.2.201409121644:prepare-agent (prepare-agent) on project storm-core:
Execution prepare-agent of goal org.jacoco:jacoco-maven-plugin:0.7.2.201409121644:prepare-agent failed:
Plugin org.jacoco:jacoco-maven-plugin:0.7.2.201409121644 or one of its dependencies could not be resolved:
Failed to collect dependencies at org.jacoco:jacoco-maven-plugin:jar:0.7.2.201409121644 -> org.apache.maven:maven-project:jar:2.2.1 ->
....
....
....
....
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)
... 90 more
有什么办法解决这个问题吗?
Any ideas how to solve this?
推荐答案
Maven试图从https repo" https下载jar ://clojars.org/repo/",但Java没有客户端证书.请按照以下步骤导入客户端证书
Maven is trying to download jars from https repo "https://clojars.org/repo/" but java does not have client certificates. Follow below steps to import client certificates
第1步:下载客户端证书
Step 1 : Download Client Certificate
- 在浏览器(即Firefox)中打开 https://clojars.org/repo/ URL li>
- 单击URL栏右侧的锁定图标
- 显示服务器URL,单击以获取右箭头,然后在更多信息"上
- 打开弹出窗口以查看服务器的证书.
- 单击查看证书",在详细信息"表中导出到文件CERT_FILE_NAME.crt
- Open https://clojars.org/repo/ URL in the browser (i.e firefox)
- Click on the lock icon right to the URL bar
- Server URL is shown , click to get right arrow and then on "more information"
- Pop-up is opened to view the certificate of the Server.
- click on the "View Certificate", In "details" table export to a file CERT_FILE_NAME.crt
第2步:将客户端证书导入到maven正在使用的JDK
Step 2 : Import the client certificate to JDK which maven is using
keytool -import -noprompt -trustcacerts -alias"clojars.org"-文件C:\ CERT_FILE_NAME.crt -keystore C:\ java \ jre \ lib \ security \ cacerts -storepass"changeit"
keytool -import -noprompt -trustcacerts -alias "clojars.org" -file C:\CERT_FILE_NAME.crt -keystore C:\java\jre\lib\security\cacerts -storepass "changeit"
这篇关于Apache Storm:storm-core构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!