ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: typedef onerror default
Date Sat, 03 Sep 2005 19:17:36 GMT
Jose Alberto Fernandez wrote:
>>Steve Loughran wrote:
>>>Why is the onerror default of typedef "fail" and not "failall"?
>>>The effect is that a typedef like this
>>>    <typedef resource=""
>>>             uri="antlib:com.puppycrawl.checkstyle"
>>>     />
>>>will warn but not fail if the property file is missing. Surely a
>>>missing declaration file is important enough that the 
>>default should 
>>>be "fail the build right now".
>>> -we change the "new for ant1.7" default to failall
>>> -we allow for a failuremessage attr that lets you say "add 
>>>to your build via -lib" or whatever.
> This is not necessarily an error. As in some of my buildfiles, the same 
> build may create a library with utility tasks which are typedef'd 
> and use those tasks to do other things. 
> In such an environment, you do not want the code to fail on the typedef
> but only when you try to use something that is not defined.
> So a warning is appropriate, and I do not see any reason to change it.

I see that, and I see the BC issue. But I also see that when you use 
antlib URIs, you are declaring tasks with onerror=ignore everywhere, so 
only need to taskdef very late.

Maybe if people say antlib="something" as peter suggested, then the 
default is failall. we could even add a test message for failures 
(nested?) that can contain text or URLs for explaining what to do on 
failure( e.g. download from


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message