zoukankan      html  css  js  c++  java
  • 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 配置 删掉 就可以打包成功了。 我的问题是这个原因导致的

  • 相关阅读:
    洛谷P1218 [USACO1.5]特殊的质数肋骨 Superprime Rib
    洛谷 P1062 数列
    洛谷 P2822 组合数问题
    HDU 6112 今夕何夕
    poj 2115 C Looooops
    HDU 6092 Rikka with Subset
    poj 2720 Last Digits
    poj 1254 Hansel and Grethel
    poj 1222 EXTENDED LIGHTS OUT
    poj 2459 Sumsets
  • 原文地址:https://www.cnblogs.com/zhangXingSheng/p/11291745.html
Copyright © 2011-2022 走看看