ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Scokart" <gscok...@gmail.com>
Subject RE: flexible cache management (IVY-399)
Date Fri, 04 Jan 2008 14:07:06 GMT
+1

Gilles


> -----Original Message-----
> From: Xavier Hanin [mailto:xavier.hanin@gmail.com]
> Sent: vendredi 4 janvier 2008 14:56
> To: Ant Developers List
> Subject: Re: flexible cache management (IVY-399)
> 
> After more thoughts and while starting documenting the new cache management,
> I think I have a better alternative to my last proposition:
> - put any defaults related to repository cache managers in the caches
> element. This include the default cache manager to use, the default basedir
> (for repository cache only), default ivy and artifact pattern and default
> lock strategy
> - keep the defaultCache in settings element, and add a resolutionCacheDir
> attribute
> - deprecate cacheIvyPattern and cacheArtifactPattern on settings element in
> favor of ivyPattern and artifactPattern on caches element
> - remove the cacheDefaults element
> 
> Here is how a setup would look like:
> <ivysettings>
>     <settings defaultCache="path/to/mycache"
> resolutionCacheDir="path/to/resolution/cache/dir" />
>     <caches
>             default="mycache2"
>             basedir="path/to/default/repository/cache/dir"
>             ivyPattern="[module]/ivys/ivy-[revision].xml"
>             artifactPattern="[module]/[type]s/[artifact]-[revision].[ext]"
>             lockStrategy="artifact-lock" >
>         <cache name="mycache"
>                 basedir="mycache"
>                 ivyPattern="[module]/ivy-[revision].xml"
>                 artifactPattern="[module]/[artifact]-[revision].[ext]"
>                 lockStrategy="no-lock"
>         />
>         <cache name="mycache2" />
>     </caches>
>     <resolvers>
>         <filesystem name="A">
>             <ivy
> pattern="${shared}/[organisation]/[module]/ivys/ivy-[revision].xml"/>
>             <artifact
> pattern="${shared}/[organisation]/[module]/[type]s/[artifact]-[revision].[type]"/>
>         </filesystem>
>         <filesystem name="B" cache="mycache">
>             <ivy pattern="${libraries.dir
> }/[organisation]/[module]/ivys/ivy-[revision].xml"/>
>             <artifact pattern="${libraries.dir
> }/[organisation]/[module]/[type]s/[artifact]-[revision].[type]"/>
>         </filesystem>
>     </resolvers>
> </ivysettings>
> 
> I think this is both closer to how some other settings work (like statuses
> element which allow to define the default status) and to how cache was
> defined in 1.x (keeping defaultCache which was used by many users, and will
> still be as long as you don't want to distinguish the two kinds of caches).
> 
> So, does it sound like a good solution? Do you guys have other propositions?
> 
> Xavier
> 
> 
> --
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://ant.apache.org/ivy/
> http://www.xoocode.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message