maven打包时报错

maven打包时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test 

加了一个mybatis的依赖,然后打包的时候报这个错,具体可以两个办法解决

1.直接配置跳过测试

<properties>
        <skipTests>true</skipTests>
    </properties>

2.添加配置文件

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.22.1</version>
  <!--版本根据你自己的版本写 -->
    <configuration>
        <skipTests>true</skipTests>
    </configuration>
</plugin>

3.查看具体错误,一般本地目录会有报错文件

D:\ketang\target\surefire-reports

posted @ 2021-08-19 12:34  gitee1412  阅读(201)  评论(0编辑  收藏  举报