ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée <nicolas.lale...@hibnet.org>
Subject Re: global ivysettings.xml ?
Date Fri, 04 Mar 2011 14:50:50 GMT

Le 4 mars 2011 à 15:19, heapifyman a écrit :

> Am 04.03.2011 15:11, schrieb Nicolas Lalevée:
>> 
>> Le 4 mars 2011 à 12:37, heapifyman a écrit :
>> 
>>> 
>>> Hello all,
>>> 
>>> coming from maven, I'm used to a global settings.xml in USER_HOME/.m2.
>>> 
>>> Can I have a similar thing for ivy2? I was trying to change the
>>> defaultCacheDir by putting an ivysettings.xml file into the
>>> USER_HOME/.ivy2 with the following content:
>>> 
>>> <ivysettings>
>>> 	<caches defaultCacheDir="D:\.ivy2\cache" />
>>> </ivysettings>
>>> 
>>> This does not seem to be working.
>>> Do I have to specify that setting in every project that uses ivy?
>> 
>> You could also define the property "ivy.cache.dir" for that. Where you set that property
depends on how you use Ivy.
> 
> Where would I define that property? Currently, I'm experimenting with
> sbt, which uses ivy for dependency resolution if I'm not mistaken.
> 
> I'd just like to move the cache directory out of my USER_HOME folder as
> this needs to be kept at small size due to company policy.
> And as I know myself I will keep forgetting to set that property if I
> have to define it in every new project. That's why I'm looking for some
> kind of global configuration.

I search quickly about how sbt use Ivy, and it seems your use case is supported:
http://stackoverflow.com/questions/3142856/configure-sbts-ivy-cache-directory-per-user-or-system-wide
But it seems thoses users have issues making it work.

I tried to find out how sbt use Ivy but I din't found the proper piece of code that would
have enlightened me. I was trying to find a IvyVariableContainer implementation for SBT (there
is IvyAntVariableContainer for Ant for instance). You probably want to ask on the sbt user
mailing list about how to define that property.

Nicolas


Mime
View raw message