gpt4 book ai didi

java - 构建无法解决 Objectify 依赖关系

转载 作者:太空宇宙 更新时间:2023-11-04 14:24:48 25 4
gpt4 key购买 nike

我正在尝试将 Objectify 添加到我的 Google App Engine 项目中。我按照 https://code.google.com/p/objectify-appengine/wiki/MavenRepository 上的说明进行操作上面说要向我的 pom.xml 添加依赖项。

我将依赖项复制并粘贴到我的 pom.xml 中,但在执行 mvn clean install 时出现以下错误:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.796 s
[INFO] Finished at: 2014-11-06T15:34:45-08:00
[INFO] Final Memory: 8M/156M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project nbsocialmetrics-frontend: Could not resolve dependencies for project com.netbase.nbsocialmetrics:nbsocialmetrics-frontend:war:1.0: Failed to collect dependencies at com.googlecode.objectify:objectify:jar:check for latest version: Failed to read artifact descriptor for com.googlecode.objectify:objectify:jar:check for latest version: Could not transfer artifact com.googlecode.objectify:objectify:pom:check for latest version from/to central (http://repo.maven.apache.org/maven2): Illegal character in path at index 76: http://repo.maven.apache.org/maven2/com/googlecode/objectify/objectify/check for latest version/objectify-check for latest version.pom -> [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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :nbsocialmetrics-frontend

最佳答案

解决问题的方法是复制粘贴然后修改版本号。这是原始依赖项,写在 https://code.google.com/p/objectify-appengine/wiki/MavenRepository :

  <dependencies>
<dependency>
<groupId>com.googlecode.objectify</groupId>
<artifactId>objectify</artifactId>
<version>check for latest version</version>
</dependency>
</dependencies>

我没有注意到的是文本字符串“检查最新版本”。所以我点击了http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.googlecode.objectify%22然后就可以看到最新的版本,此时是5.1.1。

所以我将其输入到我的 pom.xml 中,然后 mvn clean install 工作了:

  <dependencies>
<dependency>
<groupId>com.googlecode.objectify</groupId>
<artifactId>objectify</artifactId>
<version>5.1.1</version>
</dependency>
</dependencies>

关于java - 构建无法解决 Objectify 依赖关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26791647/

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