2017-05-06 64 views
2

我已經從eclipse市場下載了maven api。
但是,當我試圖創建任何Maven項目,它給了我下面的錯誤無法在eclipse juno中創建maven項目

Could not calculate build plan: Plugin 
org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its 
dependencies could not be resolved: Failed to read artifact descriptor 
for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 

此外,當我試圖與Maven構建運行出錯的項目,它給了我以下錯誤:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 
SLF4J: Defaulting to no-operation (NOP) logger implementation 
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 

此外,我無法找到我的setting.xml maven文件。請告訴我我應該在哪裏找到這個。我從eclipse市場下載了maven,那麼maven的主目錄在哪裏?

另外,我發現maven沒有創建我的項目在庫文件夾中的任何jar文件。

+0

Maven的主目錄是在用戶主目錄 –

+0

感謝戒了'.m2'文件夾.....但plzz告訴我如何解決這個錯誤.. –

+0

@harshakumarReddy你的陳述是不正確的。 settings.xml和pom.xml完全不同,用於不同的目的。 –

回答

1

I had downloaded maven from eclipse market place,

你已經下載了什麼是Maven Integration for Eclipse,也被稱爲m2e (Maven for Eclipse)

它將允許你將maven項目導入Eclipse工作區。

因此,首先把Eclipse的靜置片刻,並下載Maven本身從Maven Download page

I am unable to find my setting.xml file for maven.Please tell me where i should find this.

你有一個全球性的行家那裏已經安裝:詳見「Maven settings」。
您可以使用~/.m2/settings.xml或(Windows)%USERPROFILE%\.m2\settings.xml中手動創建的一個覆蓋它。

請按照此maven tutorial並確保您有一個小型Java項目,您可以手動運行mvn clean install

然後,您可以import that project into Eclipse

https://www.tutorialspoint.com/maven/images/import_project2.jpg

相關問題