We won't reopen this. To add the logic here we'd have to copy it out of one of 
the repository managers which doesn't make any sense.

What we will do in the future (read 3.1) is have a separation in the local 
repository repository structure between releases and snapshots. This way you 
can turf all your snapshot artifacts easily if they happen to grow. In 8 years 
I've never had a local repository grow uncontrollably to the point where it's 
blow my disk. Right now I'm sitting 3.3gb and I probably build more projects, 
more frequently then most.

You could probably start with the dependency purge Mojo and augment it to 
handle snapshots 
(http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html)

Given everything else we'd like to do, this is pretty low on the priority list 
. If you wanted to code up the logic it would easily be put in a plugin and you 
could share it with folks. Could be run in the validate phase if you always 
want Maven to check. But I think this is something that the user would always 
want to invoke because I personally wouldn't want it running on every 
invocation.

The other easy option would be to run Nexus locally and use it's snapshot clean 
up task, and then just completely wipe out your local Maven repository. Nexus 
will store everything so repopulating your repository will be very fast. You'll 
alway have your releases on hand, not have to worry about being offline, and 
you can completely control the population of snapshots.

On Oct 29, 2010, at 8:26 AM, <[email protected]> wrote:

> All,
> 
> It appears that the behavior I described in my previous email regarding 
> snapshot behavior in the local repository is expected Maven behavior.  I 
> found the following issue that was raised some time ago regarding this:
> 
> http://jira.codehaus.org/browse/MNG-3472
> 
> This issue was closed as "won't fix" and I'd like to request that it be 
> re-opened. The general reason behind closing this was that that CI tools 
> should be responsible for cleaning up the local repository periodically 
> thereby
> removing the old versions of snapshot artifacts.  While I completely disagree 
> with this, I also think it misses the point.  Individual developers will 
> suffer from this problem as well on their personal dev machines.  Is it each
> developer's responsibility to understand the details of how snapshot 
> artifacts are managed in the local repository and periodically clean up after 
> Maven?  I don't think so.  It seems like the best solution here is to allow
> a retention policy to be defined in the settings.xml including a default 
> value which is fairly small.
> 
> I'm not sure there's even a use-case for individual developers wanting to 
> maintain multiple old versions of snapshot artifacts in their local repos.
> 
> Please re-open this issue.
> 
> Thanks.
> 
> -brian
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

Our achievements speak for themselves. What we have to keep track
of are our failures, discouragements and doubts. We tend to forget
the past difficulties, the many false starts, and the painful
groping. We see our past achievements as the end result of a
clean forward thrust, and our present difficulties as
signs of decline and decay.

 -- Eric Hoffer, Reflections on the Human Condition



Reply via email to