【问题标题】:Failed to read artifact descriptor for org.springframework:spring-core:jar无法读取 org.springframework:spring-core:jar 的工件描述符
【发布时间】:2018-02-02 03:31:03
【问题描述】:

我正在尝试将 maven 依赖项下载到我的 netbeans 构建 maven Web 应用程序。因为我无法通过 IDE 更新依赖项,所以我尝试使用

mvn clean install 

通过 cmd 命令。
但我仍然遇到同样的错误。

请帮忙。我试图弄清楚这几天。 (互联网连接工作得很好。)
谢谢

编辑
这是输出。

C:\Users\Dilini\Documents\NetBeansProjects\NewSpring>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building NewSpring 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.springframework:spring-core:jar:5.0.0.RC3 is missing, no dependency information available
[WARNING] The POM for org.springframework:spring-beans:jar:5.0.0.RC3 is missing, no dependency information available
[WARNING] The POM for org.springframework:spring-context:jar:5.0.0.RC3 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.552 s
[INFO] Finished at: 2017-08-24T15:24:58+05:30
[INFO] Final Memory: 8M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project NewSpring: Could not resolve dependencies for project com.dilini:NewSpring:war:1.0-SNAPSHOT: The following artifacts could not be resolved: org.springframework:spring-core:jar:5.0.0.RC3, org.springframework:spring-beans:jar:5.0.0.RC3, org.springframework:spring-context:jar:5.0.0.RC3: Failure to find org.springframework:spring-core:jar:5.0.0.RC3 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

C:\Users\Dilini\Documents\NetBeansProjects\NewSpring>

【问题讨论】:

  • 该消息告诉您缺少的 JAR 在您指向的存储库中不可用。我建议去那个 repo 并确认它。可能是您要求的版本不正确。
  • 将输出添加为文本而不是图像
  • 为什么要使用 RC 而不是发布的 spring 版本
  • 最后发布的版本是4.3.10.RELEASE
  • 我会使用<dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>4.3.10.RELEASE</version> </dependency>

标签: java spring maven dependencies


【解决方案1】:

您需要将此 repo 添加到您的 pom 文件中:

<repositories>
  <repository>
    <id>repository.spring.milestone</id>
    <name>Spring Milestone Repository</name>
    <url>http://repo.spring.io/milestone</url>
  </repository>
</repositories>

【讨论】:

  • 我能知道那是什么吗?所以我应该保留其他依赖项
  • 由于您使用的 spring-core 版本尚未发布,即它是候选版本 (RC 5.0.0.RC3),它们存储在 Spring 存储库中。
猜你喜欢
  • 2021-03-29
  • 1970-01-01
  • 2016-05-08
  • 2011-10-02
  • 2017-02-12
  • 2011-07-03
  • 2017-08-20
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多