Class WagonDirectoryScanner

java.lang.Object
org.codehaus.mojo.wagon.shared.WagonDirectoryScanner

public class WagonDirectoryScanner extends Object
  • Field Details

    • DEFAULTEXCLUDES

      public static final String[] DEFAULTEXCLUDES
      Patterns which should be excluded by default.
      See Also:
  • Constructor Details

    • WagonDirectoryScanner

      public WagonDirectoryScanner()
  • Method Details

    • setIncludes

      public void setIncludes(String[] includes)
      Sets the list of include patterns to use. All '/' and '\' characters are replaced by File.separatorChar, so the separator used need not match File.separatorChar.

      When a pattern ends with a '/' or '\', "**" is appended.

      Parameters:
      includes - A list of include patterns. May be null, indicating that all files should be included. If a non-null list is given, all elements must be non-null.
    • setExcludes

      public void setExcludes(String[] excludes)
      Sets the list of exclude patterns to use. All '\' characters are replaced by '/'

      When a pattern ends with a '/' or '\', "**" is appended.

      Parameters:
      excludes - A list of exclude patterns. May be null, indicating that no files should be excluded. If a non-null list is given, all elements must be non-null.
    • isExcluded

      protected boolean isExcluded(String name)
      Tests whether or not a name matches against at least one exclude pattern.
      Parameters:
      name - The name to match. Must not be null.
      Returns:
      true when the name matches against at least one exclude pattern, or false otherwise.
    • couldHoldIncluded

      protected boolean couldHoldIncluded(String name)
      Tests whether or not a name matches the start of at least one include pattern.
      Parameters:
      name - The name to match. Must not be null.
      Returns:
      true when the name matches against the start of at least one include pattern, or false otherwise.
    • matchPatternStart

      protected static boolean matchPatternStart(String pattern, String str, boolean isCaseSensitive)
      Tests whether or not a given path matches the start of a given pattern up to the first "**".

      This is not a general purpose test and should only be used if you can live with false positives. For example, pattern=**\a and str=b will yield true.

      Parameters:
      pattern - The pattern to match against. Must not be null.
      str - The path to match, as a String. Must not be null.
      isCaseSensitive - Whether or not matching should be performed case sensitively.
      Returns:
      whether or not a given path matches the start of a given pattern up to the first "**".
    • scan

      public void scan() throws org.apache.maven.wagon.WagonException
      Throws:
      org.apache.maven.wagon.WagonException
    • addDefaultExcludes

      public void addDefaultExcludes()
      Adds default exclusions to the current exclusions set.
    • getFilesIncluded

      public List<String> getFilesIncluded()
    • setWagon

      public void setWagon(org.apache.maven.wagon.Wagon wagon)
    • setCaseSensitive

      public void setCaseSensitive(boolean isCaseSensitive)
    • setDirectory

      public void setDirectory(String basePath)
    • getLogger

      public org.apache.maven.plugin.logging.Log getLogger()
    • setLogger

      public void setLogger(org.apache.maven.plugin.logging.Log logger)