<build>
<plugins>
<!-- 使用maven-assembly-plugin插件打包 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<!-- 配置入口main方法类所在路径 -->
<mainClass>com.wdh.App</mainClass>
</manifest>
</archive>
<!-- 把依赖都打进去 -->
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>标签:文件,java,jar,maven,assembly,打包 From: https://www.cnblogs.com/wangdonghua/p/17166063.html
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>