springboot分模块问题
springboot 分模块开发时,mvn clean install报错:
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.9.RELEASE:repackage (default) on project core: Execution default of goal o
rg.springframework.boot:spring-boot-maven-plugin:1.5.9.RELEASE:repackage failed: Unable to find main class -> [Help 1]
admin 和 api 都依赖于core.core中有service,dao层。
core中pom.xml去除
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build>
最外层整个项目的 pom.xml中去除:
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build>不然会所有模块都会按此插件打包