If it is not a little too late, I would like to get a vote
on including classloader into ant 1.7.
(http://issues.apache.org/bugzilla/show_bug.cgi?id=28228)
I have been playing with it the last week or so. It really makes
working with antlibs, and scripting different languages very
nice. For example: Rather that having a lot of jar files in ~/.ant/lib, I
can
have a number of directories that contain all that is needed
for a particular language and load that into the build file. using a macro

   <macrodef name="load-lang">
       <attribute name="lang"/>
       <sequential>
           <classloader loader="project">
               <classpath>
                   <fileset dir="${user.home}/script-lang/@{lang}"/>
               </classpath>
           </classloader>
       </sequential>
   </macrodef>

This is especially true for working with JDK 1.6 scripting - one needs
an extra jar file for each language.

I have been using classloader with netbeans, and my worry before about
it messing up the classloader does not seem to be true. In fact, for groovy
and ruby the start up cost of the language is done once, and after that
scripts run very fast.

Peter

Reply via email to