-DskipTests和- dmaven.skip =true之间的区别是什么

时间:2023-01-25 22:37:24

I was trying to build hive-0.13.

我想建一个hive-0.13。

When using -Dmaven.test.skip=true, it will not build the test jars but it will check test dependency.

当使用-Dmaven.test。skip=true,它不会构建测试jar,但会检查测试依赖性。

When using -DskipTests, it will not build the test jars and also not check test dependency.

在使用- dskiptest时,它不会构建测试jar,也不会检查测试依赖项。

What's the difference between -DskipTests and -Dmaven.test.skip=true?

-DskipTests和- dmaven.skip =true之间的区别是什么?

2 个解决方案

#1


57  

Maven docs:

Maven文档:

-DskipTests compiles the tests, but skips running them

-DskipTests编译测试,但是跳过运行它们

-Dmaven.test.skip=true skips compiling the tests and does not run them

-Dmaven.test。skip=true跳过编译测试,不会运行它们

Also this one might be important

这一点也很重要

maven.test.skip is honored by Surefire, Failsafe and the Compiler Plugin

maven.test。skip是由Surefire、Failsafe和编译器插件授予的。

#2


1  

There is a third, related option described here: https://*.com/a/21933970/3169948

这里有第三个相关选项:https://*.com/a/21933970/3169948

"maven.test.skip.exec=true" the tests get compiled, but not executed.

“maven.test.skip。测试被编译,但是没有被执行。

So the complete set of test options for Maven would be:

因此,Maven的完整测试选项集是:

  • -DskipTests ==> compiles the tests, but skips running them
  • -DskipTests ==>编译测试,但跳过运行它们
  • -Dmaven.test.skip.exec=true ==> the tests get compiled, but not executed.
  • -Dmaven.test.skip。测试被编译,但没有执行。
  • -Dmaven.test.skip=true ==> doesn't compile or execute the tests.
  • -Dmaven.test。skip=true ==>不会编译或执行测试。

#1


57  

Maven docs:

Maven文档:

-DskipTests compiles the tests, but skips running them

-DskipTests编译测试,但是跳过运行它们

-Dmaven.test.skip=true skips compiling the tests and does not run them

-Dmaven.test。skip=true跳过编译测试,不会运行它们

Also this one might be important

这一点也很重要

maven.test.skip is honored by Surefire, Failsafe and the Compiler Plugin

maven.test。skip是由Surefire、Failsafe和编译器插件授予的。

#2


1  

There is a third, related option described here: https://*.com/a/21933970/3169948

这里有第三个相关选项:https://*.com/a/21933970/3169948

"maven.test.skip.exec=true" the tests get compiled, but not executed.

“maven.test.skip。测试被编译,但是没有被执行。

So the complete set of test options for Maven would be:

因此,Maven的完整测试选项集是:

  • -DskipTests ==> compiles the tests, but skips running them
  • -DskipTests ==>编译测试,但跳过运行它们
  • -Dmaven.test.skip.exec=true ==> the tests get compiled, but not executed.
  • -Dmaven.test.skip。测试被编译,但没有执行。
  • -Dmaven.test.skip=true ==> doesn't compile or execute the tests.
  • -Dmaven.test。skip=true ==>不会编译或执行测试。