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...)

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

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:

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

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

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

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:

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

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

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

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)?

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