Maven:如何进行并行构建? [英] Maven: how to do parallel builds?
本文介绍了Maven:如何进行并行构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在多核/多CPU机器上使用maven进行构建时,通常可以并行构建不同的子项目.有办法用Maven做到这一点吗?有这个的插件吗?
When you build with maven on a multicore / multi-CPU machine it would often be possible to build different subprojects in parallel. Is there a way to do this with maven? Is there a plugin for this / whatever?
推荐答案
Maven 3(从beta 1开始)现在支持并行构建作为实验功能.
Maven 3 (as of beta 1) now supports parallel builds as an experimental feature.
例如,
mvn -T 4 clean install # Builds with 4 threads
mvn -T 1C clean install # 1 thread per cpu core
mvn -T 1.5C clean install # 1.5 thread per cpu core
完整的文档可以在Maven Wiki上找到.
Full documentation can be found on the Maven wiki.
https://cwiki.apache.org/confluence/display/MAVEN/Parallel + builds + in + Maven + 3
这篇关于Maven:如何进行并行构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文