pom设置打包跳过test及springboot 打包规则
2018-09-19 本文已影响0人
Steven_sunlu
打包过程中跳过测试
skipTests 设置为true则是跳过
<build>
<resources>
<!-- 如果不加,那么打包的时候mapper文件不会被加载进来 -->
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
<!--打包过程中跳过测试-->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<!--true跳过测试-->
<skipTests>true</skipTests>
</configuration>
</plugin>
<!--spring boot 打包规则 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>