Maven项目打包,打入pom文件中依赖
mainClass是指程序入口
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.2.0</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>doBusiness.Frame001</mainClass> </transformer> </transformers> </configuration> </execution> </executions> </plugin>
参考:https://www.jianshu.com/p/7a0e20b30401