1. Unable to find main class 实践方法:添加main方法 1 2 3 4 5 publicclassTestApp { publicstaticvoidmain(String[] args) { } } 2.找不到dependency的module 1 2 3 4 5 6 7 8 9 10 11 <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-mav...
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:...repackage failed: Unable to find mainclass 控制台就两个红色单词: Process terminated; 怎么解决? 还记得之前创建的那个子子目录吗? 要知道,每次创建模块,它都会在他的上一级的pom文件中自动生成这个东西,来标识该模块: ...
我们把这个模块去掉就行了,让父项目下只有子模块的module标识就行了: <modules> <module>service</module> </modules> 不是吧!!! 上面的东西改好后,我运行test测试里面的程序还是报错: spring-boot-maven-plugin:2.5.3:repackage failed: Unable to find main class 没办法那就接着造呗。 去网上搜了许多这种...
针对Maven打包时出现的“unable to find main class”错误,可以按照以下步骤进行排查和解决: 检查pom.xml配置: 确保在pom.xml文件中已经正确设置了主类(Main Class)。如果项目是一个Spring Boot项目,通常会在spring-boot-maven-plugin插件中配置mainClass属性。例如: xml <build> <plugins> <plu...
springboot 多个maven模块打包异常:Unable to find main class 原因:在父工程中加入了springboot的maven插件,即: <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> ...
同一问题的原因可能存在多种,这里的方式仅供参考 1、使用jenkins打包基于springboot的多web模块项目时出现Unable to find main class ...
maven多模块开发 打包报错Unable to find a suitable main class, please add a 'mainClass' property 莪壹矗認潙洎己佷 畏首畏尾,身余几何?1 人赞同了该文章 在没有启动类模块的pom.xml中,添加 <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-...
项目是springboot,分多模块:common公共模块、order订单模块和stock库存模块。 项目在idea运行都没问题,一到maven install之后,common公共模块就抛出Unable to find main class。 在网络上,大部分都说在POM文件中指定mainclass。如: <?xml version="1.0" encoding="UTF-8"?><projectxmlns="http://maven.apache.org...
简介:idea中maven打包工具类 repackage failed: Unable to find main class 今天遇到一个着实让人蛋疼的问题,repackage failed: Unable to find main class 查看次维护项目是一个多模块依赖的项目,通用工具类打包的时候上面的错误,耽误了我十几分钟,后来忽然想到,工具包打包的时候不应该有maven的依赖,去掉pom文件中的...
SpringCloud多模块项目打包报错Unable to find main class 把下面的删除,就不会报 找不到包了 <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>${java.version}</source> ...