我目前正在使用 Ivy 更改我的 Eclipse 构建路径。
我还通过加载 2 个检索我的依赖项的 Ivy 文件成功修改了我的 ANT 构建:
在我的 portlet 构建文件中,我专门调用了所有 portlet 的公共依赖项,这使我无法在每个 Portlet 项目中指定相同的库:
<if>
<available file="${rpm.homedir}/Builder/ivy_portlet.xml" />
<then>
<echo message="Getting runtime portlet dependencies using Ivy project's configuration" />
<ivy:resolve file="${rpm.homedir}/Builder/ivy_portlet.xml"/>
<ivy:retrieve pattern="${project.lib.dir}/[conf]/[artifact]-[revision](-[classifier]).[ext]" file="${rpm.homedir}/Builder/ivy_portlet.xml"/>
</then>
<else>
<fail message=" file ${rpm.homedir}/Builder/ivy_portlet.xml not found in the builded project." />
</else>
</if>
这是我所有项目的 build.xml 片段中的代码:
<target name="get-dependencies">
<if>
<available file="${basedir}/ivy.xml" />
<then>
<echo message="Getting deps using Ivy project's configuration" />
<ivy:resolve file="${basedir}/ivy.xml"/>
<ivy:retrieve pattern="${project.lib.dir}/[conf]/[artifact]-[revision](-[classifier]).[ext]" file="${basedir}/ivy.xml"/>
</then>
<else>
<fail message=" file ${basedir}/ivy.xml not found in the builded project." />
</else>
</if>
</target>
ANT 一切正常。
如何使用 IvyIDE 插件设置位于另一个项目中的通用 Ivy 文件?