You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jim stafford <jc...@apl.jhu.edu> on 2006/08/31 05:22:45 UTC

pruning or limiting snapshots

Is there any way to limit the number of SNAPSHOTs that accumulate in the 
SNAPSHOT repository using only Maven?

I realize I can use shell script pruning tools and cron to help reduce 
the clutter, but I was wondering if there was a way of getting the 
deploy plugin to do the work. It looks like each deploy adds another 
version of the SNAPSHOT without replacing the previous versions.

thanks,
jim

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: pruning or limiting snapshots

Posted by jim stafford <jc...@apl.jhu.edu>.
Barrie,

Thanks! uniqueVersion is what I needed.
http://maven.apache.org/ref/current/maven-model/maven.html#class_snapshotRepository

I do have separate release and snapshot repositories. Although I am 
still trying to sort out my use of SNAPSHOTS versus versions, in this 
case they are the result of nightly or other milestone builds. People 
will see the artifact and the source assembly in the snapshot repository 
before they see it in SVN.

I would feel quite sloppy if I saw 100s of versions out there knowing 
that 99.9% of the time the latest version is what is needed. I can see 
the point where other projects want to lock into a stable environment 
(just happens not to be true in my case). For that, I could see them 
turing off snapshot updates.

thanks again,
jim

Barrie Treloar wrote:

> On 8/31/06, jim stafford <jc...@apl.jhu.edu> wrote:
>
>> Is there any way to limit the number of SNAPSHOTs that accumulate in the
>> SNAPSHOT repository using only Maven?
>>
>> I realize I can use shell script pruning tools and cron to help reduce
>> the clutter, but I was wondering if there was a way of getting the
>> deploy plugin to do the work. It looks like each deploy adds another
>> version of the SNAPSHOT without replacing the previous versions.
>
>
> You want those snapshots kept so that you can reproduce your builds.
> But given that snapshots are development builds you could clean them
> up, but I'm not sure it is worth that much effort. Disk space is cheap
> right?
>
> You should have two repositories, one for release artifacts and one
> for snapshot artifacts.
> So theoretically, if you have just released your application you could
> just delete the snapshot repository, but if more than one project is
> using that repository deleting would be a bad thing (tm).
>
> The other problem you might run into if you delete selected files is
> that the metadata would refer to things that no longer exist.
>
> Alternatively, if you just want to keep one snapshot you can use the
> uniqueVersion, see
> http://www.nabble.com/forum/ViewPost.jtp?post=5971992&framed=y
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: pruning or limiting snapshots

Posted by Barrie Treloar <ba...@gmail.com>.
On 8/31/06, jim stafford <jc...@apl.jhu.edu> wrote:
> Is there any way to limit the number of SNAPSHOTs that accumulate in the
> SNAPSHOT repository using only Maven?
>
> I realize I can use shell script pruning tools and cron to help reduce
> the clutter, but I was wondering if there was a way of getting the
> deploy plugin to do the work. It looks like each deploy adds another
> version of the SNAPSHOT without replacing the previous versions.

You want those snapshots kept so that you can reproduce your builds.
But given that snapshots are development builds you could clean them
up, but I'm not sure it is worth that much effort. Disk space is cheap
right?

You should have two repositories, one for release artifacts and one
for snapshot artifacts.
So theoretically, if you have just released your application you could
just delete the snapshot repository, but if more than one project is
using that repository deleting would be a bad thing (tm).

The other problem you might run into if you delete selected files is
that the metadata would refer to things that no longer exist.

Alternatively, if you just want to keep one snapshot you can use the
uniqueVersion, see
http://www.nabble.com/forum/ViewPost.jtp?post=5971992&framed=y

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org