ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject classloader for 1.7
Date Tue, 22 Aug 2006 13:24:13 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message