Supriya Saha ([EMAIL PROTECTED]) wrote:
> Yes it's a problem. My solution is that just before calling the ant task
> define a local property using the parameter ${jars.dir} and use the local
> property.
> Let me know whether it solves your problem or not.
>
> Best of luck,
> Supriyo

I'm not sure I understand.  The property is being used in order to
find the jar containing the task, which is needed when ant reads the
file and immediately creates an instance of the task:

   <taskdef name="sqlfwk3"
           classname="com.gtsdesign.sqlfwk3.ant.Sqlfwk3Taskdef" >
       <classpath>
           <pathelement location="${jars.dir}/sqlfwk3-taskdef.jar"/>
       </classpath>
    </taskdef>

I can't put off use of the classpath!

Can you explain further please?

        Gary

> -----Original Message-----
> From: Gary Shea [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 22, 2001 3:33 PM
> To: [EMAIL PROTECTED]
> Subject: Re: taskdef and <property> declarations
>
> Oops, I don't think I gave enough details!
>
> What I want to write is:
>
>     <taskdef name="sqlfwk3"
>             classname="com.gtsdesign.sqlfwk3.ant.Sqlfwk3Taskdef" >
>         <classpath>
>             <pathelement location="${jars.dir}/sqlfwk3-taskdef.jar"/>
>         </classpath>
>     </taskdef>
>
> but ${jars.dir} (which is actually coming from the calling
> buildfile) doesn't seem to get substituted.  If I replace the
> ${jars.dir} in the taskdef with its value, everything works.  I know
> it's not a problem with ${jars.dir} itself, as the buildfile uses it
> successfully outside the taskdef element.
>
> Regards,
>
>         Gary
>
> T Master ([EMAIL PROTECTED]) wrote:
> > You did imeplement a setFoo() method for an attribute called foo ?
> > e.g. foo="blah"
> >
> > That's how i did it.
> >
> >
> > ----- Original Message -----
> > From: "Gary Shea" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, August 22, 2001 1:05 PM
> > Subject: taskdef and <property> declarations
> >
> >
> > > Hi --
> > >
> > > Today I had the pleasure of getting a custom taskdef working, wow!
> > > Very slick.
> > >
> > > My only issue is that I can't seem to use property values (e.g.,
> > > ${jars.dir}) in the taskdef element.  Am I just missing something, or
> > > is this really not possible?
> > >
> > > Regards,
> > >
> > > Gary Shea
> > > [EMAIL PROTECTED]
> > >
> >
> >
>
>

Reply via email to