300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 【异常】Maven构建报错 repackage failed: Unable to find a single main class from the following candidates

【异常】Maven构建报错 repackage failed: Unable to find a single main class from the following candidates

时间:2020-10-14 04:39:51

相关推荐

【异常】Maven构建报错 repackage failed: Unable to find a single main class from the following candidates

一、报错内容

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.11:repackage (repackage) on project analyze: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.6.11:repackage failed: Unable to find a single main class from the following candidates [com.xxx.analyze.LuckyLogAnalyzeApplication, com.xxx.analyze.consumer.FlinkESTest]

二、报错说明

因为LuckyLogAnalyzeApplication 和 FlinkESTest两个类中都有main方法,Maven找到了多个,所以在执行mave install的时候,报了上面的错误。

三、报错解决

直接删掉其中一个类,问题解决!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。