2012-04-21 57 views
2

我想跟隨在本網站的說明:的Maven無法找到當地的扶養

http://trac.erichseifert.de/warp/wiki/DeveloperGuide

我已經得到了所有的源 - 都做MVN安裝在兩個mpqparser和vectorgraphics2d - 然後我進入在GRAL文件夾 - 並嘗試運行它,我遇到了這個錯誤:

> $ mvn install 
[INFO] Scanning for projects... 
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for 
de.erichseifert.gral:GRAL:jar:0.8 
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven- 
changelog-plugin is missing. @ line 143, column 17 
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten t 
he stability of your build. 
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support buildin 
g such malformed projects. 
[WARNING] 
[INFO] 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building GRAL Graphing Library 0.8 
[INFO] ------------------------------------------------------------------------ 
[WARNING] The POM for de.erichseifert.vectorgraphics2d:VectorGraphics2D:jar:0.6 
is missing, no dependency information available 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 0.329s 
[INFO] Finished at: Sun Apr 22 00:18:13 BST 2012 
[INFO] Final Memory: 3M/122M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal on project GRAL: Could not resolve dependencies f 
or project de.erichseifert.gral:GRAL:jar:0.8: Failure to find de.erichseifert.ve 
ctorgraphics2d:VectorGraphics2D:jar:0.6 in http://repo.maven.apache.org/maven2 w 
as cached in the local repository, resolution will not be reattempted until the 
update interval of central has elapsed or updates are forced -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit 
ch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please rea 
d the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso 
lutionException 

我相信它試圖加載這是剛剛建成的vectorgraphics2D文件夾中的罐子 - 但我不知道,如果維基說明缺少一個步驟,或者如果有的話ng需要設置。

爲GRAL pom.xml中有以下作爲其扶養聲明:

<dependencies> 
        <dependency> 
                <groupId>junit</groupId> 
                <artifactId>junit</artifactId> 
                <version>4.8.1</version> 
                <scope>test</scope> 
                <optional>true</optional> 
        </dependency> 
        <dependency> 
                <groupId>de.erichseifert.vectorgraphics2d</groupId> 
                <artifactId>VectorGraphics2D</artifactId> 
                <version>0.6</version> 
        <optional>true</optional> 
        </dependency> 
  </dependencies> 

請能有人幫助我通過這一點 - 這是我的Maven的初體驗!

+0

是什麼'〜/ .m2目錄/庫/德/ erichseifert/vectorgraphics2d'?名爲VectorGraphics2D /各種東西 – 2012-04-22 01:01:21

+0

的文件夾 - /像0.6和0.9-SNAPSHOT /和Maven元數據本地 – RenegadeAndy 2012-04-22 01:15:45

+1

,什麼是'VectorGraphics2D/0.6'? – 2012-04-22 01:19:43

回答

2

正如siegl在評論中所說,聽起來好像你沒有安裝VectorGraphics2D的0.6版 - 如果你有的話,該jar應該出現在目錄~/.m2/repository/de/erichseifert/vectorgraphics2d/VectorGraphics2D/0.6。事實上,你也有一個目錄~/.m2/repository/de/erichseifert/vectorgraphics2d/VectorGraphics2D/0.9-SNAPSHOT聽起來很可疑,就像你構建和安裝的那樣。

Maven的回購是很容易理解 - 這些目錄剛從組和工件ID和版本製作。

及以上有道理 - 你給的指示告訴你建立VectorGraphics2D的樹幹,這可能是不再0.6。

所以你有兩個選擇 - 要麼在gral pom中將依賴關係更改爲0.9-SNAPSHOT,然後嘗試鏈接到該鏈接,或者檢出並構建0.6版本的VectorGraphics2D。我會建議做後者,因爲它更可能按預期工作(0.9中的API可能已經改變)。

http://trac.erichseifert.de/vectorgraphics2d/browser#tags它看起來像你想:

rm vectorgraphics2d 
svn co svn://erichseifert.de/vectorgraphics2d/tags/0.6 vectorgraphics2d 

,然後像以前一樣繼續。

1

的一點是,GRAL從標籤,這意味着它是一個穩定的版本正在添加。這意味着您需要將mpqparser和vectorgraphics2d的依賴關係更改爲適當的版本(...- SNAPSHOT),然後再次嘗試...但在需要先刪除.m2/repository/erichseifert/...文件夾之前...