maven打包springboot项目的问题
关于跳过test
在parent项目的pom中添加配置以跳过test
<properties>
<skipTests>true</skipTests>
</properties>
关于打包失败 unable to find main class
当存在多个模块时,只需在我们最终需要生成可运行jar的模块pom中添加:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
即可,其他被依赖的模块以及parent需要将删掉
参考资料:https://my.oschina.net/tridays/blog/825245
新手起步,具体原因暂时不理解,仅以此作为记录以供日后参考