You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Henri Gomez <he...@gmail.com> on 2009/06/15 10:46:27 UTC
Plugin / Tool for local repository
Hi to all,
I wonder if there is a plugin/tool available to clean a local repository ?
After some time repository could became huge with many snapshots or
versions (when using ranges) and the only way, for now, is just to
clean up by hand.
Repository managers like Nexus or Archiva does this cleanup, that's
why I wonder if such service could exist in a maven plugin.
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Plugin / Tool for local repository
Posted by Wendy Smoak <ws...@gmail.com>.
On Mon, Jun 15, 2009 at 11:38 AM, Mohan KR<km...@gmail.com> wrote:
> same here, interested in any updates on the plugin from the discussion
> below. Don't want to whip out another one
> if it already exists.
The code definitely exists -- Apache Continuum has a feature that
purges the local repo used for builds:
http://continuum.apache.org/docs/1.3.3/administrator_guides/purgeConfiguration.html
I don't know that it's been wrapped in a plugin though.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Plugin / Tool for local repository
Posted by Tim Andersen <ta...@studentloan.org>.
We use a scheduled task that runs a Ruby program to delete our local repository if it is older than a week. You could manipulate this to only delete snapshots, but I prefer to get everything fresh to make sure our internal mirror is working correctly. The full version of this program (not included) also does nifty chores such as defragging and updating Subversion directories. If you're interested in more admin tasks with Ruby I suggest: http://www.pragprog.com/titles/bmsft/everyday-scripting-with-ruby
Here's the Ruby code snippet to blast the maven repository:
#Delete the local maven repository if it is older than a week
m2_repo = "c:\\path\\to\\your\\maven\\repo"
if File.exists?(m2_repo)
one_week_in_seconds = 604800
dir_age = start - File.ctime(m2_repo)
if (dir_age > one_week_in_seconds)
puts "#{m2_repo} was created #{dir_age} seconds ago."
puts "Deleting #{m2_repo}"
FileUtils.rm_rf(m2_repo)
puts "Finished deleting #{m2_repo}"
else
puts "Skipped deleting #{m2_repo} it's only #{dir_age} seconds old"
end
"No directory #{m2_repo}"
end
-----Original Message-----
From: Mohan KR [mailto:kmoh.raj@gmail.com]
Sent: Monday, June 15, 2009 1:38 PM
To: 'Maven Users List'
Subject: RE: Plugin / Tool for local repository
same here, interested in any updates on the plugin from the discussion
below. Don't want to whip out another one
if it already exists.
Thanks,
mohan kr
-----Original Message-----
From: Henri Gomez [mailto:henri.gomez@gmail.com]
Sent: Monday, June 15, 2009 9:32 AM
To: Maven Users List
Subject: Re: Plugin / Tool for local repository
I saw an interested thread on mojo-dev about a local repository purge
plugin.
http://www.nabble.com/local-repository-purge-plugin-td16937047.html
Any one know it status ?
2009/6/15 Henri Gomez <he...@gmail.com>:
> Good stuff but I also needed the various versions of the project to be
removed.
>
>
>
> 2009/6/15 Anders Hammar <an...@hammar.net>:
>>
http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-reposito
ry-mojo.html
>>
>> /Anders
>>
>> On Mon, Jun 15, 2009 at 10:46, Henri Gomez<he...@gmail.com> wrote:
>>> Hi to all,
>>>
>>> I wonder if there is a plugin/tool available to clean a local repository
?
>>>
>>> After some time repository could became huge with many snapshots or
>>> versions (when using ranges) and the only way, for now, is just to
>>> clean up by hand.
>>>
>>> Repository managers like Nexus or Archiva does this cleanup, that's
>>> why I wonder if such service could exist in a maven plugin.
>>>
>>> Regards
>>>
This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom
they are addressed. If you have received this e-mail in error please notify the originator of the message. This footer also
confirms that this e-mail message has been scanned for the presence of computer viruses. Any views expressed in this message are
those of the individual sender, except where the sender specifies and with authority, states them to be the views of Iowa Student
Loan.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Plugin / Tool for local repository
Posted by Mohan KR <km...@gmail.com>.
same here, interested in any updates on the plugin from the discussion
below. Don't want to whip out another one
if it already exists.
Thanks,
mohan kr
-----Original Message-----
From: Henri Gomez [mailto:henri.gomez@gmail.com]
Sent: Monday, June 15, 2009 9:32 AM
To: Maven Users List
Subject: Re: Plugin / Tool for local repository
I saw an interested thread on mojo-dev about a local repository purge
plugin.
http://www.nabble.com/local-repository-purge-plugin-td16937047.html
Any one know it status ?
2009/6/15 Henri Gomez <he...@gmail.com>:
> Good stuff but I also needed the various versions of the project to be
removed.
>
>
>
> 2009/6/15 Anders Hammar <an...@hammar.net>:
>>
http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-reposito
ry-mojo.html
>>
>> /Anders
>>
>> On Mon, Jun 15, 2009 at 10:46, Henri Gomez<he...@gmail.com> wrote:
>>> Hi to all,
>>>
>>> I wonder if there is a plugin/tool available to clean a local repository
?
>>>
>>> After some time repository could became huge with many snapshots or
>>> versions (when using ranges) and the only way, for now, is just to
>>> clean up by hand.
>>>
>>> Repository managers like Nexus or Archiva does this cleanup, that's
>>> why I wonder if such service could exist in a maven plugin.
>>>
>>> Regards
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
---------------------------------------------------------------------
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: Plugin / Tool for local repository
Posted by Henri Gomez <he...@gmail.com>.
I saw an interested thread on mojo-dev about a local repository purge plugin.
http://www.nabble.com/local-repository-purge-plugin-td16937047.html
Any one know it status ?
2009/6/15 Henri Gomez <he...@gmail.com>:
> Good stuff but I also needed the various versions of the project to be removed.
>
>
>
> 2009/6/15 Anders Hammar <an...@hammar.net>:
>> http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html
>>
>> /Anders
>>
>> On Mon, Jun 15, 2009 at 10:46, Henri Gomez<he...@gmail.com> wrote:
>>> Hi to all,
>>>
>>> I wonder if there is a plugin/tool available to clean a local repository ?
>>>
>>> After some time repository could became huge with many snapshots or
>>> versions (when using ranges) and the only way, for now, is just to
>>> clean up by hand.
>>>
>>> Repository managers like Nexus or Archiva does this cleanup, that's
>>> why I wonder if such service could exist in a maven plugin.
>>>
>>> Regards
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Plugin / Tool for local repository
Posted by Henri Gomez <he...@gmail.com>.
Good stuff but I also needed the various versions of the project to be removed.
2009/6/15 Anders Hammar <an...@hammar.net>:
> http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html
>
> /Anders
>
> On Mon, Jun 15, 2009 at 10:46, Henri Gomez<he...@gmail.com> wrote:
>> Hi to all,
>>
>> I wonder if there is a plugin/tool available to clean a local repository ?
>>
>> After some time repository could became huge with many snapshots or
>> versions (when using ranges) and the only way, for now, is just to
>> clean up by hand.
>>
>> Repository managers like Nexus or Archiva does this cleanup, that's
>> why I wonder if such service could exist in a maven plugin.
>>
>> Regards
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Plugin / Tool for local repository
Posted by Anders Hammar <an...@hammar.net>.
http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html
/Anders
On Mon, Jun 15, 2009 at 10:46, Henri Gomez<he...@gmail.com> wrote:
> Hi to all,
>
> I wonder if there is a plugin/tool available to clean a local repository ?
>
> After some time repository could became huge with many snapshots or
> versions (when using ranges) and the only way, for now, is just to
> clean up by hand.
>
> Repository managers like Nexus or Archiva does this cleanup, that's
> why I wonder if such service could exist in a maven plugin.
>
> Regards
>
> ---------------------------------------------------------------------
> 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