Methods Summary |
---|
public void | execute()Does the work.
if (!defaultrequested && add.equals("") && remove.equals("") && !echo) {
throw new BuildException("<defaultexcludes> task must set "
+ "at least one attribute (echo=\"false\""
+ " doesn't count since that is the default");
}
if (defaultrequested) {
DirectoryScanner.resetDefaultExcludes();
}
if (!add.equals("")) {
DirectoryScanner.addDefaultExclude(add);
}
if (!remove.equals("")) {
DirectoryScanner.removeDefaultExclude(remove);
}
if (echo) {
StringBuffer message
= new StringBuffer("Current Default Excludes:");
message.append(StringUtils.LINE_SEP);
String[] excludes = DirectoryScanner.getDefaultExcludes();
for (int i = 0; i < excludes.length; i++) {
message.append(" ");
message.append(excludes[i]);
message.append(StringUtils.LINE_SEP);
}
log(message.toString(), logLevel);
}
|
public void | setAdd(java.lang.String add)Pattern to add to the default excludes
this.add = add;
|
public void | setDefault(boolean def)go back to standard default patterns
defaultrequested = def;
|
public void | setEcho(boolean echo)If true, echo the default excludes.
this.echo = echo;
|
public void | setRemove(java.lang.String remove)Pattern to remove from the default excludes.
this.remove = remove;
|