ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Close" <>
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 name="javadoc" depends="package" if="run_javadoc">
  <ant antfile="javadoc.xml" />

how do i:

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

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

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

thanks for any help

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message