maven 打包异常
异常信息:
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage (repackage) on project majb-common: Execution repackage of goal org.springframework.boot:spring-boot-mave
n-plugin:2.1.6.RELEASE:repackage failed: Unable to find main class -> [Help 1]
新建springboot 打包报错。 在网上找了很多帖子,发现很多原因都会导致这样的异常。 说一下我原因:
项目结构:
----hello
-----hello-web
-----hello-service
-----hello-dao
-----hello-common
web 依赖 service
service依赖 dao
dao依赖 common
我的配置 在hello 下pom.xml 和 hello-web pom.xml 中 都有下面配置
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
实际上hello 下 pom.xml 作为一个 顶级项目是不需要 这个配置的。
打包的时候也不会从这个目录下打包,而是从hello-web 下打包
所以 需要把 hello 下 pom.xml 中 maven-plugin 配置 删掉 就可以打包成功了。 我的问题是这个原因导致的

maven 打包异常的更多相关文章
- maven打包异常
maven打包异常,如图: 问题原因:服务器密码错了.
- maven打包异常:软件包com.sun.org.apache.xml.internal.security.utils.Base64 不存在
maven打包异常:软件包com.sun.org.apache.xml.internal.security.utils.Base64 不存在 将jre/lib/rt.jar添加到maven的compi ...
- Maven打包异常:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war
出现下面异常,因为默认web.xml在 src/main/webapp 下所以才出现找不到的异常. 我的项目结构为 解决办法①: 在pom.xml里面制定 web位置即可 //先确保打包方式为w ...
- Spring-boot构建多模块依赖工程时,maven打包异常:程序包xxx不存在
在qizhi项目改版的时候, 所有代码都迁移好了, 但是compile的时候报程序包*****不存在, 具体到某一个类就是: 找不到符号. 下面这篇文章是正解 http://hbxflihua.ite ...
- Jenkins Maven打包出错异常的解决方法
Jenkins是一个很好用的打包部署工具,实现一键式部署项目,在项目处于测试阶段或者对于运维人员来讲是非常方便的一个工具. 但是最近使用Jenkins部署项目时老是出错,主要是maven打包的问题,错 ...
- hive udaf 用maven打包运行create temporary function 时报错
用maven打包写好的jar,在放到hive中作暂时函数时报错. 错误信息例如以下: hive> create temporary function maxvalue as "com. ...
- idea中 maven打包时时报错User setting file does not exist C:\Users\lenevo\.m2\setting.xml,
第一种错误 :idea中 maven打包时时报错User setting file does not exist C:\Users\lenevo\.m2\setting.xml, 解决方案如下:将ma ...
- maven 打包含有第三方依赖的 jar 包
maven 打包含有第三方依赖的 jar 包:mvn assembly:assembly
- maven打包问题
<build> <finalName>项目名</finalName> <!-- 配置maven打包时过滤的文件 --> <resources> ...
随机推荐
- maven-将本地jar包添加到本地仓库
一.使用场景 1.把网上的jar包下到本地,如果要在maven的pom文件中配置使用,就必须将jar包按照maven的规范添加到maven仓库中,然后再pom中既可以配置引用了. 二.准备工作 1.电 ...
- Jquery实现类似百度的搜索框
最近工作中需要做一个搜索框,类似百度的搜索框,需要达到两个功能: 1.输入关键字,展示匹配的下拉列表 2.选择匹配的项后查出相关内容 一般电商网站中也经常用到该搜索条,首先分析功能实现,输入关键字马上 ...
- html标签被div嵌套页面字体变大的解决办法
html标签被div嵌套页面字体变大的解决办法 <div> <html> <head> <title></title> </head& ...
- 异步消息处理机制相关面试问题-handlerThread面试问题详解
handlerThread产生背景: 开启Thread子线程进行耗时操作,多次创建和销毁线程是很耗系统资源的. handlerThread是什么? handler + thread + looper ...
- matlab 基础知识1
一.数组和矩阵注意 逗号 和 分号 的区别 向量生成方式: 传统方式:行向量 :空格,逗号列向量 :分号,回车 函数方式: x = linspace(a,b,n) 等分关系,从a 到 b, n等分.n ...
- Loadrunner:录制APP脚本
一.问题 使用 Loadrunner 12 自带的代理进行录制APP脚本时,遇到了各种阻碍 二.解决途径 使用 Fiddler 抓包后导出成 saz 格式文件,再导入到 Loadrunner 中,完美 ...
- tbdr+mrt
有关mrt的在tbdr的架构下的内存排布 system memory肯定是dither 我对这里把握比较大 rt0 rgba8 rt1 r8 这样像素排列是rgba8r8rgba8r8rgba8r8. ...
- 帝都之行9day:正式上班第一天
今天是我正式上班的第一天. 面了两天,三家公司,然后周五就去办入职了,我是不是太随便了点,捂脸. 不管怎么说,又要开始上班啦,CRUD的日子又要开始了…… 加油吧!
- easypoi 版本依赖关系
<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactI ...
- Python文件查找
#!/usr/bin/python import os import string def get_name(path_name, file_str): dir_name = ...