【发布时间】:2016-06-15 04:42:42
【问题描述】:
我在 Eclipse 中发现了这个疯狂的问题。我可以在命令提示符下使用命令“maven clean package”运行 Maven 构建。但是,当我尝试通过右键单击-> 运行为-> Maven 构建在 Eclipse 中构建相同的内容时,在配置中我已添加为“干净包”。它向我抛出了
的错误The project com.svu.core:cUT:1.0.0-SNAPSHOT (E:\CU-SVN\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find com.zenmonics.core:epom:pom:1.0.0 in http://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 11, column 10 -> [Help 2]
它在 POM.xml 中有相同的错误,但它是如何从命令提示符而不是从 Eclipse IDE 运行的。因此,我无法在构建路径中获取 Maven 依赖项。
<project xmlns="http://maven.apache.org/POM/4.0.0" x mlns: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>
<!-- <groupId>com.svu.core</groupId>-->
<artifactId>cUT</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>pom :: cUT</name>
<packaging>pom</packaging>
<parent> <---------- Here it throws error
<groupId>com.svu.core</groupId>
<artifactId>epom</artifactId>
<version>1.0.0</version>
</parent>
【问题讨论】:
-
您的 Eclipse 是指向 JRE 还是指向 JDK?在这里看到它:stackoverflow.com/questions/21099072/…
-
指向JDK 1.7 更新截图。
-
您能展示一下您项目的文件夹结构吗?