How to maven build child projects?

2019-04-27 03:24发布

问题:

I have aggregation where I link a parent Pom using the <modules> element, and then I have the <parent> specified in each child 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

回答1:

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

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