ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Hunsicker" <developm...@hunsicker.de>
Subject DependSet fails if specified target directory does not exist
Date Tue, 14 May 2002 19:59:13 GMT
Hi all,

I'm using targets like

<target name="build-uptodate-console-bundle">

    <!-- <mkdir dir="${TMP.DIR}/console~/docs" /> -->
    <dependset>
      <srcfileset dir="${TMP.DIR}/docs~" />
      <targetfileset dir="${TMP.DIR}/console~/docs" />
    </dependset>

    <condition property="uptodate.console.bundle">
      <and>
        <available file="${TMP.DIR}/console~/docs/index.html" />
	  [...]
      </and>
    </condition>
</target>

to implement incremental building. The task fails if the directory
specified for the targetfileset does not exist. DependSet throws a
BuildException similar to

D:\Usr\Local\Development\jalopy\build\build.xml:644:
D:\Usr\Local\Development\jalopy\tmp~\console~\docs not found.
        at
org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractF
ileSet.java:321)
        at
org.apache.tools.ant.taskdefs.DependSet.execute(DependSet.java:193)
        [...]

I would state this behaviour as a bug, because a missing target
directory actually means the source files (specified in the
sourcefileset) are newer than the target files (ok, they don't exist
but it literally means the same: they need to be generated) and
therefore DependSet should handle these case.

Currently, I have to add <mkdir> calls to these kind of targets (or in
a global init) to workaround the problem which is not a big deal but
not needed otherwise and complicates my build script (I use lots of
<depenset> calls) . 

It would be easy to change this behaviour. If someone can agree with me
regarding this issue, I can file a bug report and provide a fix.

Cheers,
Marco


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message