本文介绍了Maven 或 Ivy 用于管理来自 Ant 的依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道从 ant 管理项目依赖项的最佳方式.Maven Ant 任务和 Ivy 的优缺点是什么?

I was wondering about the best way to manage projects dependencies from ant. What are the pros and cons of the Maven Ant task and of Ivy?

推荐答案

由于您想要做的是向现有 Ant 项目添加依赖项管理,这正是 Ivy 的设计目的.依赖管理是 Maven 的重要组成部分,但远非全部.Maven 更像是一个面向项目的工具,除了依赖之外,它还可以做其他几件事.如果您打算迁移到 Maven 并同时使用其他 Maven 功能,那么值得考虑,但如果您仅将其用于剥离 Ant,那就有点多了.

Since what you're wanting to do is add dependency management to an existing Ant project, that's precisely what Ivy's designed to do. Dependency management is a big part of Maven, but far from all of it. Maven is more of a project-oriented tool that does several other things in addition to dependencies. It would be worth considering if you were planning to migrate to Maven and use additional Maven features as well, but it's a bit much if all you'd use it for is to spin off Ant.

您的依赖类型以及您对它们行为方式的期望也会有所不同.在 Maven 中拉取第三方依赖几乎是微不足道的,而 Ivy 擅长重建自己的依赖组件.在任何一种情况下,这些工具都不会提供合适的构建、版本控制和存储库策略,这些仍然取决于您并且需要正确配置.

Your type of dependencies and your expectations for how they behave will also make a difference. Pulling third-party dependencies is almost trivial in Maven, while Ivy excels in rebuilding your own dependent components. In either case, the tools won't provide decent build, versioning, and repository policies, those are still up to you and needed to get the configuration right.

这篇关于Maven 或 Ivy 用于管理来自 Ant 的依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 05:24
查看更多