ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: ant target attribute not working
Date Mon, 10 Jul 2000 11:07:26 GMT

You are right. The code works under 1.2.2 but fails under 1.3. There have
been changes to the 1.3 introspection operation which causes properties
defined in super classes to hide properties of the same name (but different
type) in the subclass. This has occurred in the past where we have an
attribute named class. The getClass method in Object made that invisible. In
that case we changed the attribute to classname. In this case I have
committed a patch to change the method name in Task to setOwningTarget().

I might have another look at the Ant introspection code.


Conor MacNeill

-----Original Message-----
From: Phil Hanna []
Sent: Monday, 10 July 2000 13:19
Subject: ant target attribute not working

Somewhere between the June 1 and current build, the "target" attribute of
the "ant" task seems to have stopped working:

<ant dir="sub" target="main2"/>

Class class doesn't support the "target"

The Ant class does indeed have a java.lang.String property named "target",
and it has a proper setTarget(String s) method.  However, its superclass
Task also has a setTarget() method, but the property data type is Target,
not java.lang.String.  This is enough to confuse the BeanInfo into ignoring
the setTarget() method in Ant.

It definitely works in the June 1 version, but I can't tell why - the
configure() method in ProjectHelper was not changed.

Any ideas?

View raw message