You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Loughran <st...@apache.org> on 2005/09/03 21:17:36 UTC
Re: typedef onerror default
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="checkstyletask.properties"
>>> 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".
>>>
>>>proposal
>>> -we change the "new for ant1.7" default to failall
>>> -we allow for a failuremessage attr that lets you say "add
>>
>>checkstyle
>>
>>>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 ant-contrib.sf.net)
-steve
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org