如何覆盖常春藤缓存的位置? [英] How to override the location of Ivy's Cache?
问题描述
我正在使用Ivy作为我的持续集成构建系统的一部分,但我需要覆盖Ivy的本地缓存区域的默认位置。
I am using Ivy as part of my continuous integration build system, but I need to override the default location that Ivy's local cache area is.
推荐答案
虽然skaffman的上述答案是正确的,但我发现它比我预期的要多得多!
Although the answer above from skaffman is correct, I found it to be a lot more work than I had expected!
当我添加了ivysettings时。 xml文件到项目,然后我需要重新定义几乎所有东西,因为默认值一直工作正常。
When I added the ivysettings.xml file to the project, I then needed to redefine almost everything, as the default values had been working fine until then.
所以,我发现如何将新的缓存目录添加到我的NAnt脚本中的内联命令行...
so, I found out how to add the new cache directory to the in-line command-line within my NAnt script...
< exec program="java" commandline="... ... -jar ${ivy.jar} -cache ${project.cache} ... ... />
(其中 $ {ivy.jar}
是我的.jar文件的位置和 $ {project.cache}
是脚本中先前设置的新位置,我希望缓存区域可以使用。)
(Where ${ivy.jar}
is the location of my .jar file and ${project.cache}
is the new location set earlier in the script where I want the cache area to use.)
这意味着我不需要ivysettings.xml文件,我可以将所有内容还原为使用默认解析器等。
This means that I don't need the ivysettings.xml file, and I can revert everything back to using the default resolvers, etc.
这篇关于如何覆盖常春藤缓存的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!