【问题标题】:Non-resolvable import POM: Failure to transfer不可解析的导入POM:传输失败
【发布时间】:2020-03-20 22:42:53
【问题描述】:

在检查了一个 java maven 项目后,我的 pom 一直有一些错误。 maven clean 和 maven install 就像一个魅力,但 maven 更新项目或下载源/java doc 每次都会给我以下错误:

Could not download sources or javadoc
Could not read maven project
Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Failure to transfer io.github.jhipster:jhipster-dependencies:pom:3.0.1 from 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. Original error: Could not transfer artifact io.github.jhipster:jhipster-dependencies:pom:3.0.1 from/to central (https://repo.maven.apache.org/maven2): connect timed out @ line 106, column 16
[ERROR] 'dependencies.dependency.version' for io.github.jhipster:jhipster-framework:jar is missing. @ line 118, column 15
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-cache:jar is missing. @ line 123, column 15
[ERROR] 'dependencies.dependency.version' for com.fasterxml.jackson.datatype:jackson-datatype-hibernate5:jar is missing. @ line 127, column 15
[ERROR] 'dependencies.dependency.version' for com.fasterxml.jackson.datatype:jackson-datatype-hppc:jar is missing. @ line 131, column 15
[ERROR] 'dependencies.dependency.version' for com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar is missing. @ line 135, column 15
[ERROR] 'dependencies.dependency.version' for com.fasterxml.jackson.module:jackson-module-afterburner:jar is missing. @ line 139, column 15
[ERROR] 'dependencies.dependency.version' for com.h2database:h2:jar is missing. @ line 867, column 17
[ERROR] 'dependencies.dependency.version' for com.jayway.jsonpath:json-path:jar is missing. @ line 148, column 15
[ERROR] 'dependencies.dependency.version' for io.springfox:springfox-swagger2:jar is missing. @ line 154, column 15

我在一个公司代理后面,我已经在 Eclipse 中配置了它。

我过去从未与 maven 有任何关系,只是每次都检查对我有用。 该项目是使用 jHipster 设置的。

希望有人可以帮助我。

提前致谢。

【问题讨论】:

  • 这看起来 connect timed out.. 像网络/防火墙/代理问题..
  • 尝试将 maven 放入 verbose 以查看更多详细信息

标签: java eclipse maven pom.xml jhipster


【解决方案1】:

对于所有想知道我如何解决此问题的人:

首先就像前面提到的 khmarbaise 一样,这是一个代理问题。它已经在eclipse中配置好了,因此我假设maven会自动使用eclipse中已经设置的代理配置。

解决方案是创建/修改 settings.xml 并通过以下 eclipse 配置步骤进行设置:

Window -> Preferences -> Maven -> User Settings,然后在 User Settings Input 中配置 settings.xml 的路径。

我编辑了我的 settings.xml 并在其中配置了我的公司代理。

【讨论】:

    【解决方案2】:

    我有这个问题的绝妙解决方案,让我们转到您的项目,右键单击项目转到 maven 更新选项卡并强制更新您的项目,这需要一些时间,然后您的项目就可以正常工作了

    【讨论】:

    • 这里请使用普通话,谢谢。
    • 已经在我的场合尝试过,但它不起作用 - 因为我的代理是这里的原始问题。
    猜你喜欢
    • 2011-07-07
    • 2019-02-06
    • 1970-01-01
    • 1970-01-01
    • 2020-04-24
    • 1970-01-01
    • 2015-03-14
    • 2016-10-25
    • 2023-04-01
    相关资源
    最近更新 更多