由于 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/