Re: Remove old snapshots under local repository

2014-08-19 Thread Ron Wheeler

On 19/08/2014 1:49 AM, Barrie Treloar wrote:

What's wrong with just blowing away ~/.m2/repository ?

If you have a local Maven Repository Manager it doesn't take very long to
reseed it.
(At least less time in aggregate than thinking of ways to prune snapshot
files in the repository correctly...)



A few days ago, I suggested just blowing away the organization's 
sub-folder under .m2/repository.

A bit more surgical. Would that work?

If you have a corporate repo (and everyone should) it does not take long 
to repopulate your local repo.


Probably a good idea to get rid of the entire local repo every year just 
get rid of old version that you will never need again.

I don't need to carry a 7 year history of log4j on my hard drive.

Ron

--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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



Re: Remove old snapshots under local repository

2014-08-19 Thread Dan Tran
After all consideration.  I use Ron's advice and create a internal plugin
to clean it up.

-D


On Tue, Aug 19, 2014 at 6:06 AM, Ron Wheeler rwhee...@artifact-software.com
 wrote:

 On 19/08/2014 1:49 AM, Barrie Treloar wrote:

 What's wrong with just blowing away ~/.m2/repository ?

 If you have a local Maven Repository Manager it doesn't take very long to
 reseed it.
 (At least less time in aggregate than thinking of ways to prune snapshot
 files in the repository correctly...)


 A few days ago, I suggested just blowing away the organization's
 sub-folder under .m2/repository.
 A bit more surgical. Would that work?

 If you have a corporate repo (and everyone should) it does not take long
 to repopulate your local repo.

 Probably a good idea to get rid of the entire local repo every year just
 get rid of old version that you will never need again.
 I don't need to carry a 7 year history of log4j on my hard drive.


 Ron

 --
 Ron Wheeler
 President
 Artifact Software Inc
 email: rwhee...@artifact-software.com
 skype: ronaldmwheeler
 phone: 866-970-2435, ext 102


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




Re: Remove old snapshots under local repository

2014-08-19 Thread Mark Derricutt
So not using the dependency plugin like I suggested?

On 20 Aug 2014, at 10:14, Dan Tran wrote:

 After all consideration.  I use Ron's advice and create a internal plugin
 to clean it up.

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



Re: Remove old snapshots under local repository

2014-08-19 Thread Dan Tran
the problem here is I have to enter artifactId, am I missing any thing?
specially for a developer who is very clueless about Maven

-D


On Tue, Aug 19, 2014 at 7:09 PM, Mark Derricutt m...@talios.com wrote:

 So not using the dependency plugin like I suggested?

 On 20 Aug 2014, at 10:14, Dan Tran wrote:

  After all consideration.  I use Ron's advice and create a internal plugin
  to clean it up.

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




Re: Remove old snapshots under local repository

2014-08-19 Thread Mark Derricutt
Nope, it's takes the dependencies from your project pom.xml:

   mvn dependency:purge-local-repository -DresolutionFuzziness=artifactId

Mark

On 20 Aug 2014, at 14:11, Dan Tran wrote:

 the problem here is I have to enter artifactId, am I missing any thing?
 specially for a developer who is very clueless about Maven

 -D


 On Tue, Aug 19, 2014 at 7:09 PM, Mark Derricutt m...@talios.com wrote:

 So not using the dependency plugin like I suggested?

 On 20 Aug 2014, at 10:14, Dan Tran wrote:

 After all consideration.  I use Ron's advice and create a internal plugin
 to clean it up.

 -
 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: Remove old snapshots under local repository

2014-08-19 Thread Dan Tran
ah, that works with a project, in my case, i prefer not to have a project


On Tue, Aug 19, 2014 at 8:07 PM, Mark Derricutt m...@talios.com wrote:

 Nope, it's takes the dependencies from your project pom.xml:

mvn dependency:purge-local-repository -DresolutionFuzziness=artifactId

 Mark

 On 20 Aug 2014, at 14:11, Dan Tran wrote:

  the problem here is I have to enter artifactId, am I missing any thing?
  specially for a developer who is very clueless about Maven
 
  -D
 
 
  On Tue, Aug 19, 2014 at 7:09 PM, Mark Derricutt m...@talios.com wrote:
 
  So not using the dependency plugin like I suggested?
 
  On 20 Aug 2014, at 10:14, Dan Tran wrote:
 
  After all consideration.  I use Ron's advice and create a internal
 plugin
  to clean it up.
 
  -
  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: Remove old snapshots under local repository

2014-08-18 Thread Adrien Rivard
Or delete all directories that end with -SNAPSHOT



On Sun, Aug 17, 2014 at 8:18 AM, Dan Tran dant...@gmail.com wrote:

 sounds like a good option.

 Thanks

 -D


 On Sat, Aug 16, 2014 at 11:11 PM, Ron Wheeler 
 rwhee...@artifact-software.com wrote:

  On 17/08/2014 1:50 AM, Dan Tran wrote:
 
  Hi I need to find a way to walk into local repository and remove all old
  snapshots.
 
  This is very helpful for developer to clean up his/her local rep.
 
  how safe it is by blindly remove any file with timestamp format ( ie
  xxx-1.0.0-20140816.071953-49.jar)?
 
  Thanks
 
  -D
 
   Easiest thing to do is to delete the entire organization or project
  branch (com.mycompany.project.*) from the local repo.
 
  This will not likely delete anything of great value or anything that can
  not be easily retrieved from your company repo.
 
 
  Ron
 
  --
  Ron Wheeler
  President
  Artifact Software Inc
  email: rwhee...@artifact-software.com
  skype: ronaldmwheeler
  phone: 866-970-2435, ext 102
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 




-- 
Adrien Rivard


Re: Remove old snapshots under local repository

2014-08-18 Thread Mark Derricutt

I tend to use:

mvn dependency:purge-local-repository

when sitting in a project directory, it'll go thru and delete all the 
SNAPSHOTs and re-resolve.


The only problem with it in the default mode, is that is _only_ deletes 
the `.jar`. files and doesn't rebuild any metadata, so if you're using 
version ranges you're kinda f**ked.


However, I usually use it with the following setting:

mvn dependency:purge-local-repository 
-DresolutionFuzziness=artifactId


which will delete ALL files related to the artifact - all versions, all 
meta data - it doesn't mean there's more to download again but works 
wonderfully.


MaRK

On 18 Aug 2014, at 21:10, Adrien Rivard wrote:


Or delete all directories that end with -SNAPSHOT



On Sun, Aug 17, 2014 at 8:18 AM, Dan Tran dant...@gmail.com wrote:


sounds like a good option.

Thanks

-D


On Sat, Aug 16, 2014 at 11:11 PM, Ron Wheeler 
rwhee...@artifact-software.com wrote:


On 17/08/2014 1:50 AM, Dan Tran wrote:

Hi I need to find a way to walk into local repository and remove 
all old

snapshots.

This is very helpful for developer to clean up his/her local rep.

how safe it is by blindly remove any file with timestamp format ( 
ie

xxx-1.0.0-20140816.071953-49.jar)?

Thanks

-D

Easiest thing to do is to delete the entire organization or project

branch (com.mycompany.project.*) from the local repo.

This will not likely delete anything of great value or anything that 
can

not be easily retrieved from your company repo.


Ron

--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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








--
Adrien Rivard


Re: Remove old snapshots under local repository

2014-08-18 Thread Dan Tran
This would not work, since it still leave all snapshot of timestamp around

-D


On Mon, Aug 18, 2014 at 2:10 AM, Adrien Rivard adrien.riv...@gmail.com
wrote:

 Or delete all directories that end with -SNAPSHOT



 On Sun, Aug 17, 2014 at 8:18 AM, Dan Tran dant...@gmail.com wrote:

  sounds like a good option.
 
  Thanks
 
  -D
 
 
  On Sat, Aug 16, 2014 at 11:11 PM, Ron Wheeler 
  rwhee...@artifact-software.com wrote:
 
   On 17/08/2014 1:50 AM, Dan Tran wrote:
  
   Hi I need to find a way to walk into local repository and remove all
 old
   snapshots.
  
   This is very helpful for developer to clean up his/her local rep.
  
   how safe it is by blindly remove any file with timestamp format ( ie
   xxx-1.0.0-20140816.071953-49.jar)?
  
   Thanks
  
   -D
  
Easiest thing to do is to delete the entire organization or project
   branch (com.mycompany.project.*) from the local repo.
  
   This will not likely delete anything of great value or anything that
 can
   not be easily retrieved from your company repo.
  
  
   Ron
  
   --
   Ron Wheeler
   President
   Artifact Software Inc
   email: rwhee...@artifact-software.com
   skype: ronaldmwheeler
   phone: 866-970-2435, ext 102
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
   For additional commands, e-mail: users-h...@maven.apache.org
  
  
 



 --
 Adrien Rivard



Re: Remove old snapshots under local repository

2014-08-18 Thread Anders Hammar
Sure it would. It's only the files that gets a timestamp; the directories
are still called x.y.z-SNAPSHOT.
However, be adviced that I've run into cases in the wild where the
artifactId would end in -SNAPSHOT and this solution would remove such
directories as well although it's could contain releases (and snapshots).
Such a artifactId naming is not very good and kind of deserves to cause
issues though...

/Anders
On Tue, Aug 19, 2014 at 7:28 AM, Dan Tran dant...@gmail.com wrote:

 This would not work, since it still leave all snapshot of timestamp around

 -D


 On Mon, Aug 18, 2014 at 2:10 AM, Adrien Rivard adrien.riv...@gmail.com
 wrote:

  Or delete all directories that end with -SNAPSHOT
 
 
 
  On Sun, Aug 17, 2014 at 8:18 AM, Dan Tran dant...@gmail.com wrote:
 
   sounds like a good option.
  
   Thanks
  
   -D
  
  
   On Sat, Aug 16, 2014 at 11:11 PM, Ron Wheeler 
   rwhee...@artifact-software.com wrote:
  
On 17/08/2014 1:50 AM, Dan Tran wrote:
   
Hi I need to find a way to walk into local repository and remove all
  old
snapshots.
   
This is very helpful for developer to clean up his/her local rep.
   
how safe it is by blindly remove any file with timestamp format ( ie
xxx-1.0.0-20140816.071953-49.jar)?
   
Thanks
   
-D
   
 Easiest thing to do is to delete the entire organization or project
branch (com.mycompany.project.*) from the local repo.
   
This will not likely delete anything of great value or anything that
  can
not be easily retrieved from your company repo.
   
   
Ron
   
--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102
   
   
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
   
   
  
 
 
 
  --
  Adrien Rivard
 



Re: Remove old snapshots under local repository

2014-08-18 Thread Barrie Treloar
What's wrong with just blowing away ~/.m2/repository ?

If you have a local Maven Repository Manager it doesn't take very long to
reseed it.
(At least less time in aggregate than thinking of ways to prune snapshot
files in the repository correctly...)


Re: Remove old snapshots under local repository

2014-08-17 Thread Ron Wheeler

On 17/08/2014 1:50 AM, Dan Tran wrote:

Hi I need to find a way to walk into local repository and remove all old
snapshots.

This is very helpful for developer to clean up his/her local rep.

how safe it is by blindly remove any file with timestamp format ( ie
xxx-1.0.0-20140816.071953-49.jar)?

Thanks

-D

Easiest thing to do is to delete the entire organization or project 
branch (com.mycompany.project.*) from the local repo.


This will not likely delete anything of great value or anything that can 
not be easily retrieved from your company repo.



Ron

--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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



Re: Remove old snapshots under local repository

2014-08-17 Thread Dan Tran
sounds like a good option.

Thanks

-D


On Sat, Aug 16, 2014 at 11:11 PM, Ron Wheeler 
rwhee...@artifact-software.com wrote:

 On 17/08/2014 1:50 AM, Dan Tran wrote:

 Hi I need to find a way to walk into local repository and remove all old
 snapshots.

 This is very helpful for developer to clean up his/her local rep.

 how safe it is by blindly remove any file with timestamp format ( ie
 xxx-1.0.0-20140816.071953-49.jar)?

 Thanks

 -D

  Easiest thing to do is to delete the entire organization or project
 branch (com.mycompany.project.*) from the local repo.

 This will not likely delete anything of great value or anything that can
 not be easily retrieved from your company repo.


 Ron

 --
 Ron Wheeler
 President
 Artifact Software Inc
 email: rwhee...@artifact-software.com
 skype: ronaldmwheeler
 phone: 866-970-2435, ext 102


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




Remove old snapshots under local repository

2014-08-16 Thread Dan Tran
Hi I need to find a way to walk into local repository and remove all old
snapshots.

This is very helpful for developer to clean up his/her local rep.

how safe it is by blindly remove any file with timestamp format ( ie
xxx-1.0.0-20140816.071953-49.jar)?

Thanks

-D