问题
maven 打包时报警告:JAR will be empty - no content was marked for inclusion! 或者报错: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.4:repackage
解决
maven 项目打包默认的资源路径是 src/main/java,当pom.xml中资源路径没有明确指定时,则按照默认路径打包
指定项目代码路径,修改pom.xml
<build>
<sourceDirectory>你的资源路径(默认是:src/main/java)</sourceDirectory>
</build>
重新 mvn package,则target文件目录生成classes,jar包启动成功