|
@@ -70,6 +70,7 @@ public abstract class AbstractFileSet extends DataType |
|
|
private List<FileSelector> selectors = new ArrayList<FileSelector>(); |
|
|
private List<FileSelector> selectors = new ArrayList<FileSelector>(); |
|
|
|
|
|
|
|
|
private File dir; |
|
|
private File dir; |
|
|
|
|
|
private boolean fileAttributeUsed; |
|
|
private boolean useDefaultExcludes = true; |
|
|
private boolean useDefaultExcludes = true; |
|
|
private boolean caseSensitive = true; |
|
|
private boolean caseSensitive = true; |
|
|
private boolean followSymlinks = true; |
|
|
private boolean followSymlinks = true; |
|
@@ -134,6 +135,9 @@ public abstract class AbstractFileSet extends DataType |
|
|
if (isReference()) { |
|
|
if (isReference()) { |
|
|
throw tooManyAttributes(); |
|
|
throw tooManyAttributes(); |
|
|
} |
|
|
} |
|
|
|
|
|
if (fileAttributeUsed && !getDir().equals(dir)) { |
|
|
|
|
|
throw dirAndFileAreMutuallyExclusive(); |
|
|
|
|
|
} |
|
|
this.dir = dir; |
|
|
this.dir = dir; |
|
|
directoryScanner = null; |
|
|
directoryScanner = null; |
|
|
} |
|
|
} |
|
@@ -231,7 +235,11 @@ public abstract class AbstractFileSet extends DataType |
|
|
if (isReference()) { |
|
|
if (isReference()) { |
|
|
throw tooManyAttributes(); |
|
|
throw tooManyAttributes(); |
|
|
} |
|
|
} |
|
|
|
|
|
if (getDir() != null) { |
|
|
|
|
|
throw dirAndFileAreMutuallyExclusive(); |
|
|
|
|
|
} |
|
|
setDir(file.getParentFile()); |
|
|
setDir(file.getParentFile()); |
|
|
|
|
|
fileAttributeUsed = true; |
|
|
createInclude().setName(file.getName()); |
|
|
createInclude().setName(file.getName()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -943,4 +951,8 @@ public abstract class AbstractFileSet extends DataType |
|
|
setChecked(true); |
|
|
setChecked(true); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private BuildException dirAndFileAreMutuallyExclusive() { |
|
|
|
|
|
return new BuildException("you can only specify one of the dir and file attributes"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |