mvn -pl ${module_name} -am

428 阅读1分钟

需求:

从github上面下载下来的项目,如果只想打包某一个模块。

eg.

mvn -DskipTests clean package -pl sentinel-dashboard -am

-pl --projects Build specified reactor projects instead of all projects
选项后可跟随{groupId}:{artifactId}或者所选模块的相对路径(多个模块以逗号分隔)

-am --also-make If project list is specified, also build projects required by the list
表示同时处理选定模块所依赖的模块,譬如A模块依赖B模块,在处理A模块的同时处理B模块

-amd --also-make-dependents If project list is specified, also build projects that depend on projects on the list
表示同时处理依赖选定模块的模块,譬如 A模块依赖B模块,在处理B模块的同时处理A模块

-N --Non-recursive Build projects without recursive
表示不递归子模块

-rf --resume-from Resume reactor from specified project
表示从指定模块开始继续处理