java - Gradle 无法从本地 Artifact 下载外部依赖项,应从 mavenCentral 下载外部依赖项

标签 java maven gradle artifactory

由于 Artifact 的错误,我的 gradle 构建失败:

FAILURE: Build failed with an exception.

* What went wrong:

Could not resolve all dependencies for configuration ':PublishService:compile'.
> Could not resolve org.geotools:gt-wfs:9.0.
  Required by: 
      infraview_gradle:PublishService:0-SNAPSHOT > net.infraview:infraview_context:0-SNAPSHOT
      infraview_gradle:PublishService:0-SNAPSHOT > net.infraview:infraview_srv_masterdata:0-SNAPSHOT
> Could not HEAD 'http://beast:8082/artifactory/libs-snapshot-local/org/geotools/gt-wfs/9.0/gt-wfs-9.0.pom'. Received status code 409 from server: Conflict

geotools Artifact 不在我的“libs-snapshot-local” - Artifact 中。

为什么 gradle 尝试从那里下载?

当我粘贴请求时
http://beast:8082/artifactory/libs-snapshot-local/org/geotools/gt-wfs/9.0/gt-wfs-9.0.pom

进入浏览器我得到:
"message" : "The repository 'libs-snapshot-local' rejected the artifact 'libs-snapshot-local:org/geotools/gt-wfs/9.0/gt-wfs-9.0.pom' due to its snapshot/release handling policy."

为什么artifactory提示“快照发布处理策略”虽然这个jar一开始不在artifactory中?

这是一个gradle还是一个人工问题?

最佳答案

好,我知道了。在包含 jar 的 Artifact 中,“libs-snapshot-release”旁边还有另一个 repo。

感谢您的评论。

关于java - Gradle 无法从本地 Artifact 下载外部依赖项,应从 mavenCentral 下载外部依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32688892/

相关文章:

android - build.gradle 的结构

c# - 将cmd gradlew输出重定向到C#

java - 定心 Swing 组件

Java 接口(interface)扩展 Comparable

java - 如何在 Spring Batch 中调用 block 进程中的另一个步骤?

java - maven 无法从测试用例中找到任何包

java - 类型不匹配 : cannot convert from HashMap<Integer, Item> 到 HashMap<Integer,Item>

eclipse - 如何启用谷歌应用程序引擎、maven 和 eclipse 的热插拔?

java - 我们如何在 Scala 中编写 maven2 插件?

java - 错误: Unfortunately you can't have non-Gradle Java modules and > Android-Gradle modules in one project