ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sam.hendley" <>
Subject Copying multiple source trees without loops
Date Thu, 08 Feb 2007 00:46:59 GMT

I have been hacking at this problem for about an hour and I have to believe
that there must just be something basic I am missing. I am rewriting our
build scripts to be more maintainable, useful and faster. I am trying to
avoid using antcontrib this time as all the loops and antcalls I had were
killing the performance of the script. Anyways here is the situation, I have
the source for different builds spread out over a few source directories
which I then collect in temporary directory before compiling. Lets say they
look like this: 
	shared\  main source tree
	custom1\ custom source tree1
	custom2\ custom source tree2
	devices\ holds the device specific source files
Each directory contains contains a full package directory heirarchy so when
theyre all copied to the same place the packages will all line up. In my old
build system I did it like this:
<target name="GetOneTree">
	<echo message="Checking ${base}/${dir} for ${includesList} minus
${excludesList} to ${outputDir}"
	<copy todir="${outputDir}" overwrite="true">
		<fileset dir="${base}/${dir}"
<target name="GetSources" if="src.outOfDate">
	<delete failonerror="false">
		<fileset dir="${temp.dir}/src" />
	<var name="includesList" value="${target.src.includesList}" />
	<var name="excludesList" value="${target.src.excludesList}" />
	<var name="outputDir" value="${src.tempDir}" />
	<foreach list="${target.src.dirList}"

Where target.src.includesList would equal a list of the source directories I
would want to run through for that build. 
Example: target.src.includesList=src/,custom1/,devices/device1/

I feel like it should be possible to do something with patternset, mappers
and copy but I have had no luck in figuring it out yet. Anyone have any
ideas? Thanks.
View this message in context:
Sent from the Ant - Users mailing list archive at

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

View raw message