You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2022/02/17 11:56:30 UTC

[maven-surefire] branch master updated: [SUREFIRE-2016] The MOJO parameter testSourceDirectory is used only in the TestNG HTML, and it should be optional. Javadoc and documentation should be fixed.

This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/master by this push:
     new 5f7da49  [SUREFIRE-2016] The MOJO parameter testSourceDirectory is used only in the TestNG HTML, and it should be optional. Javadoc and documentation should be fixed.
5f7da49 is described below

commit 5f7da49c4a59c79a30589aa3bde54b7eea209f44
Author: tibor.digana <ti...@apache.org>
AuthorDate: Thu Feb 17 12:22:43 2022 +0100

    [SUREFIRE-2016] The MOJO parameter testSourceDirectory is used only in the TestNG HTML, and it should be optional. Javadoc and documentation should be fixed.
---
 .../org/apache/maven/plugin/surefire/AbstractSurefireMojo.java    | 3 ++-
 .../src/site/apt/examples/inclusion-exclusion.apt.vm              | 8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index ff65cdc..a2d76c8 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -281,10 +281,11 @@ public abstract class AbstractSurefireMojo
 
     /**
      * The test source directory containing test class sources.
+     * Important <b>only</b> for TestNG HTML reports.
      *
      * @since 2.2
      */
-    @Parameter( defaultValue = "${project.build.testSourceDirectory}", required = true )
+    @Parameter( defaultValue = "${project.build.testSourceDirectory}" )
     private File testSourceDirectory;
 
     /**
diff --git a/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt.vm b/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt.vm
index 1a7916d..a66b7b3 100644
--- a/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt.vm
+++ b/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt.vm
@@ -211,10 +211,10 @@ Inclusions and Exclusions of Tests
 
 * Tests from dependencies
 
-  By default, ${thisPlugin} will only scan for test classes to execute in the configured <<<testSourceDirectory>>>. To
-  have the plugin scan dependencies to find test classes to execute, use the <<<dependenciesToScan>>> configuration.
-  Dependencies can be specified using the <<<groupId[:artifactId[:type[:classifier][:version]]]>>> format, and must already
-  be <<<dependency>>> elements in scope.
+  In order to scan dependencies by the ${thisPlugin} plugin and find the test classes to execute in the dependencies,
+  use the MOJO parameter <<<dependenciesToScan>>> and configure it as necessary.
+  Dependencies can be specified using the <<<groupId[:artifactId[:type[:classifier][:version]]]>>> format, and must
+  already be <<<dependency>>> elements in scope.
   
   <Note:> Support for version, type and classifier was introduced in version <<<3.0.0-M4>>>. When using earlier versions,
   ${thisPlugin} will fail with an <<<IllegalArgumentException>>> if more than groupId and artifactId are specified.