0

ivy.xmlに次の定義があります

<dependency org="southbeach" name="ego" rev="4.3.1" conf="properties->asterik" >
  <artifact name="ego" type="conf" ext="conf" conf="properties->asterik"/>
</dependency>

実行時に必要な拡張子confまたはプロパティを持つファイルがivysettings.xmlにあり、次のようになっています。

<filesystem name="privateFSa">
  <artifact pattern="${localRepositoryLocation}/[artifact].[ext]" />
</filesystem>

常にego.confではなくego.jarを検索しようとします。誰かがこれに光を当ててくださいますか?私は何か間違ったことをしていますか、それともivyはtar、zip、gz、jarをサポートしており、プロパティやconfファイルはサポートしていませんか?

私は今のところivysettings.xmlで回避策を実行しました

<filesystem name="privateFSa">
      <artifact pattern="${localRepositoryLocation}/[artifact].conf" />
</filesystem>

しかし、これはconfをハードコーディングするのには良くありません。ありがとう、
アルマス

4

1 に答える 1

0

詳細な例がなければ、何が悪いのかわかりません。

これが私の作業プロジェクトです

$ find . -type f
./build.xml
./ivy.xml
./ivysettings.xml
./repository/southbeach/ego/4.3.1/confs/ego.conf

ivyファイルは、プロジェクトの依存関係を宣言します。

$ cat ./ivy.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<ivy-module version="2.0">
    <info organisation="com.myspotontheweb" module="demo"/>
    <dependencies>
        <dependency org="southbeach" name="ego" rev="4.3.1">
            <artifact name="ego" type="conf"/>
        </dependency>
    </dependencies>
</ivy-module>

そしてツタの設定ファイル

$ cat ./ivysettings.xml
<ivysettings>
    <settings defaultResolver="privateFSa"/>
    <resolvers>
        <filesystem name="privateFSa">
            <artifact pattern="${ivy.settings.dir}/repository/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" />
        </filesystem>
    </resolvers>
</ivysettings>

うまくダウンロード

$ ant
Buildfile: build.xml
..
..
[ivy:retrieve]  found southbeach#ego;4.3.1 in privateFSa
[ivy:retrieve] downloading /????/repository/southbeach/ego/4.3.1/confs/ego.conf ...
[ivy:retrieve] .. (0kB)
..
..

ivyキャッシュディレクトリをクリーンアップする必要がある可能性はありますか?(ivy:cleancacheタスクを参照してください)

「アーティファクト」エントリを追加する前に、おそらくツタがモジュールの古い解像度を取得していると思います。

于 2010-05-23T15:24:34.927 に答える