
最外层父项目 pom 中的 packaging 为 pom,其他module 的pom的 packaging 全部为jar,starter下 pom中添加下面plugin 从而保证打出的jar包可以将所有module都包括进来
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
<executions>
<execution>
<goals>
<!--<goal>build-info</goal>-->
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>

博客介绍了Maven多模块项目的打包配置。最外层父项目pom的packaging为pom,其他module的pom的packaging为jar,在starter下的pom中添加特定plugin,可使打出的jar包包含所有module。
1067

被折叠的 条评论
为什么被折叠?



