On Wed, Jan 04, 2012 at 10:19:15PM +0100, Ansgar Konermann wrote:
> Am 04.01.2012 05:02, schrieb zuxiong lin:
> > Append
> > like:
> > repository\org\springframework\spring-core
> > -3.0.5.RELEASE
> > -3.0.6.RELEASE
> > -3.1.0.RELEASE
> >
> > I want to remove 3.0.5 and 3.0.6.
> 
> The local maven repository is an artifact cache. Why do you want to
> remove anything from this cache? This does not reliably control what
> versions maven will use to build your project.

Because it is not a cache; it is a dumping ground for every artifact
Maven has ever fetched, whether or not that artifact will ever again
be called for.  Proper caches are limited by age, size, or both, but
the local Maven repository grows without limit.  Some people would
like to evict probably-useless artifacts from the "cache" and reclaim
the storage they occupy as well as the time spent rummaging through
all those directory entries.

[All together now: "storage is cheap!"  Storage is not free, and the
time and effort to put through a requisition, take delivery, schedule
a machine down, rip it open, install more storage, close it up, test
it, and return it to service is definitely not free and often far from
cheap.  A reasonably tidy system does more and costs less.]

That said, I think I wouldn't bother cleaning out any 3.x until 4.1
ships, or until they're at least 12 months old.  Too-aggressive cache
trimming is much more costly than no trimming at all.

Can Maven log artifact fetches and cache hits in a way that would be
useful for developing statistics on artifacts' useful lifetimes, so we
could concoct well-thought-out cache maintenance strategies?

Or maybe it would be easier to just write a script to clobber anything
with an atime more than 180 days in the past.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Asking whether markets are efficient is like asking whether people are smart.

Attachment: pgpXk18cBoBRW.pgp
Description: PGP signature

Reply via email to