我可以一起关闭 .ivy 缓存吗? [英] can I turn off the .ivy cache all together?
问题描述
有没有办法告诉 ant/ivy 不使用本地 $HOME/.ivy2
缓存?
Is there a way to tell ant/ivy to not use a local $HOME/.ivy2
cache?
推荐答案
在 关于 ivy 的完整书籍,请查看设置存储库"部分:
In the full book on ivy, you check out the "Setting up the repositories" section:
多个存储库在您的文件系统中使用相同的根.引用为 ${ivy.default.ivy.user.dir}
,默认情况下这是您用户主目录中的目录 .ivy2
.
Several repositories use the same root in your filesystem. Referenced as
${ivy.default.ivy.user.dir}
, this is by default the directory.ivy2
in your user home.
请注意,通过设置常春藤变量可以完成几件事.
要在不定义自己的 ivysettings.xml
文件的情况下设置它们,您可以:
Note that several things can be done by setting Ivy variables.
To set them without defining your own ivysettings.xml
file, you can:
- 如果您使用来自 Ant 的 Ivy,请在构建文件中对 Ivy 的任何调用之前设置 Ant 属性
- 如果您从命令行使用 Ivy,请设置环境变量
例如:
<target name="resolve">
<property name="ivy.default.ivy.user.dir" value="/path/to/ivy/user/dir"/>
<ivy:resolve />
</target>
打包器解析器也有一些设置需要配置以避免${home}
:
The packager resolver has also some settings to be configured to avoid ${home}
:
<packager name="ivyroundup"
buildRoot="/path/to/my/.ivy2/packager/build"
resourceCache="/path/to/my/.ivy2/packager/cache"
resourceURL="ftp://mirror.example.com/pub/resources/[organisation]/[module]/">
<ivy pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/ivy.xml"/>
<artifact pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/packager.xml"/>
</packager>
这篇关于我可以一起关闭 .ivy 缓存吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!