使用 maven-shade-plugin 插件实现多模块项目开发,合并 class 打包成一个jar 包
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createSourcesJar>true</createSourcesJar>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<artifactSet>
<includes>
<include>oo.xxx:xxx-xxxxx-core/include>
<include>oo.xxx:xxx-xxxxx-common/include>
<include>oo.xxx:xxx-xxxxx-config/include>
</includes>
</artifactSet>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/xxxxx
</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>