跨开发人员的共享Maven存储库 [英] Shared Maven Repository across developers

查看:109
本文介绍了跨开发人员的共享Maven存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法避免开发人员下载所有依赖项并将这些依赖项放在共享位置上,以便所有开发人员和每个开发项目的开发人员指向该位置?

Is there any way to avoid developers download all dependencies and have those dependencies located to shared locattion to all the developer and each developer working on project point to that location?

任何人都可以解释一下示例文件和示例吗?

Can anyone explain with sample files and example?

推荐答案

最好是与maven的一个存储库管理器一起使用。设置的主要步骤如下:
- 在内部计算机上安装中央存储库
- 配置中央存储库以代理开发人员所需的存储库
- 修改开发人员maven设置使用内部maven存储库作为所有内容的镜像(有关详细信息,请参阅此处

Best is to go with one of the repository managers for maven. The main steps for the setup will be: - Install a central repository on an internal machine - Configure the central repository to proxy the repositories you need for your developers - Modify the developers maven settings to use the internal maven repository as mirror for everything (see here for details)

有3种知名的存储库管理器可用:

There are 3 well-known repository managers available:

  • Artifactory: http://www.jfrog.com/home/v_artifactory_opensource_overview
  • Apache archiva: http://archiva.apache.org/index.cgi
  • Sonatype Nexus: http://www.sonatype.org/nexus/

我最喜欢Artifactory - 安装和配置花了不到一个小时。现在,如果开发人员向maven项目添加新的依赖项,则工件将从原始远程存储库下载到内部存储库,并且将可用。当下一个开发人员需要存档时,它将从内部存储库下载 - 访问速度会快得多。

I favorite Artifactory - the installation and configuration took less than an hour. Now if a developer adds a new dependency to a maven project, the artifact will be downloaded from the original remote repository to the internal repository and will be made available. When the next developer needs the archive it will be downloaded from the internal repository - the access will be much faster.

这篇关于跨开发人员的共享Maven存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆