如何跳过多Maven的模块中生命周期阶段 [英] How to skip lifecycle phase in multi maven module

查看:450
本文介绍了如何跳过多Maven的模块中生命周期阶段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Maven多模块项目,该项目叫两个子模块。请注意,这个孩子的模块不使用父标记标记。现在我需要只对一个孩子模块执行部署阶段而不是其他的。可能有人在这样做的最好办法提供任何建议?

I have a maven multi module project which call two sub modules. please note that this child module do not use the parent markup tag. Now I need to have the deploy phase executed only on one child module but not the other one. Could someone provide any advice on the best way of doing this ?

感谢

推荐答案

在本提到的的Maven插件部署,以及在<一个nofollow的>常见问题 href=\"http://stackoverflow.com/questions/3147714/how-to-skip-install-phase-in-maven-build-if-i-already-have-this-version-installed\">this SO 讨论,您应该添加以下你不想部署模块的POM。

As mentioned in this FAQ for maven deploy plugin, as well as in this SO discussion, you should add the following in the pom of the module you do not want to deploy.

        <plugin>
           <artifactId>maven-deploy-plugin</artifactId>
           <version>X.Y</version>
           <configuration>
             <skip>true</skip>
          </configuration>
        </plugin>

这篇关于如何跳过多Maven的模块中生命周期阶段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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