maven指定打包的module

阅读更多

 

 

Use the Maven advanced reactor options, more specifically:

-pl,--projects
        Build specified reactor projects instead of all projects
-am,--also-make
        If project list is specified, also build projects required by the list

So just cd into the parent P directory and run:

mvn install -pl B -am

And this will build B and the modules required by B.

Note that you need to use a colon if you are referencing an artifactId which differs from the directory name:

mvn install -pl :B -am

As described here: https://stackoverflow.com/a/26439938/480894

 

你可能感兴趣的:(maven指定打包的module)