如何构建子项目? [英] How to maven build child projects?

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

问题描述

我有聚合,我使用<modules>元素链接父Pom,然后在每个子pom中指定了<parent>.

I have aggregation where I link a parent Pom using the <modules> element, and then I have the <parent> specified in each child pom.

有没有一种方法可以仅从父pom构建子模块的子集...即

Is there a way I can build only a subset of the child modules from the parent pom... i.e.

cd parent-dir
mvn install subproj1 subproj2

推荐答案

您可以像这样运行Maven:mvn install -pl subproj1,subproj2

You can run Maven like this: mvn install -pl subproj1,subproj2

PS:另一个可以尝试的不错的Maven命令:mvn -?

PS: another good Maven command to try: mvn -?

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

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