ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus M. May" <m...@gmx.net>
Subject Re: antcall / depends
Date Thu, 19 Oct 2006 15:38:47 GMT
Hello,

this is going to be nearly the same as restructuring the build process, since we have more
then one component, using these targets. I am currently digging deeper into this, and hope,
that I can restructure the build tonight. This is going to get a long night :-(


-------- Original-Nachricht --------
Datum: Thu, 19 Oct 2006 16:04:06 +0100
Von: "Peter Reilly" <peter.kitt.reilly@gmail.com>
An: "Ant Users List" <user@ant.apache.org>
Betreff: Re: antcall / depends

> On 10/19/06, Markus M. May <mmay@gmx.net> wrote:
> > Hello,
> > I am currently facing a massive OutOfMemoryException problem. I know
> that this is, because we are using ANTCALL quite heavily.
> > We have e.g. the following structure:
> >
> > TargetA
> >   depends on init (via depend)
> >   calls TargetB and TargetC (via antcall)
> > TargetB
> >   depends on init (via depend)
> > TargetC
> >   depends on init (via depend)
> >
> > Therefor for each antcall we call the target init. Since there are
> taskdefs in the init-target, there is quite some memory leak. Is there some way,
> to not call the depends, once they are called, another time?
> 
> Make the target "init" have an unless attribute:
> 
> <target name="init" unless="initialized">
> </target>
> 
> <target name="A" depends="init">
>     <antcall target="B">
>          <param name="initialized" value="true"/>
>     </antcall>
>     <antcall target="C">
>          <param name="initialized" value="true"/>
>     </antcall>
> </target>
> 
> 
> Or, if antcall is called with inheritAll="true" (the default)
> 
> <target name="init" unless="initialized">
>   ...
>   <property name="initialized" value="yes, I am"/>
> </target>
> 
> <target name="A" depends="init">
>     <antcall target="B"/>
>     <antcall target="C"/>
> </target>
> 
> <target name="B" depends="init">
> </target>
> <target name="C" depends="init">
> </target>
> 
> Peter
> 
> 
> > I know, that we should restructure our build, but currently we are
> facing a timely issue, so this is not an option anyway :-(
> >
> > Any help is appreciated.
> >
> > R,
> >
> > Markus M. May
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message