[ 
https://issues.apache.org/jira/browse/MSHARED-989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17733797#comment-17733797
 ] 

Elliotte Rusty Harold commented on MSHARED-989:
-----------------------------------------------

 Ant-style globs for includes/excludes would be added by 
DirectoryStream.Filter. There's an argument to be made that what we really want 
here is an implementation of DirectoryStream.Filter that supports includes and 
excludes and prrhaps DEFAULTEXCLUDES. Maven specific filtering no longer 
requires implementing our own error prone, platform-cautious file tree walking. 
Leave that effort to the projects that specialize in understanding the 
idiosyncrasies of various file systems. 

> Undeprecate DirectoryScanner and MatchPattern(s)
> ------------------------------------------------
>
>                 Key: MSHARED-989
>                 URL: https://issues.apache.org/jira/browse/MSHARED-989
>             Project: Maven Shared Components
>          Issue Type: Improvement
>          Components: maven-shared-utils
>    Affects Versions: maven-shared-utils-3.3.4
>            Reporter: Konrad Windszus
>            Priority: Major
>
> In MSHARED-898 {{DirectoryScanner}} has been deprecated. Instead using the 
> {{java.nio.file.DirectoryStream}} is now recommended.
> The latter is often no replacement as the parametrization of DirectoryScanner 
> with Ant-style globs for includes/excludes is not supported. Also the 
> {{DEFAULTEXCLUDES}} are not part of Java NIO {{DirectoryStream}} either.
> The same applies to {{MatchPatterns}}, which is deprecated and now recommends 
> using {{java.nio.filejava.nio.file.DirectoryStream.Filter<T>}}. Please 
> instead provide a Filter for Java NIO for those patterns (regex and ant) and 
> make {{DirectoryScanner}} use File NIO internally while keeping API 
> compatibility.
> Otherwise every consumer of DirectoryScanner needs to come up with a custom 
> implementation of pattern matching and a lot of glue code.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to