【问题标题】:update project classpath with ant after retrieving dependencies in ivy在 ivy 中检索依赖项后使用 ant 更新项目类路径
【发布时间】:2013-10-09 21:36:01
【问题描述】:

这是我的 build.xml 的一部分

<property name="dir.ivy" value="${user.home}/.ivy2" description="Local Ivy Repository" />

<target name="retrieve" depends="clean,init">

    <!-- Resolve dependencies -->
    <ivy:resolve file="ivy.xml"/>
    <ivy:retrieve type="jar" conf="${ivy.configuration}" pattern="${dir.ivy}/[artifact]-[revision].[ext]"/>

    <!-- Update classpath -->
    ???

</target>

在我从 artifactory 或 maven 下载了在我的 ivy.xml 中定义的依赖项后,我想将它们添加到我的项目类路径中,而不需要从项目手动添加它们 - 配置构建路径......并且不编译我的类。

有什么想法吗?

【问题讨论】:

    标签: ant build classpath ivy artifactory


    【解决方案1】:

    cachepath 任务可用于创建 ivy 托管类路径。

    示例见:

    【讨论】:

      【解决方案2】:

      我终于找到了解决方案,我使用了 eclipse 的 Apache IvyDE 插件来更新项目类路径。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2013-04-20
        • 2011-01-18
        • 2014-12-27
        • 2020-03-12
        • 2018-04-06
        • 2023-03-25
        • 2014-07-11
        相关资源
        最近更新 更多