我可以关掉.ivy缓存中的所有在一起吗? [英] can I turn off the .ivy cache all together?

查看:295
本文介绍了我可以关掉.ivy缓存中的所有在一起吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法告诉蚂蚁/常青藤不使用本地 $ HOME / .ivy2 缓存?


解决方案

满书常春藤,你检查出的设置库部分:


  

若干仓库使用相同的根在你的文件系统。引用为 $ {ivy.default.ivy.user.dir} ,这是默认的目录 .ivy2 中用户家中。


  
  

需要注意的是几件事情可以通过设置ivy变量来完成。结果
  要设置这些没有定义自己的 ivysettings.xml 文件,您可以:


  
  

      
  • 在构建文件常春藤任何调用之前设置一个Ant属性,如果您使用的Ivy从蚁

  •   
  • 如果您在命令行中使用的Ivy设置环境变量

  •   

  
  

例如:


 <目标名称=解析>
  <属性名=ivy.default.ivy.user.dirVALUE =/路径/要/常春藤/用户/目录/>
  <常春藤:决心/>
< /目标与GT;

包装程序解析也有一些设置进行配置,以避免 $ {HOME}

 <打包NAME =ivyroundup
         的buildroot =/路径/要/我的/ .ivy2 /打包/建造
         resourceCache =/路径/要/我的/ .ivy2 /打包/缓存
         resourceURL =ftp://mirror.example.com/pub/resources/[organisation]/[module]/>
    <常春藤pattern=\"http://ivyroundup.google$c$c.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/ivy.xml\"/>
    <神器pattern=\"http://ivyroundup.google$c$c.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/packager.xml\"/>
< /打包>

Is there a way to tell ant/ivy to not use a local $HOME/.ivy2 cache?

解决方案

In the full book on ivy, you check out the "Setting up the repositories" section:

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.

Note that several things can be done by setting Ivy variables.
To set them without defining your own ivysettings.xml file, you can:

  • set an Ant property before any call to Ivy in your build file if you use Ivy from Ant
  • set an environment variable if you use Ivy from the command line

For example:

<target name="resolve">
  <property name="ivy.default.ivy.user.dir" value="/path/to/ivy/user/dir"/>
  <ivy:resolve />
</target>

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆