spring boot 项目打包时报错 Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.

异常信息如下

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

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

ERROR http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Process finished with exit code 1

解决方案一:

创建main方法

解决方案二:
添加如下配置

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-maven-pluginartifactId>
            <executions>
                <execution>
                    <phase>nonephase>
                execution>
            executions>
        plugin>
    plugins>
build>

你可能感兴趣的:(#,maven,#,springboot,spring,boot)