如果是在命令行中去掉测试,可以在命令行中输入:mvn install -Dmaven.test.skip=true

在pom.xml

<plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
</plugins>

项目中的一段配置如下:

maven中去掉单元测试的配置

相关文章:

  • 2021-07-26
  • 2021-07-21
  • 2021-11-14
  • 2021-09-16
  • 2021-12-25
  • 2022-12-23
  • 2021-09-22
  • 2021-07-27
猜你喜欢
  • 2021-10-16
  • 2021-06-12
  • 2022-12-23
  • 2021-06-08
相关资源
相似解决方案