|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Query regarding antcall taskHi,
I came to know that with antcall task, the dependencies get executed even though it ran before. For example below, the target "B" gets executed 3 times (ideally it should only once). Is there a way to handle this? Your help will be much appreciated <project name="test" basedir="." default="A"> <target name="A"> <antcall target="buildJar"> <param name="build.dir" value="tools"/> </antcall> <antcall target="buildJar"> <param name="build.dir" value="moduleA"/> </antcall> <antcall target="buildJar"> <param name="build.dir" value="moduleB"/> </antcall> </target> <target name="buildJar" depends="B"> <echo> Inside buildJar: ${build.dir}</echo> </target> <target name="B"> <echo>Inside dependency B</echo> </target> </project> |
|
|
Re: Query regarding antcall taskHi Vishal,
this sort of question should better be asked on the user list. On Wed, 26 Mar 2008, Vishal Kamat <vishalkamat@...> wrote: > Hi, I came to know that with antcall task, the dependencies get > executed even though it ran before. True. Think of <antcall> as starting a new instance of Ant on your build file that doesn't have any idea of which targets have already been executed in your current instance of Ant. > For example below, the target "B" gets executed 3 times (ideally it > should only once). Is there a way to handle this? Don't use <antcall>, in your example <macrodef> what buildJar does and use that. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: Query regarding antcall taskThanks a lot Stefan. Will use the user list from now on.
Vishal On Wed, Mar 26, 2008 at 10:04 PM, Stefan Bodewig <bodewig@...> wrote: > Hi Vishal, > > this sort of question should better be asked on the user list. > > On Wed, 26 Mar 2008, Vishal Kamat <vishalkamat@...> wrote: > > > Hi, I came to know that with antcall task, the dependencies get > > executed even though it ran before. > > True. Think of <antcall> as starting a new instance of Ant on your > build file that doesn't have any idea of which targets have already > been executed in your current instance of Ant. > > > For example below, the target "B" gets executed 3 times (ideally it > > should only once). Is there a way to handle this? > > Don't use <antcall>, in your example <macrodef> what buildJar does and > use that. > > Stefan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@... > For additional commands, e-mail: dev-help@... > > |
| Free Forum Powered by Nabble | Forum Help |