You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Steven E. Harris" <se...@panix.com> on 2007/01/08 17:56:36 UTC

Deploying to snapshot repository: controlling accretion

I'm experimenting with deploying snapshots to an internal snapshot
repository, using the scpexe URL scheme for now. I noticed that each
time I deploy, maven generates a fresh version¹ and places a new set
of files in the repository.

Is there any automated way to clean up old snapshots, or control how
many of these versioned sets of files are left sitting in the
repository? I haven't actually used the deploy goal much, but I
anticipate that we'd never want more than three snapshot versions
sitting around in the repository. Is it my responsibility to purge the
old versions manually?


Footnotes: 
¹ The uniqueVersion parameter is left to its default, true.

-- 
Steven E. Harris


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


Re: Deploying to snapshot repository: controlling accretion

Posted by Mark Hobson <ma...@gmail.com>.
On 09/01/07, Wayne Fay <wa...@gmail.com> wrote:
> Submitting an RFE in JIRA for this is the right approach.
>
> However, realize that your RFE has the best chance of actually being
> implemented in Maven if you do the grunt (code and test) work and then
> contribute it for future versions of the deploy plugin. And of course
> not everyone will want to use this "feature" or might want to keep
> varying numbers of old snapshots so you'll want to add some
> configuration etc.

We'd certainly have use for this functionality - we currently have to
do this manually.

Mark

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


Re: Deploying to snapshot repository: controlling accretion

Posted by Wayne Fay <wa...@gmail.com>.
Submitting an RFE in JIRA for this is the right approach.

However, realize that your RFE has the best chance of actually being
implemented in Maven if you do the grunt (code and test) work and then
contribute it for future versions of the deploy plugin. And of course
not everyone will want to use this "feature" or might want to keep
varying numbers of old snapshots so you'll want to add some
configuration etc.

Wayne

On 1/9/07, Steven E. Harris <se...@panix.com> wrote:
> Rahul Thakur <ra...@gmail.com> writes:
>
> > I am not sure about anyway to clean up old snapshot version except
> > for manual purge. But note that would render the metadata.xml out of
> > sync.
>
> Right, but my assumption is that this purging would happen when Maven
> is deploying a new version, so it would have to rewrite the metadata
> files anyway.
>
> The process I'm after would look something like this, keeping only,
> say, the most recent three versions:
>
>  for f in `ls -t *.pom | sed -e '1,3d; s/\.pom$//'`; do
>    rm $f.pom{,.md5,.sha1} $f.jar{,.md5,.sha1};
>  done
>
> with the metadata files updated to match.
>
> Should I submit a JIRA issue as a request for enhancement?
>
> --
> Steven E. Harris
>
>
> ---------------------------------------------------------------------
> 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: Deploying to snapshot repository: controlling accretion

Posted by "Steven E. Harris" <se...@panix.com>.
Rahul Thakur <ra...@gmail.com> writes:

> I am not sure about anyway to clean up old snapshot version except
> for manual purge. But note that would render the metadata.xml out of
> sync.

Right, but my assumption is that this purging would happen when Maven
is deploying a new version, so it would have to rewrite the metadata
files anyway.

The process I'm after would look something like this, keeping only,
say, the most recent three versions:

  for f in `ls -t *.pom | sed -e '1,3d; s/\.pom$//'`; do
    rm $f.pom{,.md5,.sha1} $f.jar{,.md5,.sha1};
  done

with the metadata files updated to match.

Should I submit a JIRA issue as a request for enhancement?

-- 
Steven E. Harris


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


Re: Deploying to snapshot repository: controlling accretion

Posted by Rahul Thakur <ra...@gmail.com>.
Ah.... I was talking about 'uniqueVersion' issue, setting it to 'false' 
wouldn't work.

Sorry about the confusion. I am not sure about anyway to clean up old 
snapshot version except for manual purge. But note that would render the 
metadata.xml out of sync.

Cheers,
Rahul


----- Original Message ----- 
From: "Steven E. Harris" <se...@panix.com>
To: <us...@maven.apache.org>
Sent: Tuesday, January 09, 2007 11:17 AM
Subject: Re: Deploying to snapshot repository: controlling accretion


> Rahul Thakur <ra...@gmail.com> writes:
>
>> http://jira.codehaus.org/browse/MNG-1908
>
> Thanks, but I don't see any content in that issue or any of its
> duplicates that mentions cleaning up old snapshot versions from a
> deployed repository.
>
> -- 
> Steven E. Harris
>
>
> ---------------------------------------------------------------------
> 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: Deploying to snapshot repository: controlling accretion

Posted by "Steven E. Harris" <se...@panix.com>.
Rahul Thakur <ra...@gmail.com> writes:

> http://jira.codehaus.org/browse/MNG-1908

Thanks, but I don't see any content in that issue or any of its
duplicates that mentions cleaning up old snapshot versions from a
deployed repository.

-- 
Steven E. Harris


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


Re: Deploying to snapshot repository: controlling accretion

Posted by Rahul Thakur <ra...@gmail.com>.
Here:
http://jira.codehaus.org/browse/MNG-1908

Rahul

Steven E. Harris wrote:
> Rahul Thakur <ra...@gmail.com> writes:
>
>   
>> There's a bug logged on JIRA about 'uniqueVersion' property. I think
>> its fixed for release 2.0.5 (not out yet).
>>     
>
> Do you happen to know the JIRA key, or perhaps its title? I've been
> searching on http://jira.codehaus.org under the "Maven 2.x Deploy
> Plugin" (MDEPLOY) project, but I haven't found anything that sounds
> like the problem we're discussing.
>
>   

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


Re: Deploying to snapshot repository: controlling accretion

Posted by "Steven E. Harris" <se...@panix.com>.
Rahul Thakur <ra...@gmail.com> writes:

> There's a bug logged on JIRA about 'uniqueVersion' property. I think
> its fixed for release 2.0.5 (not out yet).

Do you happen to know the JIRA key, or perhaps its title? I've been
searching on http://jira.codehaus.org under the "Maven 2.x Deploy
Plugin" (MDEPLOY) project, but I haven't found anything that sounds
like the problem we're discussing.

-- 
Steven E. Harris


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


Re: Deploying to snapshot repository: controlling accretion

Posted by Rahul Thakur <ra...@gmail.com>.
There's a bug logged on JIRA about 'uniqueVersion' property. I think its 
fixed for release 2.0.5 (not out yet).

So until 2.0.5 is out its a manual process, I guess  :-)

cheers,
Rahul

----- Original Message ----- 
From: "Steven E. Harris" <se...@panix.com>
To: <us...@maven.apache.org>
Sent: Tuesday, January 09, 2007 5:56 AM
Subject: Deploying to snapshot repository: controlling accretion


> I'm experimenting with deploying snapshots to an internal snapshot
> repository, using the scpexe URL scheme for now. I noticed that each
> time I deploy, maven generates a fresh version¹ and places a new set
> of files in the repository.
>
> Is there any automated way to clean up old snapshots, or control how
> many of these versioned sets of files are left sitting in the
> repository? I haven't actually used the deploy goal much, but I
> anticipate that we'd never want more than three snapshot versions
> sitting around in the repository. Is it my responsibility to purge the
> old versions manually?
>
>
> Footnotes:
> ¹ The uniqueVersion parameter is left to its default, true.
>
> -- 
> Steven E. Harris
>
>
> ---------------------------------------------------------------------
> 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