Maven 无法解析项目的依赖项
Maven could not resolve dependencies for project
从这个页面 https://github.com/serenity-bdd/serenity-demos 我下载了导入到 Eclipse 的文件。我试图从 "jbehave-webtests" 项目中进行 运行 测试。在 运行 进行这些测试期间,我遇到以下错误:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Sample Serenity JBehave project 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for net.serenity-bdd:serenity-core:jar:1.1.22-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for net.serenity-bdd:serenity-rest-assured:jar:1.1.22-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for net.serenity-bdd:serenity-jbehave:jar:1.2.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.690 s
[INFO] Finished at: 2016-03-21T10:33:24+01:00
[INFO] Final Memory: 7M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project serenity-jbehave-showcase: Could not resolve dependencies for project net.serenitybdd.showcase:serenity-jbehave-showcase:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: net.serenity-bdd:serenity-core:jar:1.1.22-SNAPSHOT, net.serenity-bdd:serenity-rest-assured:jar:1.1.22-SNAPSHOT, net.serenity-bdd:serenity-jbehave:jar:1.2.1-SNAPSHOT: Could not find artifact net.serenity-bdd:serenity-core:jar:1.1.22-SNAPSHOT -> [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] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
我运行这个目标的测试:clean verify
我认为基本目录设置正确 "${workspace_loc:/serenity-demos/jbehave-webtests}"
如何解决这个问题?感谢您的任何建议。
如您在 maven 存储库中所见:serenity-bdd,
没有可用的版本 1.1.22。只有 rc 版本可供下载。您可以更改依赖项以使用其中一个 1.1.22-rc.x jar,或者您可以升级到 1.1.24 及以上系列。
当您收到此类错误时,表示由于某种原因未从 MVN 存储库下载 jar,
原因可能是版本错误或未连接等
尝试在下面分享的 link 中的 MVN 存储库中找到合适的版本,如果下载了 jar,也尝试签入 .m2 文件夹
如果创建了 .lastupdated 扩展名,有时 maven 无法下载 jar 文件。请确保在更新前删除该文件。
切勿在未解决所有依赖项的情况下构建项目。
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-rest-assured</artifactId>
<version>1.1.21</version>
</dependency>
将此添加到您的 POM 中,
里面<dependencies>
或从列表中查找所需版本 here
从这个页面 https://github.com/serenity-bdd/serenity-demos 我下载了导入到 Eclipse 的文件。我试图从 "jbehave-webtests" 项目中进行 运行 测试。在 运行 进行这些测试期间,我遇到以下错误:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Sample Serenity JBehave project 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for net.serenity-bdd:serenity-core:jar:1.1.22-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for net.serenity-bdd:serenity-rest-assured:jar:1.1.22-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for net.serenity-bdd:serenity-jbehave:jar:1.2.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.690 s
[INFO] Finished at: 2016-03-21T10:33:24+01:00
[INFO] Final Memory: 7M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project serenity-jbehave-showcase: Could not resolve dependencies for project net.serenitybdd.showcase:serenity-jbehave-showcase:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: net.serenity-bdd:serenity-core:jar:1.1.22-SNAPSHOT, net.serenity-bdd:serenity-rest-assured:jar:1.1.22-SNAPSHOT, net.serenity-bdd:serenity-jbehave:jar:1.2.1-SNAPSHOT: Could not find artifact net.serenity-bdd:serenity-core:jar:1.1.22-SNAPSHOT -> [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] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
我运行这个目标的测试:clean verify 我认为基本目录设置正确 "${workspace_loc:/serenity-demos/jbehave-webtests}"
如何解决这个问题?感谢您的任何建议。
如您在 maven 存储库中所见:serenity-bdd,
没有可用的版本 1.1.22。只有 rc 版本可供下载。您可以更改依赖项以使用其中一个 1.1.22-rc.x jar,或者您可以升级到 1.1.24 及以上系列。
当您收到此类错误时,表示由于某种原因未从 MVN 存储库下载 jar, 原因可能是版本错误或未连接等
尝试在下面分享的 link 中的 MVN 存储库中找到合适的版本,如果下载了 jar,也尝试签入 .m2 文件夹
如果创建了 .lastupdated 扩展名,有时 maven 无法下载 jar 文件。请确保在更新前删除该文件。
切勿在未解决所有依赖项的情况下构建项目。
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-rest-assured</artifactId>
<version>1.1.21</version>
</dependency>
将此添加到您的 POM 中,
里面<dependencies>
或从列表中查找所需版本 here