当前位置:   article > 正文

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.3:repackage (repackage)

failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.3:repackage (repackage) on project SalaryManagement: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.6.3:repackage failed: Unable to find main class
 

解决:

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <mainClass>none</mainClass>     <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
                <classifier>execute</classifier>    <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/450959
推荐阅读
相关标签
  

闽ICP备14008679号