在 Eclipse 中映射多个常春藤文件 [英] mapping multiple ivy files in Eclipse
问题描述
我目前正在使用 Ivy 更改我的 Eclipse 构建路径.
I'm currently changing my eclipse build paths with Ivy.
我还通过加载 2 个用于检索我的依赖项的 Ivy 文件成功地修改了我的 ANT 构建:
I also modified my ANT build successfully by having 2 Ivy files loaded that retrieve my dependencies:
在我的 portlet 构建文件中,我专门调用了所有 portlet 的公共依赖项,这阻止了我在每个 Portlet 项目中指定相同的库:
In my portlet build file, I specifically call the common dependencies for all of the portlets which prevents me from specifying the same librairies in every Portlet project:
<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 片段中的代码:
Here's the code from build.xml snippet for all of my projects :
<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 一切正常.
Everything runs fine with ANT.
如何使用 IvyIDE 插件设置位于另一个项目中的通用 Ivy 文件?
How do I set, using IvyIDE plugin, my generic Ivy file located in another project?
推荐答案
使用 ivy extends http://ant.apache.org/ivy/history/latest-milestone/ivyfile/extends.html
Use ivy extends http://ant.apache.org/ivy/history/latest-milestone/ivyfile/extends.html
马克说过,不要制造问题然后尝试解决它.您可以使用扩展来使用其他 ivy-portlet.xml [它本身驻留在模块中] 和 extendType="depenencies"
Mark said it, don't create a problem and then try to solve it. You can use extends to use the other ivy-portlet.xml [which resides in a module by itself] with extendType="depenencies"
每个项目使用一个,IvyDE 和 ivy 文档将在您身边.尝试操作,你会发现自己很孤单.
Use one per project and IvyDE and ivy documentation will be at your side. Try to maneuver and you will find yourself alone.
这篇关于在 Eclipse 中映射多个常春藤文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!