2010-05-21 33 views
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.jar而不是ego.conf。可以请有人阐明这一点?我做错了什么或常春藤只支持tar,zip,gz,jar而不是属性或conf文件?

我做了变通方法现在ivysettings.xml

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

但这并不看起来不错,有硬编码的conf。 谢谢,
Almas

回答

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> 

而ivy设置文件

$ 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:cleancache任务)

我在想,也许常春藤在添加“工件”条目之前正在拾取模块的较旧分辨率。