|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.mojo.wagon.shared.WagonDirectoryScanner
public class WagonDirectoryScanner
Field Summary | |
---|---|
static String[] |
DEFAULTEXCLUDES
Patterns which should be excluded by default. |
Constructor Summary | |
---|---|
WagonDirectoryScanner()
|
Method Summary | |
---|---|
void |
addDefaultExcludes()
Adds default exclusions to the current exclusions set. |
protected boolean |
couldHoldIncluded(String name)
Tests whether or not a name matches the start of at least one include pattern. |
List<String> |
getFilesIncluded()
|
org.apache.maven.plugin.logging.Log |
getLogger()
|
protected boolean |
isExcluded(String name)
Tests whether or not a name matches against at least one exclude pattern. |
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 "**". |
void |
scan()
|
void |
setCaseSensitive(boolean isCaseSensitive)
|
void |
setDirectory(String basePath)
|
void |
setExcludes(String[] excludes)
Sets the list of exclude patterns to use. |
void |
setIncludes(String[] includes)
Sets the list of include patterns to use. |
void |
setLogger(org.apache.maven.plugin.logging.Log logger)
|
void |
setWagon(org.apache.maven.wagon.Wagon wagon)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] DEFAULTEXCLUDES
addDefaultExcludes()
Constructor Detail |
---|
public WagonDirectoryScanner()
Method Detail |
---|
public void setIncludes(String[] includes)
File.separatorChar
, so the separator used need not match File.separatorChar
.
When a pattern ends with a '/' or '\', "**" is appended.
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
.public void setExcludes(String[] excludes)
When a pattern ends with a '/' or '\', "**" is appended.
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
.protected boolean isExcluded(String name)
name
- The name to match. Must not be null
.
true
when the name matches against at least one exclude pattern, or false
otherwise.protected boolean couldHoldIncluded(String name)
name
- The name to match. Must not be null
.
true
when the name matches against the start of at least one include pattern, or
false
otherwise.protected static boolean matchPatternStart(String pattern, String str, boolean isCaseSensitive)
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
.
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.
public void scan() throws org.apache.maven.wagon.WagonException
org.apache.maven.wagon.WagonException
public void addDefaultExcludes()
public List<String> getFilesIncluded()
public void setWagon(org.apache.maven.wagon.Wagon wagon)
public void setCaseSensitive(boolean isCaseSensitive)
public void setDirectory(String basePath)
public org.apache.maven.plugin.logging.Log getLogger()
public void setLogger(org.apache.maven.plugin.logging.Log logger)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |