<!-- Maven Shade 插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!-- 关键配置 -->
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<!-- 指定 Vert.x 的 Launcher 作为入口 -->
<Main-Class>io.vertx.core.Launcher</Main-Class>
<!-- 指定你的主 Verticle 类 -->
<Main-Verticle>com.logcan.MainVerticle</Main-Verticle>
</manifestEntries>
</transformer>
</transformers>
<!-- 包含所有依赖 -->
<artifactSet>
<includes>
<include>*:*</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>