This doesn't seem right to me. The "Using Ant" chapter of the "Ant User Manual" has always seemed pretty clear on the subject:
"In a chain of dependencies stretching back from a given target [...] each target gets executed only once, even when more than one target depends on it." See text paragraph five of: http://ant.apache.org/manual/using.html#targets So shouldn't Laurie's "init" target only be executed once (without having to fiddle with mysterious undocumented Ant settings)?!?!? ===== On 2005-05-07 Matt Benson wrote: Laurie: Since Ant 1.6.3 you can have this behavior by setting the magic property "ant.executor.class" to "org.apache.tools.ant.helper.SingleCheckExecutor". This is not documented in the 1.6.3 manual as was intended, however. The situation will be corrected in the next release. Thanks, Matt --- Laurie Harper <[EMAIL PROTECTED]> wrote: > It's been a while since I've written an Ant build > file, so I may be > missing something obvious here... can anyone shine a > light for me? I > have targets that have common dependencies and if I > try to run them in a > single invocation Ant executes the common dependency > repeatedly. > > Here's an example: > > $ cat build.xml > <project default="target2"> > <target name="init"> > <echo message="init"/> > </target> > > <target name="target1" depends="init"> > <echo message="target1"/> > </target> > > <target name="target2" depends="init"> > <echo message="target2"/> > </target> > </project> > > $ ant target1 target2 > Buildfile: build.xml > > init: > [echo] init > > target1: > [echo] target1 > > init: > [echo] init > > target2: > [echo] target2 > > BUILD SUCCESSFUL > Total time: 1 second > $ > > > I was only expecting 'init' to be run once... that's > the way I remember > things working. Am I doing something wrong, or is > Ant? > > Thanks, > > L. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]