ant-dev mailing list archives

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

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


--
Conor MacNeill
Home: conor@m64.com
Work: conor@cortexebusiness.com.au
Web:  www.cortexebusiness.com.au


-----Original Message-----
From: Phil Hanna [mailto:phanna@ipass.net]
Sent: Monday, 10 July 2000 13:19
To: ant-dev@jakarta.apache.org
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 org.apache.tools.ant.taskdefs.Ant doesn't support the "target"
property
        at
org.apache.tools.ant.ProjectHelper.configure(ProjectHelper.java:451)

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?


Mime
View raw message