ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fred docouto <bg...@yahoo.fr>
Subject Re: how to make own task that supports nested elements ?
Date Wed, 08 Aug 2001 11:10:37 GMT
I found ...

I have to create the method

createClasspath()

thank you !




--- Peter Donald <donaldp@apache.org> wrote:
> On Wed,  8 Aug 2001 20:09, fred docouto wrote:
> > Hello,
> >
> > I created a task :
> >
> > public class MyTask extends MetchingTask {
> > ...
> >
> > public void setClasspath(Path path){
> >   classpath.append(path)
> > }
> >
> > public void execute() throws BuildException {
> > ...
> > }
> >
> > ...
> > }
> >
> > My build.xml
> >
> > <project .../>
> >
> > <taskdef name="mytask" classname="package.MyTask"/>
> >
> > <target ..
> >   <mytask attribute1="value1 ...>
> >      <classpath>
> >          <pathelement path="aPath"/>
> >      </classpath>
> >   </mytask>
> > </target>
> > </project>
> >
> > And when I run ant, I have :
> >
> > Class package.MyTask doesn't support the nested "classpath" element
> >
> > may anyone help me ?
> 
> Try addClasspath rather than setClasspath and see if that works ;)
> 
> Cheers,
> 
> Pete
> 
> *-----------------------------------------------------*
> | "Faced with the choice between changing one's mind, |
> | and proving that there is no need to do so - almost |
> | everyone gets busy on the proof."                   |
> |              - John Kenneth Galbraith               |
> *-----------------------------------------------------*


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Mime
View raw message