Spring Boot Multi-Module Maven项目重新打包失败 [英] Spring Boot Multi-Module maven project repackage failed

查看:187
本文介绍了Spring Boot Multi-Module Maven项目重新打包失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在关注John Thompson的Spring Framework Beginner to Guru课程.我将按照他的逐步步骤,在春季启动时为春季宠物诊所创建多模块maven项目.当我单击根模块上的包时,它说重新打包失败,无法找到主类.

I'm currently following John Thompson's Spring Framework Beginner to Guru course. I follow his step by step procedures on creating multi module maven project for spring pet clinic on spring boot. When I clicked package on my root module it says repackaged failed, unable to find main class.

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        <executions>
            <execution>
                <goals>
                    <goal>repackage</goal>
                </goals>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </execution>
        </executions>
        </plugin>
    </plugins>
</build>

[错误]无法在项目pet-clinic-data上执行目标org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage(重新打包):目标org.springframework的执行重新打包. boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage失败:找不到主类-> [帮助1]

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage (repackage) on project pet-clinic-data: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage failed: Unable to find main class -> [Help 1]

推荐答案

删除

 <configuration>
       <skip>true</skip>
   </configuration>

并添加"spring-boot.repackage.skip"属性,如下所示:

and add "spring-boot.repackage.skip" property like the following:

<artifactId>pet-clinic-data</artifactId>
    <properties>
        <spring-boot.repackage.skip>true</spring-boot.repackage.skip>
    </properties>

这篇关于Spring Boot Multi-Module Maven项目重新打包失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆