出错是因为没有找到入口类main()
修改pom.xml文件夹
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>cn.urbanwall.start.startThread</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>

本文介绍了解决Maven打包时找不到入口类main()的问题,通过修改pom.xml文件中maven-shade-plugin插件配置,指定正确的主类路径,从而确保应用程序能够正确打包并运行。

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



