Tag Archives: Failed to execute goal org.apache.maven.plugins:mavensurefireplugin:2.12.4:test (defaulttest) on project Mybatis: There are test failures.

Maven Package Error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project Mybatis: There are test failures.

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>