SpringBoot 编译时出现Unable to find a single main class的解决方法

今天一个Maven项目突然jenkins编译不通过了,报错内容如下:

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

解决方法:找不到main方法,就在pom.xml中指定main class的位置:

 
       UTF-8
       com.XXXXXX.tsp.pump.PumpBootstrap
 

提交代码后,编译通过。

你可能感兴趣的:(java,springboot)