异常信息:

[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 打包异常的更多相关文章

  1. maven打包异常

    maven打包异常,如图: 问题原因:服务器密码错了.

  2. 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 ...

  3. Maven打包异常:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war

    出现下面异常,因为默认web.xml在  src/main/webapp  下所以才出现找不到的异常. 我的项目结构为 解决办法①:  在pom.xml里面制定 web位置即可 //先确保打包方式为w ...

  4. Spring-boot构建多模块依赖工程时,maven打包异常:程序包xxx不存在

    在qizhi项目改版的时候, 所有代码都迁移好了, 但是compile的时候报程序包*****不存在, 具体到某一个类就是: 找不到符号. 下面这篇文章是正解 http://hbxflihua.ite ...

  5. Jenkins Maven打包出错异常的解决方法

    Jenkins是一个很好用的打包部署工具,实现一键式部署项目,在项目处于测试阶段或者对于运维人员来讲是非常方便的一个工具. 但是最近使用Jenkins部署项目时老是出错,主要是maven打包的问题,错 ...

  6. hive udaf 用maven打包运行create temporary function 时报错

    用maven打包写好的jar,在放到hive中作暂时函数时报错. 错误信息例如以下: hive> create temporary function maxvalue as "com. ...

  7. 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 ...

  8. maven 打包含有第三方依赖的 jar 包

    maven 打包含有第三方依赖的 jar 包:mvn assembly:assembly

  9. maven打包问题

    <build> <finalName>项目名</finalName> <!-- 配置maven打包时过滤的文件 --> <resources> ...

随机推荐

  1. fastadmin中上传配置

    配置文件位于下图,默认代码如下 <?php //上传配置 return [ /** * 上传地址,默认是本地上传 */ 'rootpath' => '/uploads/', 'upload ...

  2. JS笔记02

    回顾: html: 超文本标记语言 后缀名: *.html 或 *.htm 标签分类: 围堵标签: 双标签 <html>标签体</html> 空标签: 单标签 <br/& ...

  3. 前端入门Js笔记

    T 001 ____________--信息页面展示 需求分析: 有一个页面,在页面上有很多文字信息,且格式不一. 技术分析: html: 文字标签: 字体标签: 标题标签: 其他标签: 排版标签: ...

  4. JMeter 控件整理

    一个线程组里多个请求的情况下,添加用户参数.如添加random函数,若不勾选“每次迭代更新一次”则每发送一个请求调用一次random函数,勾选上之后,整个线程组运行过程只调用一次random函数.

  5. 【input】标签去除默认样式

    input{-webkit-appearance: none; -moz-appearance: none; -o-appearance: none; appearance: none;}

  6. java继承-子类调用父类的方法中包含子类重写的方法

    # 看题目是不是很绕,这个我也不知道怎么才能更简单的表达了... # 先看代码: public class Common { public static void main(String[] args ...

  7. ClassLoader心得

              我们都知道,jvm执行的代码,都是通过jvm加载系统加入的.加载系统的第一步是通过ClassLoader加载class二进制信息,jvm规范中并没有规定class的来源类型,这就给 ...

  8. Windowsx下Appium环境搭建步骤及问题

    1,安装Java jdk配置环境变量  验证方式:cmd >java -version 2,下载Android sdk配置环境变量 验证方式:cmd >adb devices(下载的是zi ...

  9. linux内核 概念

    内核Kernel只是操作系统的一部分,操作系统本身在内核之上还包含命令行shell和其他种类的用户界面. 通常内核包含: 中断服务程序 进程管理和调度程序 内存管理程序 进程同步方法 IO和设备等 在 ...

  10. .ko文件

    ko文件介绍 .ko文件是kernel object文件(内核模块),该文件作用是把内核的部分功能移动到内核外边,需要的时候插入内核,不需要时卸载. 内核模块实现一些函数,作为回调函数注册到内核中.在 ...