desruisseaux commented on code in PR #2236: URL: https://github.com/apache/maven/pull/2236#discussion_r2029909621
########## api/maven-api-core/src/main/java/org/apache/maven/api/SourceRoot.java: ########## @@ -46,23 +46,39 @@ default Path directory() { } /** - * {@return the list of pattern matchers for the files to include}. + * {@return the list of patterns for the files to include}. + * The path separator is {@code /} on all platforms, including Windows. + * The prefix before the {@code :} character, if present and longer than 1 character, is the syntax. + * If no syntax is specified, or if its length is 1 character (interpreted as a Windows drive), + * the default is a Maven-specific variation of the {@code "glob"} pattern. + * + * <p> * The default implementation returns an empty list, which means to apply a language-dependent pattern. * For example, for the Java language, the pattern includes all files with the {@code .java} suffix. */ - default List<PathMatcher> includes() { + default List<String> includes() { return List.of(); } /** - * {@return the list of pattern matchers for the files to exclude}. + * {@return the list of patterns for the files to exclude}. * The exclusions are applied after the inclusions. * The default implementation returns an empty list. */ - default List<PathMatcher> excludes() { + default List<String> excludes() { return List.of(); } + /** + * {@return a matcher combining the include and exclude patterns}. + * The matcher is absent if the includes/excludes lists are empty + * and {@code useDefaultExcludes} is {@code false}. + * + * @param useDefaultExcludes whether to add the default set of patterns to exclude, + * mostly Source Code Management (<abbr>SCM</abbr>) files + */ + Optional<PathMatcher> matcher(boolean useDefaultExcludes); Review Comment: After a second thought, replaced `Optional<PathMatcher> matcher(boolean)` by `PathMatcher matcher(Collection, boolean)`. -- 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