开发过程中有时需要命令行启动某个工程模块,Maven帮助里可以看下如下选项,用于指定具体的项目模块:
-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
比如如下命令可以在工程根目录运行一个子模块:
mvn -pl :sa-admin spring-boot:run
可以查看当前启用的profiles:
mvn -pl :sa-admin help:active-profiles