ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Dawson <tdaw...@wamnet.com>
Subject RE: PROPOSAL: loading tasks from jars for Ant 1.5
Date Wed, 10 Oct 2001 18:37:19 GMT
> -----Original Message-----
> From: Ovidiu Predescu [mailto:ovidiu@cup.hp.com]
> Sent: Wednesday, October 10, 2001 12:50 PM
> To: Sam Ruby
> Cc: ant-dev@jakarta.apache.org
> Subject: Re: PROPOSAL: loading tasks from jars for Ant 1.5 
> 
> 
> 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 guess this was my original intent -- there's a separate thread in which I
voice my dislike for top-level tasks not wrapped in a target -- when I would
have used the antlib task, I would have planned to insert it into an init
target anyway.  Sorry for my lack of clarity.

> 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