我在日食中發現了這個瘋狂的問題。我可以在命令提示符下使用命令「maven clean package」運行Maven build。但是,當我嘗試在eclipse中通過右鍵單擊 - >運行 - > Maven構建來構建相同的應用程序時,在我添加爲「clean package」的配置中。它扔我的錯誤的從命令提示符工作的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?在這裏看到:http://stackoverflow.com/questions/21099072/eclipse-maven-error-no-compiler-is-provided-in-this-environment/21099229#21099229 –
它指向JDK 1.7更新了截圖。 – Syed
您能否爲您的項目顯示文件夾結構? –