在netbeans中构建项目时常春藤错误

时间:2013-06-27 02:45:24

标签: java netbeans ant build ivy

我是常春藤新手,我需要一些帮助来解决错误。当我尝试使用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)

这里{i>来自ivy.xml文件的信息标签中的Laitsv3second-Laitsv3second-1.0,如下所示:

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

有人可以帮我识别这个问题吗?或任何帮助指针?

2 个答案:

答案 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 :(得分: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>