ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Grey <haam...@haamdhani.com>
Subject Re: ant script task examples
Date Fri, 01 Oct 2004 13:54:33 GMT
I do something similar below. Using Ant Contrib optional library. This can be modified so that
the srcFile has the directory contents in it etc.

		<loadfile srcFile="update.txt" property="sql.update.scripts">
			<filterchain>
				<tokenfilter>
					<replacestring from="${pvcs.project.profile}" to="${profileHome}" />
					<replacestring from="${previous.label}:=" to="" />
					<trim />
				</tokenfilter>
			</filterchain>
		</loadfile>
		
		<!-- loop through scripts, executing each -->
		<ac:if>
			<isset property="sql.update.scripts" />
			<ac:then>
				<ac:for delimiter="${line.separator}" param="sql.script" list="${sql.update.scripts}">
					<sequential>
						<echo message="Running @{sql.script} ..." />
						<antcall target="RunSQLScript">
							<param name="sql.script" value="@{sql.script}" />
						</antcall>
					</sequential>
				</ac:for>
			</ac:then>
		</ac:if>


--
Richard Grey
--


--- "Mark Lybarger" <Mark.Lybarger@CBC-Companies.com> wrote:
does anyone know where some examples of using the ant script task can be found?  i'm looking
to use a simple script which iterates over each file in a directory and calls another ant
task passing in the filename.

thanks!
~mark


Mime
View raw message