"typedef" does not appear to be working in ant 1.4.1 (See bug 4452). I found that "typedef" was fixed for ant 1.5.
I had to modify the default.properties file in the types package manually for ant 1.4.1 to make my typedef visible to ant. I asked here for a workaround but none was posted. hth, don. -----Original Message----- From: Steve Loughran [mailto:[EMAIL PROTECTED]] Sent: Monday, April 22, 2002 7:46 PM To: Ant Users List Subject: Re: Runtime defined datatypes help. ----- Original Message ----- From: "Nino Walker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 22, 2002 9:54 AM Subject: Runtime defined datatypes help. > Hi, > > I've been trying to use <typedef> to define type at runtime, but, it seems, > I can't declare an instance of the type. The type is registered w/ the > project, but Ant's UnknownElement barfs when it tries to handle the > <srcrule> tag. > > My build file looks something like this: > > <project> > ... > <typedef name="srcrule" classname="...SomeSrcRuleImpl"> > <classpath ... /> > </typedef> > > <srcrule id="my.srcrule" aproperty="value" /> > ... > <target> > <mytask> > <outputrule refId="my.srcrule" /> > </mytask> > </target> > > > Is there something patently wrong with this? It's not a classpath issue, as > the type is loaded... try using it inside a target, rather than outside...I think you need to be running ant1.5 to use a new datatype outside a target -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
