开发者

How to build maven parent and select number of modules?

开发者 https://www.devze.com 2023-04-04 09:50 出处:网络
I have a multi-module maven project. To build the parent alone, I run mvn package -N (where -N is \"non-recursive\").

I have a multi-module maven project.

To build the parent alone, I run mvn package -N (where -N is "non-recursive").

To build a few modules, I run mvn package -pl api,servie (where -pl is "projects").

How do I combine these 开发者_StackOverflowtwo in order to build the api, service and the parent?


mvn package -pl api,service --also-make

(where --also-make makes the dependencies as well)


How about mvn package -pl api,service,. ('.' indicating the project in the current directory) or mvn package -pl api,service,:parent (where "parent" is the artifactId of the parent module).

Arguments to -pl can either be the relative path to a directory containing a maven module or a coordinate in the form [groupId]:artifactId of a module in the current project. If no groupId is supplied, the groupId of the pom being built is used.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号