ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Tchepannou <melli...@gmail.com>
Subject Re: What is the difference between a nested element and a nested type?
Date Fri, 10 Jun 2005 08:37:45 GMT
Thanks guys for your support, its been a great help.

Peter, I was able to view my code and I had it right from the
begining. The main problem was, as you guessed, that the loaderref
attribute was missing.
I can now run ant FROM THE CONSOLE against my buildfile and it looks
much better.



On 6/9/05, Peter Reilly <peterreilly@apache.org> wrote:
> Eric Tchepannou wrote:
> 
> > Hi Peter,
> >
> >As my base class is an abstract class, I have no interest to use a <base />
> >My hope is to do the following:
> >
> > ---- Reflect.java --
> > package my;
> >
> > public class Reflect extends org.apache.tools.ant.Task {
> >     List types = new ArrayList();
> >     public void add(BaseType bt) {
> >          types.add(bt);
> >     }
> > }
> >
> >----BaseType.java------
> >package my;
> >
> >public abstract BaseType implements IType {
> >   ...
> >}
> >
> >----ConcreteType1|2.java------
> >package my;
> >
> >public ConcreteType1|2 extends BaseType {
> >   ...
> >}
> >
> > ---- build.xml ---
> >   <target name="reflect" depends="compile">
> >     <taskdef name="reflect" classname="my.Reflect"
> >              classpath="classes" loaderref="my.loaderref"/>
> >     <typedef name="concete1|2" classname="my.ConcreteType1|2"
> >              classpath="classes" loaderref="my.loaderref"/>
> >     <reflect>
> >       <concrete1/>
> >       <concrete2/>
> >     </reflect>
> >   </target>
> > ..
> >
> >Does this make sense?
> >
> >
> Yes, it is in fact the reason that the add(javaclass x) reflection
> method was
> added in ant 1.6.!
> 
> Peter
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


-- 
Best Regards,
Eric Tchepannou

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message