【问题标题】:No surefire plugin in my pom - How does it show surefire output?我的 pom 中没有万能插件 - 它如何显示万能输出?
【发布时间】:2013-07-03 01:46:24
【问题描述】:

我的 pom.xml 中没有surefire插件条目。但是当我使用命令运行时,我得到了肯定的插件错误:

 mvn test -Dtest=TEstClass

错误:

 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-
 test) on project my-projection: No tests were executed!  (Set -DfailIfNoTests=false to ignore 
 this error.) -> [Help 1]

它来自哪里?

【问题讨论】:

    标签: java maven testing plugins testng


    【解决方案1】:

    项目的super pom 包括surefire 插件。如果您运行mvn help:effective-pom,它将显示您在项目中调用 maven 时正在使用的 pom,包括您从父 pom 文件继承的所有内容,并且您会看到它包含了 surefire 插件。

    【讨论】:

    • 哦,伙计。这个超级 POM 没有提到任何关于万能插件的内容。
    • 刚打开 maven 3.6.3 的超级 pom - 它不包含 maven-surefire-plugin。但是该插件存在于我的有效 pom 中。
    猜你喜欢
    • 2012-01-14
    • 2013-11-27
    • 1970-01-01
    • 2015-11-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-24
    • 2020-04-15
    相关资源
    最近更新 更多