[
https://issues.apache.org/jira/browse/SUREFIRE-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17333235#comment-17333235
]
Christoph Läubrich commented on SUREFIRE-1910:
----------------------------------------------
{noformat}
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ bundle ---
[INFO] No tests to run.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for parent 0.0.1-SNAPSHOT:
[INFO]
[INFO] parent ............................................. SUCCESS [ 0.033 s]
[INFO] bundle ............................................. FAILURE [ 0.933 s]
[INFO] bundle2 ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.568 s
[INFO] Finished at: 2021-04-27T15:31:47+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on
project bundle: No tests were executed! (Set -DfailIfNoTests=false to ignore
this error.) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :bundle{noformat}
> Missleading error message when using -Dtest=....
> ------------------------------------------------
>
> Key: SUREFIRE-1910
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1910
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.22.2
> Reporter: Christoph Läubrich
> Priority: Major
>
> I run
> {noformat}
> mvn clean verify -Dtest=abc
> {noformat}
> then I get the following error message:
> {noformat}
> No tests were executed! (Set -DfailIfNoTests=false to ignore this error.)
> {noformat}
> This is missleading as failIfNoTests is false by default. Actually I have to
> set surefire.failIfNoSpecifiedTests=false
--
This message was sent by Atlassian Jira
(v8.3.4#803005)