`
alexgreenbar
  • 浏览: 85414 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

maven need new plugin to maintenance its artifacts repo

阅读更多

As we know, maven use repository to save project artifacts, but maven doesn’t do a well maintenance job on its repository, e.g. my local maven repository size has increased to 1.7G, but most of old version of artifacts inside my local maven repository won’t use by me forever.

My suggestion is: maven should have a new plugin, use algorithm like LRU, has a target like “repository.maintenance”, if I run command below, maven will cleanup repository based on its history records.

$mvn repository.maintenance
分享到:
评论
8 楼 netment 2007-08-06  
I think it's the local intranet repository's duty(such as artifactory), if the maven cache in your local hard driver grows to big in size , you just choose to delete it.
7 楼 maomaode 2007-08-03  
OK, we can go further, what about generate a small web-app, and basically a report page will be generated, and you have all the links to the local repository, and you have the (delete) at the end of the links...

not a good idea though, too much complex
6 楼 maomaode 2007-08-03  
I got an idea, and the idea actually used in fant,
when you do a 'ant install', you actually register the source basedir into the 'source-repository' (the term i used for fant), it's like a central source db, which maintain the  groupid-artifactid-version to the source basedir relationship, you can do the same in 'mvn install', after that if you run 'mvn maintaince' it will go ask the source-repo, and then load the all the dependencies, finally you just knew which one is redundant. :-)
5 楼 alexgreenbar 2007-08-03  
good question!
- for local repository, you installed maven will record all those used information for you, use a Algorithm like LRU

- for remote repository, it's a little bit of difficult, but some Maven repository software like MavenProxy or Artifactory can do this

at least, we can use that plugin to manage our local repository
4 楼 maomaode 2007-08-03  
Hummm.... most of the problem is caused by the snapshots,and elder jars it's not hard to write such a plugin for maven.

Actuall, it's a good idea, i'll add this to fant, which already take advantage of the maven repository.

But hang on... there's one question, you maybe have dozens of projects, and one depend on commons-io 1.0, one depend on commons-io 2.0, you have 1.0, 2.0, 3.0 in your local maven repository, how are you going to remove the redundant 3.0? the tool you mentioned MUST go through all the projects...
3 楼 alexgreenbar 2007-07-26  
- for local repository, your maven should record those accessing data
- for remote repository, maven repository server like mavenProxy or repositoryfactory should record those accessing data
2 楼 xyz20003 2007-07-25  
可项目是分散的,你怎么决定哪些应该保留,哪些应该删除?
1 楼 yeshucheng 2007-07-25  
有同感,绝对赞同

相关推荐

Global site tag (gtag.js) - Google Analytics