Maven 构建Spring-Boot工程报错

Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.6.RELEASE:repackage 

找不到MainClass,在pom文件中增加spring-boot-maven-plugin,并配置启动类

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.hbd.example.eureka.EurekaServerApplication</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
原文地址:https://www.cnblogs.com/cocoat/p/7541653.html