What is Aether

原文:《What is Aether

你是否曾经想过把maven依赖解析机制集成到你的应用程序中,并最终尝试嵌入Plexus和一整个Maven发行版?你是否曾经想过以多线程的方式使用Maven依赖解析机制,却被其中有状态的单例程序弄得很困惑?你是否曾经希望更多地控制Maven计算解析依赖关系图的方式,比如说使用别的策略来解决冲突或者检查一些中间阶段的依赖图?

Did you ever want to integrate Maven’s dependency resolution mechanism into your application and ended up trying to embed Plexus and an entire Maven distribution? Did you ever want to use Maven’s dependency resolution mechanism in a multi-threaded fashion and got burned by the stateful singletons in there? Did you ever want to have a little more control over how Maven calculates the resolved dependency graph, say use another strategy for conflict resolution or inspect some intermediate dependency graph?

Aether就是你要找的答案。它是一个与Maven 构建物仓库协同工作的易于嵌入的Java 类库,使你能够把构建物从远程仓库拉到本地使用,也能把本地构建物发布到远程仓库,以分享给他人。

Well, Aether is the answer. It’s an easily embeddable Java library to work with artifact repositories, enabling you to fetch artifacts from remote repositories for local consumption and to publish local artifacts to remote repositories for sharing with others.

有多种方式传输构建物,描述它们之间的关系和使用它们。Aether的设计对这些方面的定制持开放的态度,允许你添加甚至替换掉已有的东西来适应你的需求。实际上,举个例子,Aether的内核本身并不知道如何与Maven仓库打交道。它是工具无关的,只提供了一些通用的构建物解析或部署框架并把细节(例如仓库格式)留给了扩展。

There are many ways to transfer artifacts, to describe their relationships and to use them. Aether was designed with an open mind towards customization of these aspects, allowing you to augment or even replace stock functionality to fit your needs. In fact, the Aether Core itself doesn’t know how to deal with Maven repositories for instance. It’s tool agnostic and provides some general artifact resolution/deployment framework and leaves details like the repository format to extensions.

在这一点上,来自Apache Maven项目的 maven-aether-provider 可能是最有趣的扩展,因为它很好地支持了Maven仓库。所以如果你正在寻找一种从中央仓库获取并使用构建物的方式,Aether结合Maven Aether Provider 会是你最好的选择。以这种方式使用Aether不但能减轻处理构建物的工作量,而且能保证与其他操作Maven仓库的工具的互操作性。

At this point, the maven-aether-provider from the Apache Maven project is probably the most interesting extension as it brings support for, well Maven repositories. So if you’re looking for a way to consume artifacts from the Central Repository, Aether in combination with the Maven Aether Provider is your best bet. Usage of Aether in this way does not only ease your work when dealing with artifacts but also ensures interoperability with other tools that work with Maven repositories.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值