ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: having datatypes load classes
Date Tue, 08 Apr 2003 21:38:36 GMT
See http://marc.theaimsgroup.com/?l=ant-dev&m=104870800508326&w=2 
And http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17199

I prefer the first link, since I'm the author of it, but the second link
addresses the same issue. If your <xmlfilter> elements do not need any
configurations though, it may be overkill. That's for you to decide. --DD

-----Original Message-----
From: Marc Portier [mailto:mpo@outerthought.org] 
Sent: Tuesday, April 08, 2003 4:35 PM
To: dev@ant.apache.org
Subject: having datatypes load classes 

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"/>
   </xmlchain>
</target>

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 
here....

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:
http://marc.theaimsgroup.com/?l=ant-dev&m=104024233924058&w=2
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.

regards,
-marc=
-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at              http://radio.weblogs.com/0116284/
mpo@outerthought.org                              mpo@apache.org


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

Mime
View raw message