1

現在、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 ファイルを設定するにはどうすればよいですか?

4

1 に答える 1

2

ivyextendsを使用するhttp://ant.apache.org/ivy/history/latest-milestone/ivyfile/extends.html

マークはそれを言った、問題を作成してからそれを解決しようとしないでください。extendsを使用して、extendType="depenencies"で他のivy-portlet.xml[モジュール自体に存在する]を使用できます。

プロジェクトごとに1つ使用すると、IvyDEとivyのドキュメントがあなたの側にあります。操縦してみてください、そうすればあなたは一人でいることに気付くでしょう。

于 2012-10-19T05:30:16.080 に答える