maven打包遇到错误,Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test

时间:2022-08-04 17:15:09

方法一

1.添加pom配置文件

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

2.idea运行package即可

maven打包遇到错误,Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test

 

方法二:

直接运行命令:mvn clean package -Dmaven.test.skip=true