Ivy Ant任务无法在eclipse工作区中解析

时间:2014-06-02 01:05:08

标签: eclipse ant ivy

我正在尝试使用常春藤的cachepath Ant任务来检索eclipse的项目类路径,以便使用它来进行GWT编译。

我在eclipse中使用了IvyDE,并使用了IvyDE的Eclipse's Ant integration guide

到目前为止一切顺利:我可以在eclipse的Ant版本中运行常春藤的ant任务

我面临的问题是,常春藤cachepath 无法解析其他日食项目的依赖

我的Ant的build.xml是这样的:

<?xml version="1.0" encoding="UTF-8"?>
<project name="GWT Ant Build" basedir="." default="gwt-compile"
         xmlns:a4e="antlib:org.ant4eclipse"
         xmlns:ac="antlib:net.sf.antcontrib"
         xmlns:ivy="antlib:org.apache.ivy.ant">

    <ivy:settings file="ivysettings.xml" />
    <ivy:resolve file="../ivy.xml" />
    <ivy:cachepath pathid="ivy.deps.default" conf="default" />

    <pathconvert property="classpathProp" refid="ivy.deps.default"/>
    <echo>:::: ${classpathProp}</echo>
    ....
</project>

ivysettings.xml只是重新定义本地和缓存目录:

<ivysettings>
    <property name="ivy.local.default.root" 
              value="/home/ivy/local" override="false"/>
    <caches defaultCacheDir="/home/ivy/cache"/>
    <include url="${ivy.default.settings.dir}/ivysettings.xml"/>
</ivysettings>

如果项目 NOT 与其他eclipse项目有依赖关系,那么一切正常,如果eclipse项目依赖于另一个eclipse项目ivy的cachepath是无法解决依赖项目:

[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve]       module not found: r01#r01fbClasses;latest.integration
[ivy:resolve]   ==== local: tried
[ivy:resolve]     /home/ivy/local/r01/r01fbClasses/[revision]/ivys/ivy.xml
[ivy:resolve]     -- artifact r01#r01fbClasses;latest.integration!r01fbClasses.jar:
[ivy:resolve]     /home/ivy/local/r01/r01fbClasses/[revision]/jars/r01fbClasses.jar
[ivy:resolve]   ==== shared: tried
                             ...
[ivy:resolve]   ==== public: tried
[ivy:resolve]            ...

注意使用IvyDE一切正常,问题仅在于常春藤的Ant任务

我不知道使用Ant任务是否可以解析eclipse工作区...

0 个答案:

没有答案