[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.3.RELEASE:repackage (default) on project webapps-api-bid: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.3.RELEASE:repackage failed: Unable to find a single main class from the...
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.3.RELEASE:repackage (default) on project webapps-api-bid: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.3.RELEASE:repackage failed: Unable to find a single main class from the...
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.3.RELEASE:repackage (default) on project webapps-api-bid: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.3.RELEASE:repackage failed: Unable to find a single main class from the...
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.3.RELEASE:repackage (default) on project webapps-api-bid: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.3.RELEASE:repackage failed: Unable to find a single main class from the...
在springboot 项目中,除了启动类的主函数 mainclass,如果还出现其他的 main 方法,本地运行是没有任何问题,但是在打包 package 时,就会报错,说 repackage 时,在项目中有多个候选的主方法。这时候,我们就需要在 maven 的 pom.xml 文件中指定打包时的 mainClass,具体是在 spring-boot-maven-plugin 中指定,配置如下...
Start-Class属性值为com.ericsson.ramltest.MyApplication。 其中com.ericsson.ramltest.MyApplication类中定义了main()方法,是程序的入口。 通常,Spring Boot Maven plugin会在打包过程中自动为Manifest文件设置Main-Class属性,事实上该属性究竟作用几何,还可以受Spring Boot Maven plugin的配置属性layout控制的,示例如下 ...
代码语言:javascript 复制 <build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><mainClass>com.xxx.XxxApplication</mainClass></configuration><executions><execution><goals><goal>repackage</goal></goals></execution></executio...
在默认给出的配置的环境下,pom.xml中是有spring-boot-maven-plugin这个依赖的,所以可以先排除没有这个依赖的说法。 我用maven打包后,只给出了一个内存较小的jar文件,运行这个文件,就会出现上述没有主属性清单的错误,至于这个jar文件为何会出现这个错误,我会在文章的下面讲。
pom中引用springboot-maven插件 <plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><mainClass>package.Main</mainClass></configuration></plugin> 2.mvn package ©著作权归作者所有,转载或内容合作请联系作者 ...
在spring boot项目中使用maven profiles和maven assembly插件根据不同环境打包成tar.gz或者zip 将spring boot项目中的配置文件提取到外部config目录中 将spring boot项目中的启动jar包移动到boot目录中 将spring boot项目中的第三方依赖jar包移动到外部lib目录中 bin目录中是启动,停止,重启服务命令 打包后的目录结构类似...