Are you putting <ant> calls into your build.xml to call your targets?
You should have something like this: <target name="init"> [...] </target> <target name="clean"> [...] </target> <target name="compile" depends="init"> [...] </target> <target name="sendReport" depends="init,compile"> [...] </target> <target name="complete" depends="clean sendReport"/> Running "ant complete" will run "init", "clean", "compile", and "sendReport" only once. If you call multiple targets on the command line, or use <ant> tasks, you will get multiple calls because each target is executed separately. Note that I only "complete" depending upon "clean". You usually don't force a "clean" or you break your build dependency checking. Here's my test build.xml: <project name="test" default="complete" basedir="."> <target name="init"/> <target name="clean"/> <target name="compile" depends="clean,init"/> <target name="sendReport" depends="init,compile"/> <target name="complete" depends="init,sendReport"/> </project> Try running "ant compile", "ant sendReport" and "ant complete". -- David Weintraub [EMAIL PROTECTED] 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. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]