ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <>
Subject having datatypes load classes
Date Tue, 08 Apr 2003 21:34:56 GMT
Hi all,

I'm writing some Ant task that requires the flexibility of having 
nested data-types that can load their own classes.

<target name="test" depends="-init" >
   <xmlchain toDir="./build/chain" extension=".xxx">
     <fileset refid="workOnStuf" />
     <xmlfilter classname="org.outerj.xml.XIncludeFilter" />
     <xmlfilter refid="other-filter"/>

For sure I will need to have the @classpathref and nested 
<classpath> to actually get doing it, but since that pattern is 
to be seen more around ant iteself, I was hoping for some reuse 

What I have found is the o.a.t.a.taskdefs.Definer which functions 
as a basis for the Taskdef and Typedef tasks
But has a somewhat awkward execute() in there to be properly used 
inside this new xmlfilter datatype I foresee.

I would hate duplicating/porting the Definer code into my own 
class here, so maybe there could be some ClassPathHelper object 
that can come to aid both? (But then that is probably just saying 
that the existing Path could have a method getClassLoader() ?)

Looking out for some similar questions I have come across this 
elder thread:
which definitely touches the issue somewhat

any advice is welcome,
I have a real issue I want to tackle asap, but I like to consider 
returning the effort of your good thoughts into some actual 
contribution if such would be appreciated.

Marc Portier                  
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                        

View raw message