本文介绍了执行特定的Maven阶段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以执行Maven构建中的特定阶段.例如,如果我只想运行那些在集成前阶段执行的插件,那么Maven是否提供了一种方法来做到这一点?
Is there any way to execute a specific phase in a maven build. For example, if I only want to run those plug-ins that execute in the pre-integration-phase, does Maven provide a means to do that?
e.g.
mvn pre-integration-phase
推荐答案
您不能调用生命周期阶段本身,但是可以调用绑定到生命周期阶段的插件的目标. /p>
You can't call the life-cycle-phase itself but you can call the goals of the plugins which are bound to the life-cycle-phases.
mvn compile:testCompile
mvn failsafe:integration-test
但是通常不需要这个...
but usually this shouldn't be needed...
这篇关于执行特定的Maven阶段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!