java - 如何在 pom 中设置不编译测试?

标签 java maven testing pom.xml

如何在 pom 中设置不在 Maven 中编译测试?我试过:

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

但在那种情况下,Maven 编译测试但不运行它们。我需要 Maven 不要编译我的测试。

最佳答案

您必须将 maven.test.skip 定义为 true。

<properties>
    <maven.test.skip>true</maven.test.skip>
</properties>

http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html

关于java - 如何在 pom 中设置不编译测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15821684/

相关文章:

java - 整个 TextView 的自动完成

maven - Gradle/Maven 循环依赖的行为

python - 我迷失了尝试为我的 Flask 应用程序编写测试

java - 为什么在通过 Intellij 使用 tomcat 启动 Web 应用程序时有时会出现奇怪的 FileNotFoundExceptions

java - 具有 GSON 的 Android Volley 库无法将数据设置为 POJO 类

java - 使用BufferedImage和ImageIO保存图像时内存不足的问题

java - 如何找到 "Could not resolve placeholder"原因

maven - 禁用maven下载进度指示

api - GraphQL API - 任何用于测试它的自动化工具?

PHP Websocket 在测试中对用户进行身份验证(传递 session cookie)