|
@@ -67,6 +67,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; |
|
@@ -131,6 +132,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; |
|
|
} |
|
|
} |
|
@@ -228,7 +232,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()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -919,4 +927,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"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |