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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to