Tibor17 commented on pull request #400: URL: https://github.com/apache/maven-surefire/pull/400#issuecomment-1003142907
@imonteroperez @slawekjaranowski @olamy The includes|excludes, includesFile|excludesFile end up within the TestListResolver. There is no need to modify the implementation of Provider, TestListResolver and other stuff. All we could do is to compromise the sanity check `Method filter prohibited in includes|excludes|includesFile|excludesFile parameter`. Below you can see the original method for includesFile. And then the sanity check is shifted in the modified code, this is my proposal. ``` private List<String> getIncludeList() throws MojoFailureException { List<String> includes = null; if ( isSpecificTestSpecified() ) { includes = new ArrayList<>(); addAll( includes, split( getTest(), "," ) ); } else { if ( getIncludesFile() != null ) { includes = readListFromFile( getIncludesFile() ); } if ( includes == null ) { includes = getIncludes(); } else { maybeAppendList( includes, getIncludes() ); } checkMethodFilterInIncludesExcludes( includes ); if ( includes == null || includes.isEmpty() ) { includes = asList( getDefaultIncludes() ); } } return filterNulls( includes ); } ``` changed to ``` private List<String> getIncludeList() throws MojoFailureException { List<String> includes = null; if ( isSpecificTestSpecified() ) { includes = new ArrayList<>(); addAll( includes, split( getTest(), "," ) ); } else { includes = getIncludes(); checkMethodFilterInIncludesExcludes( includes ); if ( getIncludesFile() != null ) { includes = readListFromFile( getIncludesFile() ); } if ( includes == null || includes.isEmpty() ) { includes = asList( getDefaultIncludes() ); } } return filterNulls( includes ); } ``` Similar with the excludesFile. @imonteroperez Would this help you? Of course we do not know the IT results yet. They may fail.., not sure! Of course the JavaDoc of both parameters should say that the pattern allows using #method, and the site documentation too. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org