tags:

views:

159

answers:

1

I need to be able to call a subant task on a prespecified list of project folders which may or may not be siblings.

I know I can call subant task like this:

<subant antfile="custom-build.xml" target="custom-target" 
        inheritall="false" failonerror="true">
  <filelist dir="${parent.dir}">
    <file name="project1"/>
    <file name="project2"/>
    ...
    <file name="projectn"/>
  </filelist>
</subant>

This is fine, if all "projects" are siblings in the filesystem, but it might not be the case, so I need a way to tell subant the explicit list of folders by absolute pathnames to look for the custom-build.xml files to execute.

+1  A: 

Adding more filelist, one for each path, like this:

<subant antfile="custom-build.xml" target="custom-target" 
    inheritall="false" failonerror="true">

 <filelist dir="${parent.dir}">
   <file name="project1"/>
   <file name="project2"/>
   ...
   <file name="projectn"/>
 </filelist>

 <filelist dir="${another.parent.dir}">
   <file name="projectA"/>
   <file name="projectB"/>
   ...
   <file name="projectZ"/>
 </filelist>

</subant>
rodrigoap
okay, it's ugly, but it works... thanks
Roland Tepp