在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>