How to specify a list of folders for a subant task

I need to be able to call the subant task in a predefined list of project folders, which may or may not be siblings.

I know that I can invoke the subtitle task as follows:

<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 the β€œprojects” are siblings in the file system, but it may not be so, so I need a way to tell the suband an explicit list of folders by absolute paths to search for custom-build.xml files to execute.

+4
source share
1 answer

Adding a larger list file , one for each path, for example:

 <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> 
+3
source

All Articles