关于Springboot打包错误的问题 | Failed to execute goal org.springframework.boot:spring-boot-maven-plugin
最近在使用spring-boot整合多模块,但是在父pom中打包maven install时总会报错:Failed to execute goal org.springframework.boot:spring-boot-maven-plugin,导致错误的原因是父pom.xml中引入了如下配置:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
这里引入了spring-boot-maven-plugin,打包时会去扫描项目main方法入口,也就是说引入该配置,你就必须在项目src/main/java/下创建一个spring-boot启动类:
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan; @SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
主意:入口类上一定要加上注解@SpringBootApplication
解决方案:
1. 添加spring-boot启动类。
2. 将pom.xml中的spring-boot-maven-plugin相关配置注释掉
3. pom.xml中spring-boot-maven-plugin相关配置修改为普通的maven--plugin配置即可。
关于Springboot打包错误的问题 | Failed to execute goal org.springframework.boot:spring-boot-maven-plugin的更多相关文章
- maven打包 invalid entry size Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.14.RELEASE:repackage (default) on project
打包失败,但是不知是具体是什么引起得,使用mvn -e clean package,定位到报错得代码 在定位到代码,打上断点,使用maven 打包debug模式 找到dubbo.properties, ...
- springboot错误1 Failed to execute goal org.springframework.boot:spring-boot-maven-plugin
关于Springboot打包错误的问题 | Failed to execute goal org.springframework.boot:spring-boot-maven-plugin https ...
- Failed to execute goal org.springframework.boot
报错 [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.4.0.RELEASE:ru ...
- 【spring cloud】在spring cloud服务中,打包ms-core失败,报错Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.4.RELEASE:repackage (default) on project
在spring cloud服务中,有一个ms-code项目,只为所有的微服务提供核心依赖和工具类,没有业务意义,作为核心依赖使用.所以没有main方法,没有启动类. 在spring cloud整体打包 ...
- Springboot | Failed to execute goal org.springframework.boot:spring-boot-maven-plugin
案例 今天搭建spring boot 环境时,使用mvn install ,出现Failed to execute goal org.springframework.boot:spring-boot- ...
- [转]maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test
源文URL:http://blog.csdn.net/caiwenfeng_for_23/article/details/44514947 mvn compile 没有问题,mvn package的 ...
- maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test
mvn package的时候报如下错误: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test ...
- 【maven】在IDEA上 使用maven进行打包时报错:Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:jar
报错内容如下: [INFO] ------------------------------------------------------------------------ [INFO] BUILD ...
- Maven 打包的时候报 Failed to execute goal org.codehaus.mojo:native2ascii-maven-plugin
错误信息: [ERROR] Failed to execute goal org.codehaus.mojo:native2ascii-maven-plugin:1.0-alpha-1:native2 ...
随机推荐
- Resolve Missing artifact Issue in maven
https://jingyan.baidu.com/article/d621e8da0a5b192864913f79.html
- Use curl with uuid(uuidgen) under shell
#!set uuidtmp = uuid.tmp #!uuidgen > $uuidtmp #!set uuid=<$uuidtmp #!rm $uuidtmp #!echo $uuid ...
- PRML读书笔记_绪论曲线拟合部分
一.最小化误差函数拟合 正则化( regularization )技术涉及到给误差函数增加一个惩罚项,使得系数不会达到很大的值.这种惩罚项最简单的形式采用所有系数的平方和的形式.这推导出了误差函数的修 ...
- modern effective C++ -- Deducint Types
1. 理解模板类型推导 1. expr是T& template<typename T> void f(T & param); // 我们声明如下变量 int x = 27; ...
- auto_increment 自增键的一些说明
导致auto_increment变小的几种情况: 1. alter table xx auto_increment = yy; 2. truncate table 3. restart mysql 第 ...
- python有序字典
最近的django开发中用到了有序字典,所以研究了一下,以下. 示例: 有序字典和通常字典类似,只是它可以记录元素插入其中的顺序,而一般字典是会以任意的顺序迭代的. 普通字典: d1={} d1['a ...
- python之打印日志logging
import logging # 简单打印日志举例 logging.basicConfig(level=logging.DEBUG) # 设置日志级别,WARN logging.warning('Wa ...
- sorted 返回字典的所有键
- BZOJ4555 HEOI2016/TJOI2016求和(NTT+斯特林数)
S(i,j)=Σ(-1)j-k(1/j!)·C(j,k)·ki=Σ(-1)j-k·ki/k!/(j-k)!.原式=ΣΣ(-1)j-k·ki·2j·j!/k!/(j-k)! (i,j=0~n).可以发现 ...
- 自学Zabbix之路15.1 Zabbix数据库表结构简单解析-Hosts表、Hosts_groups表、Interface表
点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 自学Zabbix之路15.1 Zabbix数据库表结构简单解析-Hosts表.Hosts_grou ...