Maven增量构建 [英] Maven incremental building

查看:150
本文介绍了Maven增量构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前有一个大型的Maven 2项目,它是许多具有复杂依赖性的单个独立项目的集合,除了一些用于构建的通用父POM之外.最后,我们总是必须将应用程序作为一个整体发布,因此我想将其转换为一个或几个大项目.

We currently have a big Maven 2 project that is rather a collection of many single standalone projects with complicated dependencies, with the exception of some common parent POMs for building. In the end we always have to ship the application as one piece, so I would rather like to convert it to one or a few big projects.

是否有人在如何优化大型项目的持续集成构建方面有经验. Maven或Hudson的增量构建功能好吗?在一个模块中只进行很小的更改时,我宁愿不要总是等待2个小时.

Does anyone have experience in how to optimize continuous integration builds for big projects. Is the incremental build functionality of Maven or Hudson any good? I would prefer not to wait always 2 hours when having made only a small change in one module.

另一方面,可以肯定的是,您始终必须至少重新构建和重新测试已更改模块的所有直接和间接依赖关系.这也是我们目前对Hudson所做的事情,会自动触发所有依赖的作业.

On the other hand, to be sure, you always would have to rebuild and re-test at least all direct and indirect dependencies of a changed module. That is also what we are currently doing with Hudson, triggering automatically all dependent jobs.

为同一个项目拆分成多个构建作业是否会得到回报?我通常不喜欢服务器上的工件,在这些工件上,所有其他生成的东西(如报告,文档等)可能都已过时.

Does a split up into multiple build jobs for the same project pay off? I generally do not like to have artifacts on the server where all the other generated stuff like reports, docs, etc. could possibly be out of date.

感谢您的任何想法.

推荐答案

我强烈建议不要拆分成不同的构建作业.以我的经验,这可能会很快与上游和下游依赖关系失控.增量式建筑非常适合您的需求.如果直接设置依赖关系,则仅会更改发生变化的工件及其依赖关系.

I would highly suggest not to split up into different build jobs. This, in my experience, can get out of hand quickly with upstream and downstream dependencies. Incremental building works great for what you need it for. If the dependencies are set directly only artifacts that change and their dependencies are rebuilt.

如果构建作业是完全独立的应用程序而没有依赖关系或依赖关系很少,我将拆分构建作业(如果是,那么它们不应位于同一反应堆下,因此无法进行增量构建)

I would split up the build jobs though if they are completely separate applications with no or very few dependnecies (if thats true then they shouldn't be under the same reactor and thus the incremental builds would not be possible)

这篇关于Maven增量构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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