0

i want to run few targets of ANT build in parallel. here is the code i tried

<project name="cis" default="release">

    <property name="Run_excecuted" value="false"/> 

    <target name="run_main">
        <sequential>
            <parallel> 
                <antcall target="dashboard" /> 
                <antcall target="remTraces" /> 
                <param name="Run_excecuted" value="true"/> 
            </parallel> 
        </sequential> 
    </target> 

I have set a property Run_excecuted in the build and have added the condition unless="Run_excecuted" in the required targets

<target name="dashboard" depends="prepare" unless="Run_excecuted">
<target name="remTraces" depends="prepare" unless="Run_excecuted"> 

what is happening is the antcalls are getting invoked in separate instances parallely and the dependencies are getting calculated again. Because of this target "prepare" is running multiple times. i dont want this to happen.How can i do this? property Run_excecuted being set is not helping.

thekbb
  • 7,668
  • 1
  • 36
  • 61
user2831237
  • 263
  • 2
  • 3
  • 6
  • the parallel task executes tasks in parallel - not targets. As you've found the antcall task is rarely a good idea. It may be a good idea to make the dashboard and remTraces targets macrodefs. Can you put more of your build.xml in the question? – thekbb Oct 31 '13 at 14:23
  • Thanks thekbb. but i want targets themselves to be run in parallel. let me know if there is a way to do it. i tried for loop but there are issues with antcalls to targets as the dependencies are getting called over and over again for each target :( – user2831237 Nov 13 '13 at 05:24

0 Answers0