spring boot 專案打包時報錯 Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.
阿新 • • 發佈:2019-02-15
異常資訊如下
[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] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Process finished with exit code 1
解決方案一:
建立main方法
解決方案二:
新增如下配置
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions >
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>