需要演示材料来说服客户使用 Maven

发布于 2024-09-26 16:45:28 字数 574 浏览 8 评论 0原文

我的客户需要一个更有条理的清单,其中包含其项目生产中使用的所有第三方库(例如 JAR 文件)。我参与了他们的许多基于 Java 的项目。他们的库存在过去并没有得到一致的维护,现在是时候考虑当前正在使用的所有库(有很多!)并强制执行将新库引入构建环境的结构化过程。

我尝试在构建过程中提出使用 Maven 和 Artifactory 的想法,以利用这些工具管理二进制库存储库和处理传递库依赖项的能力。客户拒绝这个建议,因为他们认为这会给他们带来更多的工作来维护 Artifactory 服务器和学习 Maven 的基础知识。

目前,他们的Java项目都是使用Ant脚本构建的。传递依赖很大程度上是通过试错来管理的。当前使用的库的清单是手动维护的,二进制文件存储在 Subversion 存储库中。客户认识到这需要改进,但当前的改进建议涉及更多临时的“手动管理”方法。

我想让客户相信,Maven 和 Artifactory 的组合是满足其 Java 库管理需求的可行的现成解决方案。 材料为我的客户创建有关 Maven 和 Artifactory 的功能和优势的演示文稿吗?

任何人都可以指导我查阅文献/材料,我可以使用这些文献/ 。

My customer needs a more organized inventory of all 3rd-party libraries (such as JAR files) that are used in production for their projects. I am involved with a number of their Java-based projects. Their inventory has not been consistently maintained in the past and the time has come to account for all the libraries that are currently being used (there are quite a few!) and to enforce a structured process for introducing new libraries into the build environment.

I have tried pitching the idea of using Maven and Artifactory in their build process to leverage those tools' ability to manage a repository of binary libraries and handle transitive library dependencies. The customer is resistent to the suggestion because they think it will create more work for them to maintain an Artifactory server and learn the basics of Maven.

Currently, their Java projects are all built using Ant scripts. Transitive dependencies are largely managed by trial-and-error. The inventory of libraries currently in use is maintained by hand and the binaries are stored in a Subversion repository. The customer recognizes that this needs to be improved, but the current suggestions for improvement involve more ad-hoc "manage it by hand" approaches.

I want to convince the customer that a combination of Maven and Artifactory is a viable off-the-shelf solution for their Java library management needs. Can anyone direct me to literature/materials that I can use to create a presentation for my customer on the features and strengths of Maven and Artifactory?

Any other arguments/suggestions/etc that would assist me in this would also be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

红墙和绿瓦 2024-10-03 16:45:28

我想让客户相信,Maven 和 Artifactory 的组合是满足其 Java 库管理需求的可行的现成解决方案。

正如评论中所指出的,您的客户不一定需要完全采用 Maven 才能从依赖管理中受益,您可以调整现有的 ant 脚本以使用 Maven Ant 任务 或 Ivy。这可能不那么可怕,并且已经消除了一些痛苦。

关于Maven管理依赖关系的方式,我简单解释一下:

  • 工件是通过坐标(groupId、artifactId、version)来标识的。
  • 这允许使用标准化目录结构(存储库)来存储它们
  • 。依赖关系不仅仅是一个 JAR:它是一个带有 POM 的 JAR,可以实现传递依赖关系解析等功能。

这种依赖管理解决方案的好处是:

  • 不会出现依赖关系,它们是唯一标识的(不再有“那是什么版本?”综合症)
  • VCS 中不再有二进制数据(更快的签出,更少的空间)
  • 更容易重用工件项目之间(不再通过电子邮件发送 jar)
  • 通过传递依赖解析更轻松地管理

并且因为您不想依赖公共存储库,因为您需要存储自己的工件,所以您需要一个企业存储库。我个人的选择是 Nexus:

  • 因为它是基于文件的(与 Artifactory 不同,我不想将我的工件放入数据库中)
  • 因为它易于安装/使用
  • ,因为它易于管理

这里有一些关于 Nexus 的资源(抱歉,我只是不使用 Artifactory):

为了以防万一,这里有一些关于 Maven 的演示材料:

I want to convince the customer that a combination of Maven and Artifactory is a viable off-the-shelf solution for their Java library management needs.

As pointed out in a comment, your customer doesn't necessarily need to fully adopt Maven to benefit from dependency management, you could adapt the existing ant scripts to use the Maven Ant tasks or Ivy. This might be less scary and already remove some pain.

Regarding the way Maven manages dependencies, I would simply explain that:

  • An artifact is identified by coordinates (groupId, artifactId, version).
  • This allows to store store them using a standardized directory structure (a repository)
  • A dependency is more that a JAR: it's a JAR with a POM which enables things like transitive dependencies resolution.

And the benefits of such a dependency management solution are:

  • no mess with dependencies, they are uniquely identified (no more "what version is that?" syndrom)
  • no more binary data in the VCS (faster checkout, less space)
  • easier reuse of artifacts between projects (no more jars sent by email)
  • easier management with transitive dependency resolution

And because you don't want to rely on public repositories, because you need to store your own artifacts, you need an enterprise repository. My personal choice would be Nexus:

  • because it's file based (unlike Artifactory, and I don't want to put my artifacts in a database)
  • because it's simple to install/use
  • because it's easy to administrate

Here are some resources about Nexus (sorry, I just don't use Artifactory):

And just in case, here are some presentation material about Maven:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文