ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: Location in non-Task tasks
Date Mon, 11 Sep 2006 15:27:26 GMT
Stefan Bodewig wrote:
> Hi,
> I just added the feature to print the line number an error occured on
> in AntUnit's plainlistener.
> I must admit that my error messages are sometimes not chosen well
> enough so having the line number to know which assertion in a longer
> testcase failed helps me a lot in J/NUnit.  I wanted to provide the
> same functionality to AntUnit.
> Unfortunately AssertTask extends ConditionBase and thus gets wrapped
> in a TaskAdapter.  This means it doesn't know where it is (inside of
> the build file) and cannnot add the information to the exception it
> throws.
> I'd like to do the following:
> (1) push the Location handling from Task down to ProjectComponent
> (2) Modify TaskAdapter to reflect Location into the wrapped task much
> like it reflects the Project instance into it right now.
> Does anybody object here?  An alternative to (1) would be to copy the
> logic from Task to ConditionBase.

Or to have a ConditionTaskBase extends Task. not having condition base 
extends task causes lots of fun whenever you have any component that 
takes a ref to a nested task with an addTask(Task) thing.

> (3) I'd like to take advantage of these changes in AssertTask.
> The later would either mean 
> * AntUnit 1.0beta1 had to wait until after Ant 1.7.0beta2 (or RC1 or
>   whatever) was released
> or
> * we'd release AntUnit 1.0beta1 without my change (3) and modify
>   AssertTask once a matching Ant release was out.

+1 for having releases of antunit in sync with the public betas.

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

View raw message