简体   繁体   English

Gradle 无法从本地工件下载外部依赖项,应从 mavenCentral 下载

[英]Gradle fails to download external dependency from local artifactory which should be downloaded form mavenCentral

My gradle build fails due to an error from artifactory:由于 artifactory 的错误,我的 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

The geotools artifact is not in my "libs-snapshot-local" - artifactory. geotools 工件不在我的“libs-snapshot-local”中 - artifactory。

Why does gradle try to download is from there?为什么 gradle 尝试从那里下载?

When I paste the request当我粘贴请求时

http://beast:8082/artifactory/libs-snapshot-local/org/geotools/gt-wfs/9.0/gt-wfs-9.0.pom

into the browser I get:进入浏览器,我得到:

"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."

Why does artifactory complain about "snapshot release handling policy" although this jar isn't in the artifactory in the first place?尽管这个 jar 最初不在 artifactory 中,但为什么 artifactory 会抱怨“快照发布处理策略”?

Is this a gradle or an artifactory issue?这是一个gradle还是一个人工问题?

Ok, i got it.好,我知道了。 There was another repo next to "libs-snapshot-release" in the artifactory which contained the jar.在包含 jar 的工件中,“libs-snapshot-release”旁边还有另一个存储库。

Thanks for the comment.感谢您的评论。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM