Repository: maven-surefire
Updated Branches:
  refs/heads/master 205aba6f7 -> 45069148e


SUREFIRE-1153 Take includes into account when using test/it.test property


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/c0816662
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/c0816662
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/c0816662

Branch: refs/heads/master
Commit: c0816662367e54d2431ffdbb6b58d3cb417245bc
Parents: 205aba6
Author: Tomas Rohovsky <troho...@redhat.com>
Authored: Fri Apr 10 21:49:01 2015 +0200
Committer: Tibor17 <tibo...@lycos.com>
Committed: Thu May 28 22:46:59 2015 +0200

----------------------------------------------------------------------
 .../plugin/surefire/AbstractSurefireMojo.java   | 28 ++++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/c0816662/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
----------------------------------------------------------------------
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 46256d3..6287969 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
@@ -1634,39 +1634,39 @@ public abstract class AbstractSurefireMojo
     private List<String> getIncludeList()
         throws MojoFailureException
     {
-        List<String> includes = null;
+        List<String> actualIncludes = null;
         if ( isSpecificTestSpecified() && !isMultipleExecutionBlocksDetected() 
)
         {
-            includes = Collections.singletonList( getTest() );
+            actualIncludes = Collections.singletonList( "**/*" );
         }
         else
         {
             if ( getIncludesFile() != null )
             {
-                includes = readListFromFile( getIncludesFile() );
+                actualIncludes = readListFromFile( getIncludesFile() );
             }
 
             // If we have includesFile, and we have includes, then append 
includes to includesFile content
-            if ( includes == null )
+            if ( actualIncludes == null )
             {
-                includes = getIncludes();
+                actualIncludes = getIncludes();
             }
             else
             {
-                maybeAppendList( includes, getIncludes() );
+                maybeAppendList( actualIncludes, getIncludes() );
             }
 
-            checkMethodFilterInIncludesExcludes( includes );
-        }
+            checkMethodFilterInIncludesExcludes( actualIncludes );
 
-        // defaults here, qdox doesn't like the end javadoc value
-        // Have to wrap in an ArrayList as surefire expects an ArrayList 
instead of a List for some reason
-        if ( includes == null || includes.isEmpty() )
-        {
-            includes = Arrays.asList( getDefaultIncludes() );
+            // defaults here, qdox doesn't like the end javadoc value
+            // Have to wrap in an ArrayList as surefire expects an ArrayList 
instead of a List for some reason
+            if ( actualIncludes == null || actualIncludes.isEmpty() )
+            {
+                actualIncludes = Arrays.asList( getDefaultIncludes() );
+            }
         }
 
-        return filterNulls( includes );
+        return filterNulls( actualIncludes );
     }
 
     private void checkMethodFilterInIncludesExcludes( Iterable<String> 
patterns )

Reply via email to