# maven-dev mailing list archives

##### Site index · List index
Message view
Top
Subject RE: Tool to clean snapshots from the repo
Date Thu, 17 May 2007 04:09:19 GMT
```Heh. I fill up a 300gb disk every 3 weeks ;-)

That script didn't seem to recurse for me, but in the comments of the
blog, I was tipped off to the FORFILES windows command. I was able to
whip up a simple batch file:

@echo Starting Clean Process at %DATE% %TIME% >>aging.log
@forfiles /P d:\maven-repos\stc-snapshots /D -14 /S /C "cmd /c echo
Deleting @file && DEL @file" /M *.* 1>> aging.log
@echo Ended Clean Process at %DATE% %TIME% >>aging.log

-----Original Message-----
From: Evan Worley [mailto:evanworley@gmail.com]
Sent: Wednesday, May 16, 2007 8:25 PM
To: Maven Developers List
Subject: Re: Tool to clean snapshots from the repo

We set it to delete snapshots at least 90 days old, that feels very safe
to
me :)

On 5/16/07, Brian E. Fox <brianf@reply.infinity.nu> wrote:
>
> Interesting. I'm doing the same thing but I was concerned about
trashing
> snapshots that may be referenced in a dev branch. I guess it won't
hurt
> to try as is and see what happens.
>
> -----Original Message-----
> From: Evan Worley [mailto:evanworley@gmail.com]
> Sent: Wednesday, May 16, 2007 6:26 PM
> To: Maven Developers List
> Subject: Re: Tool to clean snapshots from the repo
>
> Brian,
>
> We did not add any exclusion functionality, we have a cruisecontrol
> machine
> which is deploying snapshot artifacts to that repository roughly every
> 30
> minutes, so we are not concerned about any files older than 7 days.  I
> understand that this would be an issue for any repository that is not
> purely
> a snapshot repo.
>
> Evan
>
> On 5/16/07, Brian E. Fox <brianf@reply.infinity.nu> wrote:
> >
> > Where you able to tailor this to only delete files if it won't leave
> > none? I think simply aging the files won't work, especially when we
> move
> > to another version, we don't want to remove all versions, but just
> leave
> > behind the last one.
> >
> > -----Original Message-----
> > From: Evan Worley [mailto:evanworley@gmail.com]
> > Sent: Wednesday, May 16, 2007 1:53 PM
> > To: Maven Developers List
> > Subject: Re: Tool to clean snapshots from the repo
> >
> > Here is the original script that we tailored for our needs.
> >
> >
>
http://lifehacker.com/software/geek-to-live/geek-to-live-hard-drive-jani
> > tor-133190.php
> >
> > On 5/16/07, Damien Lecan <ml@dlecan.com> wrote:
> > >
> > > Hi Evan,
> > >
> > > If can publish it ...
> > >
> > > Thanks
> > >
> > > Damien
> > >
> > > 2007/5/11, Evan Worley <evanworley@gmail.com>:
> > > > HI Damien,
> > > >
> > > > While there might be a more elegant method, we used a scheduled
> > to
> > > > delete all snapshot builds that were older than 7 days.  We
> > typically
> > > build
> > > > 10-20 snapshots a day for a given component.  If you are
> interested
> > in
> > > this
> > > > method, I can point you to the script that does the cleaning.
> > > >
> > > > Evan
> > > >
> > > > On 5/11/07, Damien Lecan <ml@dlecan.com> wrote:
> > > > >
> > > > > Any idea of how to remove old artifact snapshot ?
> > > > >
> > > > > Can repositorytools be useful for that ?
> > > > >
> > > > > Thanks
> > > > >
> > > > > Damien
> > > > >
> > > > > > Which goal specifically?  I can only see:
> > > > > >
> > > > > > repositorytools:add-artifact
> > > > > > repositorytools:add-plugin-group
> > > > > > repositorytools:add-repository
> > > > > > repositorytools:copy-artifact
> > > > > > repositorytools:copy-repository
> > > > > > repositorytools:deploy-bundle
> > > > > > repositorytools:deploy-repository
> > > > > > repositorytools:export-csv
> > > > > > repositorytools:validate
> > > > > >
> > > > > > Mark
> > > > > >
> > > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> >
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org