現在、Ivy で Eclipse のビルド パスを変更しています。
また、依存関係を取得する 2 つの Ivy ファイルをロードして、ANT ビルドを正常に変更しました。
ポートレット ビルド ファイルでは、すべてのポートレットに共通の依存関係を明確に呼び出します。これにより、すべてのポートレット プロジェクトで同じライブラリを指定することができなくなります。
<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 ファイルを設定するにはどうすればよいですか?