will be used for the first time. This will enable things like
<project default="main">
<fileset dir="tmp" id="tmpfiles">
<target name="prep">
<mkdir dir="tmp" />
</target>
<target name="main" depends="prep">
<copy todir="foo">
<fileset refid="tmpfiles" />
</copy>
</target>
</project>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268830 13f79535-47bb-0310-9956-ffa450edef68
master
| @@ -29,6 +29,10 @@ Fixed bugs: | |||||
| * <delete includeemptydirs="true"> now deletes more than just the leaf | * <delete includeemptydirs="true"> now deletes more than just the leaf | ||||
| directories. | directories. | ||||
| * You can now specify a <fileset> for a directory that doesn't exist at | |||||
| declaration time but will created before the fileset gets used for the | |||||
| first time. | |||||
| Changes from Ant 1.2 to Ant 1.3 | Changes from Ant 1.2 to Ant 1.3 | ||||
| =========================================== | =========================================== | ||||
| @@ -116,12 +116,6 @@ public class FileSet extends DataType { | |||||
| throw tooManyAttributes(); | throw tooManyAttributes(); | ||||
| } | } | ||||
| if (!dir.exists()) { | |||||
| throw new BuildException(dir.getAbsolutePath()+" not found."); | |||||
| } | |||||
| if (!dir.isDirectory()) { | |||||
| throw new BuildException(dir.getAbsolutePath()+" is not a directory."); | |||||
| } | |||||
| this.dir = dir; | this.dir = dir; | ||||
| } | } | ||||
| @@ -242,6 +236,13 @@ public class FileSet extends DataType { | |||||
| throw new BuildException("No directory specified for fileset."); | throw new BuildException("No directory specified for fileset."); | ||||
| } | } | ||||
| if (!dir.exists()) { | |||||
| throw new BuildException(dir.getAbsolutePath()+" not found."); | |||||
| } | |||||
| if (!dir.isDirectory()) { | |||||
| throw new BuildException(dir.getAbsolutePath()+" is not a directory."); | |||||
| } | |||||
| DirectoryScanner ds = new DirectoryScanner(); | DirectoryScanner ds = new DirectoryScanner(); | ||||
| setupDirectoryScanner(ds, p); | setupDirectoryScanner(ds, p); | ||||
| ds.scan(); | ds.scan(); | ||||