RE: Plugin / Tool for local repository

2009-06-16 Thread Tim Andersen
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@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.go...@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 henri.go...@gmail.com:
 Good stuff but I also needed the various versions of the project to be
removed.



 2009/6/15 Anders Hammar and...@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 Gomezhenri.go...@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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Plugin / Tool for local repository

2009-06-16 Thread Wendy Smoak
On Mon, Jun 15, 2009 at 11:38 AM, Mohan KRkmoh@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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Plugin / Tool for local repository

2009-06-15 Thread Henri Gomez
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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Plugin / Tool for local repository

2009-06-15 Thread Anders Hammar
http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html

/Anders

On Mon, Jun 15, 2009 at 10:46, Henri Gomezhenri.go...@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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



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



Re: Plugin / Tool for local repository

2009-06-15 Thread Henri Gomez
Good stuff but I also needed the various versions of the project to be removed.



2009/6/15 Anders Hammar and...@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 Gomezhenri.go...@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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



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



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



Re: Plugin / Tool for local repository

2009-06-15 Thread Henri Gomez
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 henri.go...@gmail.com:
 Good stuff but I also needed the various versions of the project to be 
 removed.



 2009/6/15 Anders Hammar and...@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 Gomezhenri.go...@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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



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




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



RE: Plugin / Tool for local repository

2009-06-15 Thread Mohan KR
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.go...@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 henri.go...@gmail.com:
 Good stuff but I also needed the various versions of the project to be
removed.



 2009/6/15 Anders Hammar and...@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 Gomezhenri.go...@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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



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




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


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