cd facade && mvn install 编译失败
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.4.RELEASE:repackage (default) on project facade: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:2.1.4.RELEASE:repackage failed: Unable to find main class -> [Help 1]
3.预期结果与实际有什么差异?
BUG描述
清晰的BUG描述,有助于判断问题,请按如下步骤
1.说明操作的背景,使用了哪个模块什么功能?
facade
模块继承了cloud
模块的spring-boot-maven-plugin
插件facade
模块没有main方法所以该模块编译失败2.怎么输入或操作的得到了什么结果?
cd facade && mvn install
编译失败[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.4.RELEASE:repackage (default) on project facade: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:2.1.4.RELEASE:repackage failed: Unable to find main class -> [Help 1]
3.预期结果与实际有什么差异?理论应该编译成功
截图
环境 win10+jdk8,IDEA2021.3
排除
spring-boot-maven-plugin
插件并使用maven-compiler-plugin
插件即可编译成功facade
的pom.xml
添加以下代码即可