在maven发包的时候,一般不会把test发布过去,因为有可能有其他的报错,影响发包,所以最好test不给打包,只需要在pom.xml加上:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>