gpt4 book ai didi

java - 无法使用 Maven 依赖项在 m2 存储库中下载 .jar 文件

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:05:29 24 4
gpt4 key购买 nike

这是抛出的错误,

Failure to transfer org.codehaus.plexus:plexus-utils:jar:3.0 from http://mirrors.ibiblio.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of ibiblio.org has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.plexus:plexus-utils:jar:3.0 from/to ibiblio.org (http://mirrors.ibiblio.org/ maven2): Access denied to http://mirrors.ibiblio.org/maven2/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar. Error code 403, Forbidden

在图片中,

enter image description here


我在两台不同的机器上遇到了同样的问题[一台有代理的机器和另一台没有代理的机器(个人笔记本电脑)]

我正在使用

  1. Eclipse Kepler
  2. JDK 1.6
  3. Maven 3.0.4

多次尝试后没有运气;下面列出了其中一些:

  • 1.7 降级 JDK [Java]1.6
  • settings.xml 上添加了代理在 [ C:\Users\prashanth_sams\.m2 下]

    enter image description here

  • settings.xml 中添加镜像在 C:\Program Files\Maven\apache-maven-3.0.4\conf\settings.xml

enter image description here

  • 在外部找到特定的 Maven 版本位置

enter image description here

但是,我在 repo 协议(protocol)中看到以下两个文件,而不是 jar 文件,后缀为 .lastUpdated

settings.xml中是否还有其他镜像要添加?非常欢迎任何帮助!

enter image description here

最佳答案

当我在位于 C:\Program Files\Maven\apache-maven-3.0.4\conf\settings 的 settings.xml 上添加镜像时,这个问题得到了解决。来自以下 URL 的 xml

http://repo1.maven.org/maven2/.meta/repository-metadata.xml

更新 XML 后,尝试 Maven > Update Project..

关于java - 无法使用 Maven 依赖项在 m2 存储库中下载 .jar 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22297963/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com