`
alexgreenbar
  • 浏览: 88978 次
  • 性别: 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  
有同感,绝对赞同

相关推荐

    Myeclipse+maven+nexus且m2eclipse插件带索引的完美组合

    本文将详细介绍如何构建一个高效且便捷的开发环境,通过Myeclipse、Maven、Nexus以及m2eclipse插件的集成,解决添加依赖无索引、下载速度慢的问题。这个组合可以极大地提升开发效率,避免因网络问题导致的困扰。 ...

    GradleBintray插件能够让你将artifacts推送至Bintray

    这个插件使得开发者可以方便地将他们的构建工件(artifacts)上传到Bintray平台,这是一个广泛使用的软件托管和分发服务。下面我们将深入探讨Gradle Bintray插件的工作原理、配置方法以及其在Java开发中的应用。 ...

    jenkins自动化部署搭建

    在Jenkins作业配置中,增加一个构建后操作,选择“Deploy artifacts to a remote server”,配置对应Maven的部署配置。 通过以上步骤,你已经成功地在CentOS 7上建立了基于Maven和Git的Jenkins自动化部署环境。...

    gradle-pom-plugin:Gradle POM插件

    `gradle-pom-plugin`是连接Gradle和Maven世界的桥梁,它使Gradle项目能够生成符合Maven规范的POM文件,从而与Maven生态无缝对接。通过配置POM信息,发布到Maven仓库,以及从Maven POM导入依赖,这个插件为Gradle项目...

    appfuse2学习日记

    The path to the local repository maven will use to store artifacts. Default: ~/.m2/repository <localRepository>/path/to/local/repo</localRepository>--> <!— 下面的配置文件,其实是用来存放 appfuse ...

    jcenter 远程仓库,整理的文档

    repo = 'maven' name = 'gmsdk' desc = 'A description of the package' websiteUrl = siteUrl vcsUrl = gitUrl licenses = ['Apache-2.0'] labels = ['android', 'aar'] publicDownloadNumbers = true } ...

    elasticsearch学习demo

    <artifactId>maven-compiler-plugin <source>1.8 <target>1.8 </plugin> <elasticsearch.version>5.6.0 <spring-version>5.0.0.RC3 <fastjson-version>1.2.7 <junit-version>4.12 ...

    jcenter-publish:Gradle 插件通过 BinTray 将 Android 库发布到 jCenter

    repo = '你的仓库名' name = '你的包名' websiteUrl = '你的库网站链接' vcsUrl = '你的库Git仓库链接' licenses = ['Apache-2.0'] desc = '你的库描述' publicDownloadNumbers = true // 是否公开下载次数 ...

    sbt-publish-more:将工件发布到多个存储库中

    credentials += Credentials("Repo " + id, "repo-host", "username", "password") } ``` 二、sbt-publish-more的工作原理 `sbt-publish-more`插件扩展了sbt的发布机制,允许用户为每个定义的存储库创建独立的发布...

Global site tag (gtag.js) - Google Analytics