Package org.codehaus.mojo.wagon.shared
Class WagonDirectoryScanner
java.lang.Object
org.codehaus.mojo.wagon.shared.WagonDirectoryScanner
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]Patterns which should be excluded by default. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds default exclusions to the current exclusions set.protected booleancouldHoldIncluded(String name) Tests whether or not a name matches the start of at least one include pattern.org.apache.maven.plugin.logging.Logprotected booleanisExcluded(String name) Tests whether or not a name matches against at least one exclude pattern.protected static booleanmatchPatternStart(String pattern, String str, boolean isCaseSensitive) Tests whether or not a given path matches the start of a given pattern up to the first "**".voidscan()voidsetCaseSensitive(boolean isCaseSensitive) voidsetDirectory(String basePath) voidsetExcludes(String[] excludes) Sets the list of exclude patterns to use.voidsetIncludes(String[] includes) Sets the list of include patterns to use.voidsetLogger(org.apache.maven.plugin.logging.Log logger) voidsetWagon(org.apache.maven.wagon.Wagon wagon)
-
Field Details
-
DEFAULTEXCLUDES
Patterns which should be excluded by default.- See Also:
-
-
Constructor Details
-
WagonDirectoryScanner
public WagonDirectoryScanner()
-
-
Method Details
-
setIncludes
Sets the list of include patterns to use. All '/' and '\' characters are replaced byFile.separatorChar, so the separator used need not matchFile.separatorChar.When a pattern ends with a '/' or '\', "**" is appended.
- Parameters:
includes- A list of include patterns. May benull, indicating that all files should be included. If a non-nulllist is given, all elements must be non-null.
-
setExcludes
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 benull, indicating that no files should be excluded. If a non-nulllist is given, all elements must be non-null.
-
isExcluded
Tests whether or not a name matches against at least one exclude pattern.- Parameters:
name- The name to match. Must not benull.- Returns:
truewhen the name matches against at least one exclude pattern, orfalseotherwise.
-
couldHoldIncluded
Tests whether or not a name matches the start of at least one include pattern.- Parameters:
name- The name to match. Must not benull.- Returns:
truewhen the name matches against the start of at least one include pattern, orfalseotherwise.
-
matchPatternStart
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=**\aandstr=bwill yieldtrue.- Parameters:
pattern- The pattern to match against. Must not benull.str- The path to match, as a String. Must not benull.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
-
setWagon
public void setWagon(org.apache.maven.wagon.Wagon wagon) -
setCaseSensitive
public void setCaseSensitive(boolean isCaseSensitive) -
setDirectory
-
getLogger
public org.apache.maven.plugin.logging.Log getLogger() -
setLogger
public void setLogger(org.apache.maven.plugin.logging.Log logger)
-