【发布时间】:2019-10-15 17:14:35
【问题描述】:
当我尝试在 Eclipse 上运行任何 Maven 命令时出现错误。
错误信息:
[ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.me.learn:first-application:0.0.1-SNAPSHOT:
Failure to find org.springframework.boot:spring-boot-starter-parent:pom:2.1.5-RELEASE
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 and 'parent.relativePath'
points at wrong local POM @ line 6, column 10
我检查的内容:
目录
/home/{anonymous}/.m2/repository/home/{anonymous}/.m2/repository/org/springframework/boot/spring-boot-starter-parent
包含文件:spring-boot-starter-parent-2.1.5-RELEASE.pom.lastUpdated
手动清理存储库,并在 eclipse 上运行 clean。
我在 eclipse 中的 settings.xml 配置设置到了正确的位置,我在本地存储库中的 eclipse 配置也被定义好了。
未定义代理。
关于我的配置和环境的信息:
我在 Ubuntu 上使用 eclipse。
settings.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>/home/{anonymous}/.m2/repository</localRepository>
<interactiveMode>true</interactiveMode>
<usePluginRegistry>false</usePluginRegistry>
<offline>false</offline>
</settings>
pom.xml 文件:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5-RELEASE</version>
</parent>
<groupId>com.me.learn</groupId>
<artifactId>first-application</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>first-application</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>
<finalName>first-application</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Maven 版本:
Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.10.0-37-generic", arch: "amd64", family: "unix"
【问题讨论】:
-
<version>2.1.5-RELEASE</version>应该是<version>2.1.5.RELEASE</version> -
非常感谢巴拉特!
标签: java spring eclipse maven spring-boot