ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Close" <acl...@gmail.com>
Subject Parallel task...
Date Wed, 24 Jan 2007 19:02:07 GMT
hi all,

i'm looking at the use of the parallel task to run some optional jobs
during my build.  this looks like it would be perfect for doing things
like javadoc, junit, jprobe, etc. however, i would like to be able to
switch my optional tasks so that they are only run if a flag was set.
currently i have each of them in their own target and use the
if="flag_set" attribute in the target.  but this doesn't allow me to
run them in parallel.  is there a way to run these as 'switched' tasks
within a parallel target?

current implementation:

<target name="junit" depends="package" if="run_junit">
  <ant antfile="junit.xml />
</target>

<target name="javadoc" depends="package" if="run_javadoc">
  <ant antfile="javadoc.xml" />
</target>

how do i:

<target name="optional_tasks" depends="package">
  <parallel threadcount="4">

    if (run_junit) {
    <ant antfile="junit" />
    }

    if (run_javadoc) {
    <ant antfile="javadoc" />
    }
  </parallel>
</target>


thanks for any help
andy

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message