为什么选择 Buckminster 而不是 Maven?
我已经使用 Maven 几个月了,我对它的工作方式非常满意 从概念上和实践上。
我还广泛地研究了 Buckminster (但尚未运行示例)来尝试计算知道它是什么 以及比较如何。 文档很差。 例如,他们使用“构建自动化”和“部署”等术语,但我还没有看到任何有关部署的信息。 分阶段迁移是另一个暗示但未讨论的话题。
Maven 和 Buckminster 都使您能够指定依赖项并通常管理构建、测试和可能的部署过程。
它们都具有 Eclipse 集成,并且都应该(仅使用 Maven)简化基于 Eclipse 的项目及其依赖项的设置和共享。
我可以看到的主要区别是:
依赖关系:
- Buckminster 除了能够引用 Maven 存储库的依赖项之外,还可以指定源存储库及其自己类型的存储库中的依赖项。
- Buckminster 可以将依赖项分组到虚拟发行版中,并且还具有平台感知能力。 在 Maven 中,通过引用其他依赖项并对它们进行分组的 pom,软件的分组显然是可能的。
构建
- Maven 使用基于布局的隐式构建系统。 创建默认项目、将内容放在预期的位置并使用 Maven 构建、测试和创建 jar 非常容易。 同时,含蓄也可能会受到限制。 您必须接受 Maven 的工作方式。
- Buckminster - 我不清楚 Buckminster 如何决定构建什么以及如何构建它。 看起来这将与 Eclipse 过程保持一致,以实现相同的目的。 Buckminster 还允许使用 ant,但尚不清楚这是否是一项要求。 至少,生命周期的好坏定义较少(未?),从而提供了更大的灵活性。
- 这两种工具都允许无头构建,尽管巴克明斯特可能会带来更多的负担。
插件
- Maven 拥有一套非常广泛的插件,适用于许多不同类型的自动化生命周期的所有阶段,从代码生成到运行嵌入式服务进行测试。
- Buckminster 似乎没有相同的插件概念。 有读者,有演员,但他们扮演的角色似乎不是同一个。 Buckminster 应该能够访问 ant 可用的大量插件。 目前尚不清楚 ant 操作如何与巴克明斯特进程的其余部分无缝集成(这也是 Maven ant 插件的一个问题)。
部署
- Maven 有许多插件,用于生成软件分发(程序集)并移动它们(货车)。 巴克明斯特是否从 Ant 那里得到了这一切?
复杂性
- Buckminster 的不同模式可能非常复杂,在 CPEC、RMAP、MSPEC 等之间。
- Maven 在配置方面稍微简单一些,尽管大型多模块项目可能会变得复杂。 Maven 还具有原型,可以轻松创建新项目。
文档
- 他们都很糟糕。 ;-)
- Buckminster 在文档方面非常肤浅。 没有足够的示例。
- Maven 插件的文档往往很差,因此很难让它们正确运行。
从我的角度来看,我想用 Buckminster 做的大部分事情都可以用 Maven 来做。 版本控制的“具体化”是一个优点,但组织内的开发人员除了提供固定版本之外,还可以将 Maven 快照发布到存储库以相互共享。
Maven 生命周期的限制似乎确实更加灵活和自由(曾经想要添加另一个阶段,比如清理后测试?必须等待他们在核心中完成)。
我缺少什么? Buckminster 中是否有一些重要的功能值得提高复杂性?
上面是否有任何非常不准确的陈述(假设我不是 Buckminster 用户,而只是中低级别的 Maven 用户)?
I've been using Maven for several months and I am pretty comfortable with how it works
conceptually and in practice.
I have also looked at Buckminster quite extensively (but have not gotten to running samples yet) to try and figure out what it is
and how it compares. The documentation is poor. For instance, they use terminology like Build Automate and Deploy, but I have yet to see anything about deployment. Staged-migration is another hinted-at but un-discussed topic.
Both Maven and Buckminster give you the ability to specify dependencies and generally manage the build, test and possibly deploy processes.
They both have eclipse integration and should both (having only used Maven) trivialize the setup and sharing of eclipse based projects and their dependencies.
The major differences that I can see are:
Dependencies:
- Buckminster can specify dependencies living in source repositories and it's own type of repository in addition to being able to reference Maven repositories for dependencies.
- Buckminster can group dependencies into virtual distros and is also platform aware. The grouping of software certainly seems possible in Maven with poms that reference other dependecies and group them.
Build
- Maven uses an implicit build system based on layout. It is very easy to create a default project, put things where they are expected to be and have maven build, test and create jars. At the same time, being implicit can also be constricting. You have to live with how Maven does things.
- Buckminster - It is not clear to me how Buckminster decides what to build and how to build it. It would seem that this would align with the eclipse process for doing the same. Buckminster also allows the use of ant, but it is not clear if this is a requirement. At the very least, the lifecycle is less (un?) defined for good or bad, allowing more flexibility.
- Both tools allow for headless builds, although buckminster may carry a bit more baggage along with it.
Plugins
- Maven has a very extensive set of plugins for all phases of the lifecycle for many different kinds of automation, from code generation to running embedded services for testing.
- Buckminster does not appear to have the same concept of plugins. There are readers and actors, but they do not seem to play the same role. Buckminster should have access to the extensive set of plugins available for ant. It is not clear how well ant actions can be seamlessly integrated with the rest of Buckminster processes (this is also an issue for the maven ant plugin).
Deployment
- Maven has a number of plugins for generating distributions of software (assemblies) and moving them around (wagons). Does Buckminster get all of this from Ant?
Complexity
- The different schemas for Buckminster can be quite complex, between CPECs RMAPs MSPECs, etc.
- Maven is somewhat simpler configuration-wise, although it can get complex with large and multi-module projects. Maven also has Archetypes for easy creation of new projects.
Documentation
- They are both bad. ;-)
- Buckminster is very shallow, documentation-wise. Not enough examples are available.
- Maven plugins tend to have very poor documentation, making it difficult to get them running correctly.
From my perspective, most of what I would want to do with Buckminster I can do with Maven. "Materializing" from version control is a plus, but developers within an organization can publish maven snapshots to a repository to share with each other, in addition to just providing fixed versions.
There does seem to be more flexibility and freedom from the strictures of the Maven lifecycle (ever wanted to add another phase, like post-test for cleanup? Gotta wait for them to do it in the core).
What am I missing? Is there some major amount of functionality in Buckminster that is worth the step up in complexity?
Are there any wildly innacurate statements above (given that I am not a Buckminster user and only a low-mid level Maven user)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
一些澄清。
巴克明斯特没有自己的存储库类型。 它有一个发现机制,可以将现有的元数据(例如 Maven POM)转换为 Buckminster 可以理解的模型。 如果无法以任何其他方式导出此元数据,则可以将其作为 XML 文件逐字添加。
Buckminster 决定构建什么,就像 Eclipse IDE 一样。 除此之外,它还从已知工件(例如清单、build.properties、plugin.xml 等)中提取信息,并将其转换为模型中可以使用 Buckminster Perform 命令显式触发的操作。
我一点也不相信巴克明斯特为无头构建带来了更多包袱。 事实上,我认为相反的情况更为常见。 在空机器上使用 Maven 进行构建通常会从下载大量组件开始,即使手头的任务很微不足道。
Buckminster 基于 OSGi 并使用 Eclipse 扩展点进行扩展。 使用此机制可以添加新类型的存储库、新类型的操作、新的发现机制等。
最低的 Buckminster 配置仅需要一个 CQUERY 和一个 RMAP。 有了它们,就可以构建一个任意大小的完整 p2 更新站点,并使用 pack200 进行签名和处理。 无需将文件添加到任何功能和捆绑包中。 没有什么需要“巴克敏斯特化”。 所以我不确定我是否同意 Maven 的配置更简单。
除了 Roland 和 Zoltán 已经提到的好处之外,我想补充一点,由于巴克敏斯特构建是真正的工作区构建,它将利用 .project 文件中声明的所有构建器。 以下是一些示例:
I'm sure that Maven has correspondence for a majority of them. The point with Buckminster is that you don't need to maintain an extra build system. What works in the IDE workspace, also works headlessly.
Some clarifications.
Buckminster does not have a repository type of its own. It has a discovery mechanism that translates existing meta-data such as a Maven POM into a model that can be understood by Buckminster. This meta-data can be added verbatim as an XML file if it cannot be derived in any other way.
Buckminster decides what to build the same way the Eclipse IDE does. In addition to that it extracts information from known artifacts such as the manifest, build.properties, plugin.xml etc. and translates it into actions in the model that can be explicitly triggered using the Buckminster perform command.
I'm not at all convinced that Buckminster carries more baggage for headless builds. In fact, I think the opposite is more common. Building with Maven on an empty machine often starts with a download of a very large number of components even if the task at hand is trivial.
Buckminster is based on OSGi and extended using Eclipse Extension points. It is possible to add new types of repositories, new types of actions, new discovery mechanisms, and more using this mechanism.
A minimum Buckminster configuration only needs one CQUERY and an RMAP. With them, it is possible to build a full p2 update site of arbitrary size that is signed and processed with pack200. No files needs to be added to any of the features and bundles. Nothing needs to be "Buckminsterized". So I'm not sure I agree that Maven is simpler to configure.
Aside from the benefits already mentioned by Roland and Zoltán, I'd like to add that since the buckminster build is a true workspace build, it will leverage all builders that have been declared in the .project file. Here are some examples:
I'm sure that Maven has correspondence for a majority of them. The point with Buckminster is that you don't need to maintain an extra build system. What works in the IDE workspace, also works headlessly.
实际上,您可以明确指定将内容放在 Maven 中的位置。 默认位置就是默认位置,很容易覆盖,尽管很少有充分的理由。
我认为 Maven 倾向于遵循明智的默认值的哲学,而这些默认值很容易被覆盖。
Maven 的真正优势在于其对依赖关系的管理,这在具有多个子项目的复杂项目中往往表现得尤其出色。 定义子项目的层次结构并使其正常工作非常容易。
不能不同意这一点!
Actually, you can explicitly specify where you put things in Maven. The default locations are just that, defaults, easy to override, though there's rarely a good reason to.
I think Maven tends to follow the philosophy of sensible defaults which are easily overrode.
Maven's real strength is in its management of dependencies and this tends to shine particularly well in complex projects with multiple subprojects. It's pretty easy to define a hierarchy of subprojects and have it just work.
Can't disagree with that!
巴克明斯特下载页面提供了 PDF 格式的巴克明斯特书籍 - 超过 250 页的文档,包括介绍和详细的参考文档。
从这里下载: http://www .eclipse.org/downloads/download.php?file=/tools/buckminster/doc/BuckyBook.pdf
There is a Buckminster Book in PDF available from the Buckminster Download page - more than 250 pages of documentation and includes both introduction and detailed reference documentation.
Download it from here: http://www.eclipse.org/downloads/download.php?file=/tools/buckminster/doc/BuckyBook.pdf
使用 Buckminster 的最大优势是在编译 OSGi 包或 Eclipse 插件时,因为它可以重用 PDE 构建基础架构,该基础架构可以处理 manifest.mf/plugin.xml 文件中已存在的各种版本控制信息。 使用 Maven 时,必须复制此信息(AFAIK)。 如果您不开发 Eclipse 插件,并且已经熟悉 Maven,那么 Buckminster 将不会提供任何真正的优势,特别是考虑到陡峭的学习曲线。 另一方面,对于构建 Eclipse 插件,它提供了更好的开箱即用支持。
您可以通过编写新的读取器(从其他位置获取源代码)或新的参与者(提供构建步骤 - 这些参与者可以重用 Maven 或 Ant,从而提供额外的功能)来扩展 Buckminster。
The biggest advantage of using Buckminster is when compiling OSGi bundles or Eclipse plug-ins, because it can reuse the PDE build infrastructure, that handles all kinds of versioning information already present in the manifest.mf/plugin.xml files. When using Maven, this information has to be duplicated (AFAIK). If you don't develop Eclipse plug-ins, and are already familiar with Maven, then Buckminster will offer no real advantage, especially considering the steep learning curve. On the other hand for building Eclipse plug-ins it offers better ot-of-the-box support.
You can extend Buckminster by writing new readers (to obtain source from other locations) or new actors (that provide build steps - these actors can reuse Maven or Ant, thus providing extra functionality).
我想知道为什么没有人提到第谷。 Tycho 已被提议作为 Eclipse 项目,现在位于 孵化阶段。
我试图与巴克明斯特相处,但现在我要看看第谷。 这有以下原因:
目前我还没有使用第谷的经验,但它看起来很有希望。
I wonder why nobody mentioned Tycho. Tycho has been proposed as Eclipse Project and now in Incubating Phase.
I tried to get along with Buckminster but I will now have a look at Tycho. This has the following reasons:
I have no experience at the moment with Tycho, but it seems promising.
简而言之,我对 Buckminster 的理解(极其有限)是,它是一个用于在团队成员之间对一组项目进行版本控制和共享 Eclipse 项目配置的系统。 它似乎与 Maven 重叠,因为它管理依赖项,但我认为这些是 Eclipse 项目级别依赖项,而不是 java 依赖项。
我个人不想将我的构建过程与 Eclipse 或任何其他 IDE 联系起来。 能够从命令行工具执行完整构建而不需要 IDE 或其他 GUI 工具有很多好处。
免费的 O'Reilly 书籍 Maven:权威指南 写得非常出色并真正填补了 Maven 文档的空白。
My (extremely limited) understanding of Buckminster in a nutshell is that it is a system for versioning and sharing Eclipse project configurations for a set of projects among team members. It does seem to overlap with Maven in that it manages dependencies, but I think these are Eclipse project level dependencies and not java dependencies.
I would personally not want to tie my build process to Eclipse or any other IDE. There are a lot of benefits to being able to perform a full build from a command line tool without the need for an IDE or some other GUI tool.
The free O'Reilly book Maven: The Definitive Guide is superbly written and really fills in the Maven documentation gap.
由于缺乏巴克敏斯特文档,我创建了一个使用 Buckminster/Hudson 构建产品的示例。 这可能有助于入门,也适用于Jenkins。
http://flaviodonze.blogspot.ch/2010/03/building-products -with.html
Due to lack of buckminster documentation I created an example of a Building Products with Buckminster/Hudson. This may help to get started, also works with Jenkins.
http://flaviodonze.blogspot.ch/2010/03/building-products-with.html