论坛首页 综合技术论坛

maven need new plugin to maintenance its artifacts repo

浏览 3996 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-07-24  

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
   发表时间:2007-07-25  
有同感,绝对赞同
0 请登录后投票
   发表时间:2007-07-25  
可项目是分散的,你怎么决定哪些应该保留,哪些应该删除?
0 请登录后投票
   发表时间: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
0 请登录后投票
   发表时间: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...
0 请登录后投票
   发表时间: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
0 请登录后投票
   发表时间: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. :-)
0 请登录后投票
   发表时间: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
0 请登录后投票
   发表时间: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.
0 请登录后投票
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics