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/ 仓库地址。
分类:
Java
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
2018-04-13 在 Confluence 6 中连 Jira 的问题解决
2018-04-13 在 Confluence 6 中的 Jira 高级权限
2018-04-13 在 Confluence 6 中的 Jira 权限
2018-04-13 在 Confluence 6 中的 Jira 设置
2018-04-13 为用户管理连接 Confluence 6 到 Jira 应用程序
2018-04-13 Confluence 6 的高级 Crowd 设置
2018-04-13 Confluence 6 的 Crowd 权限