ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject RE: TaskAdapter broken ?
Date Thu, 11 Oct 2001 23:59:29 GMT
Costin,

As I read the code, it looks like it will call SetProject if it exists but
not if it doesn't.

    Class c = proxy.getClass();
    setProjectM =
        c.getMethod( "setProject", new Class[] {Project.class});
    if(setProjectM != null) {
        setProjectM.invoke(proxy, new Object[] {project});
    }

How is this failing for you?

Conor



> -----Original Message-----
> From: costinm@covalent.net [mailto:costinm@covalent.net]
> Sent: Friday, 12 October 2001 9:49 AM
> To: ant-dev@jakarta.apache.org
> Subject: TaskAdapter broken ?
>
>
> One nice feature in ant1.3 was the ability to use tasks that do not
> 'depend' on ant - i.e. generic beans, using the ant patterns
> (execute, setters ), but completely independent of ant ( in
> import ).
>
> This worked via TaskAdapter - but recently that changed, it now
> has a setProject() - which requires the task to define that
> method.
>
> There are few possible solutions:
> - remove the setProject call.
>
> - change it to setProject(Object)
>
> - ignore the exception
>
> I could implement any of those, but I need first to understand
> why the method was added in the first place.
>
> Thanks,
> Costin
>
>


Mime
View raw message