Maven打包报错: 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  没有问题,mvn package的时候报如下错误:

解决方法:

打包跳过测试有两种方法

一是命令行:
mvn clean package -Dmaven.test.skip=true

 

二是写入pom文件:

 <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.4.2</version>
          <configuration>
        //跳过测试类 <skipTests>true</skipTests> </configuration> </plugin>

 

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

[db:回答]

以上是Maven打包报错: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project Mybatis: There are test failures.的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>