签出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设置的。
希望有人可以帮助我。
提前感谢。
对于每个想知道我如何解决此问题的人:
首先像已经提到的khmarbaise,这是一个代理问题。它已经在eclipse中进行了配置,因此我假设maven将自动使用eclipse中已设置的代理配置。
解决方案是创建/修改settings.xml,并通过以下Eclipse配置步骤对其进行设置:
窗口->首选项-> Maven->用户设置,然后在用户设置输入处配置settings.xml的路径。
我编辑了settings.xml并在其中配置了我的公司代理。