ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ovidiu Predescu <ovi...@cup.hp.com>
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" <rubys@us.ibm.com> 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">
  <javac>...</javac>
  <jar jarfile="anttasks.jar">...</jar>
</target>

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

  <!-- Start using the new tasks here -->
  ...
</target>

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


Regards,
-- 
Ovidiu Predescu <ovidiu@cup.hp.com>
http://orion.rgv.hp.com/ (inside HP's firewall only)
http://sourceforge.net/users/ovidiu/ (my SourceForge page)
http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff)

Mime
View raw message