Using the <ant> task will actually execute a new ant process for each target, which means that in that particular ant process, init has never been called - thus it gets called every time.
The depends line you have in your previous mail is still the best way to go - the "prepare something" step should probably be in your sendReport target, or in another target that sendReport depends on. On Wed, Jun 25, 2008 at 9:38 AM, Guy Catz <[EMAIL PROTECTED]> wrote: > I want to run the most trivial build process - > init, and - clean, compile, sendReport which depend on init. > > Now, I've wrote a MAIN target - > <target name="MAIN"> > <ant ... clean /> > <ant ... compile /> > > <if result is ok, then prepare something> > > <ant ... sendReport /> > </target> > > The problem - init is being called three times. > > I know that the best way to do it is <target name="main" depends="init, > clean, compile, sendReport" /> > > but the problem is that I have to do something between the compile and the > sendReport targets. > > how can I accomplish this? > > Please advise. > > Thanks, > Guy. > -- Groucho Marx - "A child of five would understand this. Send someone to fetch a child of five."
