maven项目模块化,父模块中有N个子模块,单独打子模块的包

首先感谢下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  构建制定的模块,模块间用逗号分隔;
-rf -resume-from  从指定的模块恢复反应堆。
看英文的更助于理解:

-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 
    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 
    Resume reactor from specified project

你可能感兴趣的:(maven,父子模块)