对于一个聚合模块,在deploy时需要跳过(不处理)特定模块
例如:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.superz</groupId>
<artifactId>xxx-parent</artifactId>
<name>xxx-parent</name>
<version>1.0.0</version>
<packaging>pom</packaging>
<modules>
<module>xxx-api</module>
<module>xxx-services</module>
<module>xxx-server</module>
</modules>
</project>
参数 | 解释 | 说明 |
---|---|---|
-pl,--projects <arg> | Comma-delimited list of specified reactor projects to build instead of all projects. A project can be specified by [groupId]:artifactId or by its relative path. | 构建制定的模块,模块间用逗号分隔 |
-am,--also-make | If project list is specified, also build projects required by the list | 同时构建所列模块的依赖模块 |
1、打xxx-api包:
mvn deploy -pl xxx-api
2、打xxx-parent、xxx-api包:
mvn deploy -pl xxx-api -am
or
mvn deploy -pl !xxx-services,!xxx-server