ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ovidiu Predescu <>
Subject Re: PROPOSAL: loading tasks from jars for Ant 1.5
Date Wed, 10 Oct 2001 17:49:30 GMT
On Wed, 10 Oct 2001 12:30:29 -0400, "Sam Ruby" <> wrote:

> I don't know if it can be addressed at the same time, but as more projects
> define tasks for their own use, one thing to consider is adding the ability
> to define tasks which are built during the build process.  Perhaps an
> antlib task could allow nested javac and jar elements.  The javac tasks
> would simply be executed in order.  The jar tasks would not only execute
> but the results would be added to the path.

I definitely agree here! We need to have the ability to load new tasks
as we compile them.

A simpler solution to the one proposed above is to this is to allow
antlib to appear inside a <target> element. This way one can write the
build.xml file that builds a new antlib in a target, and makes use of
it in another target. Something like this:

<target name="build">
  <jar jarfile="anttasks.jar">...</jar>

<target name="test" depends="build">
  <antlib lib="anttasks.jar"/>

  <!-- Start using the new tasks here -->

I'm not sure what are the implications with the current class loader
mechanisms, but a solution can probably be worked out.

Ovidiu Predescu <> (inside HP's firewall only) (my SourceForge page) (GNU, Emacs, other stuff)

View raw message