开发者

Problems with type and ext attribute of artifact

I have following definition in 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>

I have files with either extension conf or properties which i need at runtime, in ivysettings.xml, i have following:

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

It always tries to look for ego.jar instead of ego.conf. can please somebody shed light on this? am i doing something wrong or ivy just supports tar,zip,gz, jar and not properties or conf files?

I did workaround for now in ivysettings.xml

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

but this doesnt looks good to hardcode conf there. Thanks,

Almas


Without a more details example I'm not sure what is wrong.

Here's my working project

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

The ivy file declares the project dependencies:

$ 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>

And the ivy settings file

$ 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>

Downloads just fine

$ 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)
..
..

Is it possible that you need to clean your ivy cache directory? (See the ivy:cleancache task)

I'm thinking that perhaps ivy is picking up an older resolution of the module before you added the "artifact" entry.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜