2013-06-27 177 views
2

我是常春藤新手,我需要一些幫助來解決錯誤。當我嘗試建立我使用的項目的NetBeans它給了我以下錯誤:在netbeans中構建項目時出現常春藤錯誤

confs: [compile, runtime, compile-test, runtime-test] 
C:\Users\Tejas\Documents\NetBeansProjects\LaitsV3\Laitsv3second\nbproject\ivy-impl.xml:92: impossible to resolve dependencies: 

java.io.FileNotFoundException: C:\Users\Tejas\.netbeans\7.1.1\modules\ext\ivy-2.1.0.jar\cache\resolved-Laitsv3second-Laitsv3second-1.0.xml (The system cannot find the path specified) 

哪裏,因爲這Laitsv3second-Laitsv3second-1.0正在從ivy.xml文件的信息標籤拾起常春藤如下:

<ivy-module version="2.0"> 
    <info organisation="Laitsv3second" module="Laitsv3second" revision="1.0" /> 

燦有人幫我識別這個問題嗎?或任何指針的幫助?

回答

2

我加入以下的ivysetting

<property name="ivy.default.ivy.user.dir" value="${user.home}/.ivy2" /> 
    <caches resolutionCacheDir="${user.home}/.ivy2/cache" defaultCacheDir="${user.home}/.ivy2/cache"/> 

這種方式,試圖找到在指定目錄緩存解決了這個錯誤。否則,它會嘗試在ivy.jar文件中查找緩存。這可能聽起來很愚蠢,但它會發生什麼。 這與ivvybeans論壇上報告的問題相同,但尚未解決。 https://code.google.com/p/ivybeans/issues/detail?id=103

1

它的工作對我來說,這是我的ivysetting樣子:

<ivysettings> 
<settings defaultResolver="main" > 
    <property name="ivy.default.ivy.user.dir" value="${user.home}/.ivy2" /> 
    <caches resolutionCacheDir="${user.home}/.ivy2/cache" defaultCacheDir="${user.home}/.ivy2/cache"/> 
</settings> 

<resolvers> 

<chain name="main"> 
    <url name="repo" m2compatible="true"> 
     <artifact pattern="http://reposserver/artifactory/repo/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" /> 
     <ivy pattern="http://reposerver/artifactory/repo/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).pom" /> 
    </url> 
    <ibiblio name="compass" m2compatible="true" root="http://repo.compass-project.org"></ibiblio> 
    <ibiblio name="ibiblio" m2compatible="true"></ibiblio> 
    </chain> 
</resolvers> 
</ivysettings>