首先感谢下Beyond_奈何,解决问题的博客地址 https://blog.51cto.com/wangguangshuo/2419823,
pl指定要打包的子项目,am是当前项目依赖的模块项目也打包
mvn clean install -T 1C -Dmaven.test.skip=true -Dmaven.compile.fork=true -U -pl 子项目名称 -am (am打入相关依赖包)
多模块工程的打包命令参考:
-am --also-make 同时构建所列模块的依赖模块;
-amd -also-make-dependents 同时构建依赖于所列模块的模块;
-pl --projects <arg> 构建制定的模块,模块间用逗号分隔;
-rf -resume-from <arg> 从指定的模块恢复反应堆。
看英文的更助于理解:
-am,--also-make
If project list is specified, also build projects required by the list
-amd,--also-make-dependents
If project list is specified, also build projects that depend on projects on the list
-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.
-rf,--resume-from <arg>
Resume reactor from specified project