不可解析的进口POM:转让失败

时间:2019-11-25 15:33:37

标签: java eclipse maven pom.xml jhipster

签出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设置的。

希望有人可以帮助我。

谢谢。

1 个答案:

答案 0 :(得分:1)

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

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

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

窗口->首选项-> Maven->用户设置,然后在用户设置输入中配置settings.xml的路径。

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