MVN compile There is no problem. The following error is reported during MVN package:
Solution:
There are two ways to package and skip tests
First, the command line:
MVN clean package – dmaven. Test. Skip = true
Second, write POM file:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.4.2</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin>