maven打包报错failed: Unable to find a single main class from the following candidates []
报错
maven打包报错failed: Unable to find a single main class from the following candidates [com.zjq.xxxApplication,com.zjq.xxxUtil]
报错意思是:无法从多个类中找到唯一一个启动类。
解决办法
如果当前工程为启动工程,可以在pom文件的打包插件中按照如下配置指定启动的application路径,具体如下:
<plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><mainClass>com.zjq.xxxApplication</mainClass></configuration></plugin>
</plugins>
要是父子工程中,子工程比如common工程只作为依赖包,没有作为springboot的application启动时,以下打包插件不配置到顶级pom及common的pom中
<plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
maven打包报错failed: Unable to find a single main class from the following candidates []相关推荐
- maven打包报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:cle
问题记录: maven打包报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:cle 解决办法: 这个 ...
- 【异常】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 (r ...
- maven打包报错 Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.0.2:jar
Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.0.2:jar (default-jar) on project ...
- maven打包报错Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.2.RELEASE:repa
我的是版本冲突.可以试试降低SpringBoot的版本,版本之间的依赖关系可以参照官网
- 异常处理(六)--------SpringBoot+Maven项目运行异常:Unable to find a single main class from the following candidat
异常详情 Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.4.2.RELEASE:run (def ...
- SpringBoot学习之一 Unable to find a single main class from the following candidates
在启动SpringBoot项目是报错 Unable to find a single main class from the following candidates [boot.myboot.Sam ...
- maven打包报错You have to use a classifier to attach supplemental artifacts to the project instead of rep
maven打包报错You have to use a classifier to attach supplemental artifacts to the project instead of rep ...
- maven 打包报错 surefire-reports for the individual test results.
Eclipse Maven打包报错 [ERROR] [ERROR] Please refer to D:\File\workspace\izh-common-util\target\surefire- ...
- maven打包报错找不到符号,由于找不到类中方法的解决思路
maven打包报错找不到符号,若pom文件引用正常,报错的类有修改能正常启动执行程序,很有可能因为该类属于公共工具类,在外层目录,通过pom引用的,修改后工具类后,打包时没有将其重新打包,导致该出引用 ...
- pyinstaller打包报错 Failed to execute script ‘xxx‘ due to unhandled exception:input():lost sys.stdin
pyinstaller打包报错 Failed to execute script 'xxx' due to unhandled exception:input():lost sys.stdin pyi ...
最新文章
- IDC公布2017年亚太地区数据中心10大预测
- oracle网络公开课《存储技术》课件和视频共享下载
- SQLite API
- 神策数据赋能物流服务行业数字化转型
- 【DevOps】为什么我们永远疲于奔命?
- ORACLE TDE 透明数据加密技术
- 在Java中将时间单位转换为持续时间
- 2020年平均工资出炉!这个行业最高
- 考勤系统(源代码+论文+答辩PPT+指导书)
- [译] 或许你并不需要 Rust 和 WASM 来提升 JS 的执行效率 — 第二部分
- 阶段2 JavaWeb+黑马旅游网_15-Maven基础_第5节 使用骨架创建maven的java工程_17maven工程运行环境修改...
- 蓝桥杯 算法提高 全排列 next_pertumutation
- 汽车功能安全标准“ISO 26262”导入实践(上)
- 亲测比较好用的各类软件
- sdnu oj 1357.Text Reverse 字符串
- 设计模式-->结构型模式-->代理模式
- MPN (Learning Normal Dynamics in Videos with Meta Prototype Network)代码阅读
- 用Python自动生成数据日报!
- python为什么numpy找不到_python找不到numpy
- 窄线宽半导体激光器的研究进展
热门文章
- 从零开始玩PT-新人指南
- IDC发布最新中国AI云服务市场报告,百度智能云连续三次排名第一
- 关键词搜索-免费搜索关键词排名软件
- 解决【C++】其他类中友元函数不可访问私有数据--顺序问题
- android课程设计的需求分析,安卓课程设计心得体会.doc
- vs2017 开关“/NOENTRY”只与 DLL 兼容;链接时不使用“/NOENTRY”
- mysql 查询附近店铺SQL写法 经度 纬度 范围 距离
- Win10双击任务栏的QQ图标就会自动隐藏的解决方案
- pwnable - mistake
- R语言--Cox模型校准曲线原理(一)数据来源