gpt4 book ai didi

java - 无法构建 nosqlunit-mongodb 项目

转载 作者:行者123 更新时间:2023-11-30 04:34:34 25 4
gpt4 key购买 nike

我无法构建 nosqlunit-mongodb 项目。编译该项目给了我以下异常。请帮助我理解这个异常是什么以及如何克服它。

刚刚开始使用 nosqlunit 和 mongodb。请容忍我的幼稚问题。

user@host:nosqlunit-mongodb mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building nosqlunit-mongodb 0.7.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: <http s>:/oss.sonatype.org/content/repositories/snapshots/com/lordofthejars/nosqlunit-core/0.7.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata com.lordofthejars:nosqlunit-core:0.7.1-SNAPSHOT/maven-metadata.xml from/to sonatype-nexus-snapshots (http s:/oss.sonatype.org/content/repositories/snapshots): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[WARNING] Failure to transfer com.lordofthejars:nosqlunit-core:0.7.1-SNAPSHOT/maven-metadata.xml from https:/oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-nexus-snapshots has elapsed or updates are forced. Original error: Could not transfer metadata com.lordofthejars:nosqlunit-core:0.7.1-SNAPSHOT/maven-metadata.xml from/to sonatype-nexus-snapshots (https:/oss.sonatype.org/content/repositories/snapshots): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Downloading: http s:/oss.sonatype.org/content/repositories/snapshots/com/lordofthejars/nosqlunit-core/0.7.1-SNAPSHOT/nosqlunit-core-0.7.1-SNAPSHOT.pom
Downloading: http s:/oss.sonatype.org/content/repositories/snapshots/com/lordofthejars/nosqlunit-mongodb/0.7.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata com.lordofthejars:nosqlunit-mongodb:0.7.1-SNAPSHOT/maven-metadata.xml from/to sonatype-nexus-snapshots (http s:/oss.sonatype.org/content/repositories/snapshots): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.360s
[INFO] Finished at: Mon Dec 10 06:17:30 PST 2012
[INFO] Final Memory: 140M/698M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project nosqlunit-mongodb: Could not resolve dependencies for project com.lordofthejars:nosqlunit-mongodb:jar:0.7.1-SNAPSHOT: Failed to collect dependencies for [com.lordofthejars:nosqlunit-core:jar:0.7.1-SNAPSHOT (compile), org.mongodb:mongo-java-driver:jar:2.7.3 (compile), com.lordofthejars:nosqlunit-mongodb:jar:0.7.1-SNAPSHOT (compile), jmockmongo:jmockmongo:jar:0.0.2 (compile), junit:junit:jar:4.11 (provided), org.hamcrest:hamcrest-core:jar:1.3 (compile), org.hamcrest:hamcrest-library:jar:1.3 (compile), org.mockito:mockito-all:jar:1.9.0 (test), org.slf4j:slf4j-api:jar:1.6.4 (compile)]: Failed to read artifact descriptor for com.lordofthejars:nosqlunit-core:jar:0.7.1-SNAPSHOT: Could not transfer artifact com.lordofthejars:nosqlunit-core:pom:0.7.1-SNAPSHOT from/to sonatype-nexus-snapshots (https:/oss.sonatype.org/content/repositories/snapshots): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]
[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] htt p: /cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

最佳答案

您尝试仅编译 nosqlunit-mongodb,因此 Maven 尝试从 http://repo.maven.apache.org/maven2 检索 com.lordofthejars:nosqlunit-core:jar:0.7.1-SNAPSHOT但那里不存在。

在项目根目录中运行mvncompile来编译所有模块(包括nosqlunit-core)并且它应该可以工作。

关于java - 无法构建 nosqlunit-mongodb 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13803281/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com