Class DefaultPathMatcherFactory

java.lang.Object
org.apache.maven.impl.DefaultPathMatcherFactory
All Implemented Interfaces:
org.apache.maven.api.Service, org.apache.maven.api.services.PathMatcherFactory

@Named @Singleton public class DefaultPathMatcherFactory extends Object implements org.apache.maven.api.services.PathMatcherFactory
Default implementation of PathMatcherFactory that creates PathSelector instances for filtering files based on include/exclude patterns.

This implementation provides Maven's traditional include/exclude pattern behavior, compatible with Maven 3 plugins like maven-compiler-plugin and maven-clean-plugin.

Since:
4.0.0
  • Constructor Details

    • DefaultPathMatcherFactory

      public DefaultPathMatcherFactory()
  • Method Details

    • createPathMatcher

      @Nonnull public PathMatcher createPathMatcher(@Nonnull Path baseDirectory, Collection<String> includes, Collection<String> excludes, boolean useDefaultExcludes)
      Specified by:
      createPathMatcher in interface org.apache.maven.api.services.PathMatcherFactory
    • createExcludeOnlyMatcher

      @Nonnull public PathMatcher createExcludeOnlyMatcher(@Nonnull Path baseDirectory, Collection<String> excludes, boolean useDefaultExcludes)
      Specified by:
      createExcludeOnlyMatcher in interface org.apache.maven.api.services.PathMatcherFactory
    • deriveDirectoryMatcher

      @Nonnull public PathMatcher deriveDirectoryMatcher(@Nonnull PathMatcher fileMatcher)
      Specified by:
      deriveDirectoryMatcher in interface org.apache.maven.api.services.PathMatcherFactory
    • includesAll

      @Nonnull public PathMatcher includesAll()
      Specified by:
      includesAll in interface org.apache.maven.api.services.PathMatcherFactory