Eclipse中不可解析的父POM

car*_*era 5 eclipse proxy http-proxy maven spring-boot

我已将Maven项目导入到Eclipse版本:2018-09(4.9.0)中,但pom文件中出现此错误。我在另一台计算机上已经有相同的项目,并且工作正常。该项目是springBoot 2.0.6.RELEASE

Project build error: Non-resolvable parent POM for es.teatreDeGuerrila:teatreDeGuerrilaCloudApp:1.0.0-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.0.6.RELEASE 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 org.springframework.boot:spring-boot-starter-parent:pom:2.0.6.RELEASE from/to central (https://repo.maven.apache.org/maven2): connect timed out and 
 'parent.relativePath' points at no local POM
Run Code Online (Sandbox Code Playgroud)

而且我在类中有很多编译错误,例如

The import org.springframework cannot be resolved
Run Code Online (Sandbox Code Playgroud)

从命令行使用mvn install -Dmaven.test.skip=true,一切正常。

并且我已经在Eclipse中将其作为Manual在Proxy中进行了设置,与文件中的设置相同 ../maven/conf/settings.xml

<proxy>
      <id>httpproxy</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxy.teatre.guerrila.int</host>
      <port>8080</port>
      <nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
    </proxy>
     <proxy>
      <id>httpsproxy</id>
      <active>true</active>
      <protocol>https</protocol>
      <host>proxy.teatre.guerrila.int</host>
      <port>8443</port>
      <nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
    </proxy>
  </proxies>
Run Code Online (Sandbox Code Playgroud)

Eclipse设置

Nuñ*_*ada 1

看来您正在使用外部 Maven,而不是嵌入式 Maven。请检查一下

1)在 eclispe -> 首选项 -> Maven -> 安装中,您已检查外部 maven

2)在 eclispe -> 首选项 -> Maven -> 用户设置中,指向您提到的设置文件