You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Earl Hood <ea...@gmail.com> on 2013/12/13 20:55:25 UTC

Bug in task? Directory portion of a srcfile does not exist

Ant version: 1.8.4

When using <uptodate>, if I have a <srcfiles file="..."/>, and the
dirname portion of the pathname does not exist, uptodate causes a
project build failure.

For example, if the pathname is "C:\Whatever\Directory\file.txt" and
"C:\Whatever\Directory" does not exists, build failure.

There is no problem if the file itself is not present (the dirname
portion exists, but the base file does not). I believe uptodate should
not fail in the scenario described above.

Is this a legitimate bug?

--ewh

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


Re: Bug in task? Directory portion of a srcfile does not exist

Posted by Earl Hood <ea...@gmail.com>.
On Fri, Dec 13, 2013 at 1:55 PM, I wrote:

> When using <uptodate>, if I have a <srcfiles file="..."/>, and the
> dirname portion of the pathname does not exist, uptodate causes a
> project build failure.
...

Nevermind.  After digging through Ant source and documentation, I
realized one needs to set the erroronmissingdir="false" (available since
Ant 1.7.1) attribute on <srcfiles> (which is a fileset) so an exception
will not be thrown if the directory does not exist.

I'm guessing the reason that erroronmissingdir is not false by default
is for backwards compatibility.

Sorry for the interruption,

--ewh

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