Gradle 下载 Archiva 仓库的时候提示错误不能下载
错误提示如下:
A problem occurred configuring root project 'reoc'.
Could not resolve all dependencies for configuration ':classpath'.
Could not determine artifacts for org.asciidoctor.convert:org.asciidoctor.convert.gradle.plugin:2.3.0
Could not get resource 'https://maven.ossez.com/repository/internal/org/asciidoctor/convert/org.asciidoctor.convert.gradle.plugin/2.3.0/org.asciidoctor.convert.gradle.plugin-2.3.0.jar'.
Could not HEAD 'https://maven.ossez.com/repository/internal/org/asciidoctor/convert/org.asciidoctor.convert.gradle.plugin/2.3.0/org.asciidoctor.convert.gradle.plugin-2.3.0.jar'. Received status code 500 from server: Unable to fetch artifact resource.
这个问题怎么处理
在这里,你需要注意的 Archiva 返回的错误代码是 500。
如果返回的代码是 404 说明的是资源没有找到,返回 500 的意思是服务器上有错。
Received status code 500 from server: Unable to fetch artifact resource.
登录服务器后,我们看到错误信息是:
2020-04-12 08:50:22,335 [qtp1096639601-25] ERROR org.apache.archiva.webdav.ArchivaDavResourceFactory [] - Failures occurred downloading from some remote repositories:
Spring-Plugins: Download failure on resource [http://repo.spring.io/plugins-release/org/asciidoctor/convert/org.asciidoctor.convert.gradle.plugin/2.3.0/org.asciidoctor.convert.gradle.plugin-2.3.0.jar]:Access denied to: http://repo.spring.io/plugins-release/org/asciidoctor/convert/org.asciidoctor.convert.gradle.plugin/2.3.0/org.asciidoctor.convert.gradle.plugin-2.3.0.jar , ReasonPhrase:Forbidden. central: Download failure on resource [http://central.maven.org/maven2/org/asciidoctor/convert/org.asciidoctor.convert.gradle.plugin/2.3.0/org.asciidoctor.convert.gradle.plugin-2.3.0.jar]:central.maven.org (cause: java.net.UnknownHostException: central.maven.org)
org.apache.archiva.policies.ProxyDownloadException: Failures occurred downloading from some remote repositories:
Spring-Plugins: Download failure on resource [http://repo.spring.io/plugins-release/org/asciidoctor/convert/org.asciidoctor.convert.gradle.plugin/2.3.0/org.asciidoctor.convert.gradle.plugin-2.3.0.jar]:Access denied to: http://repo.spring.io/plugins-release/org/asciidoctor/convert/org.asciidoctor.convert.gradle.plugin/2.3.0/org.asciidoctor.convert.gradle.plugin-2.3.0.jar , ReasonPhrase:Forbidden. central: Download failure on resource [http://central.maven.org/maven2/org/asciidoctor/convert/org.asciidoctor.convert.gradle.plugin/2.3.0/org.asciidoctor.convert.gradle.plugin-2.3.0.jar]:central.maven.org (cause: java.net.UnknownHostException: central.maven.org) at org.apache.archiva.proxy.DefaultRepositoryProxyConnectors.fetchFromProxies(DefaultRepositoryProxyConnectors.java:366) ~[archiva-proxy-2.2.3.jar:?] at org.apache.archiva.webdav.ArchivaDavResourceFactory.fetchContentFromProxies(ArchivaDavResourceFactory.java:818) [archiva-webdav-2.2.3.jar:?] at org.apache.archiva.webdav.ArchivaDavResourceFactory.processRepository(ArchivaDavResourceFactory.java:627) [archiva-webdav-2.2.3.jar:?] at org.apache.archiva.webdav.ArchivaDavResourceFactory.createResource(ArchivaDavResourceFactory.java:324) [archiva-webdav-2.2.3.jar:?] at org.apache.archiva.webdav.RepositoryServlet.service(RepositoryServlet.java:125) [archiva-webdav-2.2.3.jar:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet-3.0.0.v201112011016.jar:?] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684) [jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501) [jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) [jetty-security-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) [jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.Server.handle(Server.java:370) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) [jetty-http-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [jetty-http-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [jetty-server-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667) [jetty-io-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [jetty-io-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-8.1.14.v20131031.jar:8.1.14.v20131031] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
因为我们使用的是 Archiva 为 proxy 代理服务器,这说明 Archiva 没有办法从原数据中下载信息。
从上面的信息,我们可以看到你的 Central Maven 仓库设置有问题,或者原 Central Maven 仓库已经不可用了。
需要将不可用访问的 http://central.maven.org/maven2 仓库 URL 替换为: https://repo1.maven.org/maven2/ 仓库地址。

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
- 上一篇
阿里云新品发布会周刊第48期 丨 Gartner 容器报告:阿里云与 AWS 并列第一,领先微软、谷歌
点击订阅新品发布会 新产品、新版本、新技术、新功能、价格调整,评论在下方,下期更新!关注更多新品发布会! 热门阅读 1、连续两年入选Gartner公共云容器报告,阿里云在边缘容器方面做了什么? 最近,Gartner发布了2020年公共云容器报告,阿里云连续两年成为唯一入选的中国企业。报告显示,阿里云容器服务在中国市场表现强劲,产品形态丰富,在 Serverless 容器、服务网格、安全沙箱容器、混合云和边缘等领域,具备良好的技术发展策略。 查看原文 2、使用错误代码对象进行C++错误处理 每个C++程序员都知道处理异常情况的传统方法有两种:第一种是从良好的旧C风格继承而来,返回错误代码,并希望调用者进行判断并采取适当的操作;第二种方法是抛出异常,并希望周围代码块捕获并处理该异常。C++ FAQ强烈支持第二种方法,认为它会使得代码更安全 。查看原文 3、内附PPT下载 | 性能为MySQL10倍!阿里云重磅推出云原生数据仓库AnalyticDB基础版 日前,阿里云正式发布云原生数据仓库AnalyticDB基础版,极大降低了用户构建数据仓库的门槛,每月可低至860元。高度兼容MySQL,极...
- 下一篇
gout v0.0.11 发布,golang 实现的 http 客户端
changlog issue:#203SetHeader支持多次设置 pr:#206 issue:#202优化SetHeader数据为空时的,提示信息pr :#208 issue:#209fix debug模式,没有输出request body信息 v0.0.11 pr :#210 项目地址 https://gitee.com/guonaihong/gout https://github.com/guonaihong/gout 下个版本展望 分页迭代器
相关文章
文章评论
共有0条评论来说两句吧...