ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Waugh" <>
Subject Re: Optional <entry/> if and only if properties file exists?
Date Thu, 13 Nov 2008 15:52:18 GMT
Thanks guys, this works for me:

	<!-- External Tasks -->
	<taskdef resource="bb-ant-defs.xml"
classpath="${user.home}/.ant/lib/bb-ant-tools.jar" />
	<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${user.home}/.ant/lib/ant-contrib.jar"  uri =
""  description = "Needed to use
ant-contrib." />

	<!-- MACROS -->
	<macrodef name="my.rapc">
	   <attribute name="entryfile" default="--file not available--"/>
	   <attribute name="output" default="${}"/>
	   <attribute name="srcdir" default="${src.dir}"/>
	   <attribute name="destdir" default="${build.dir}"/>
	   <attribute name="jdp" default=""/>
	   <element name="inside-rapc" implicit="true"/>
				<available file="@{entryfile}"/>
					<echo message="AltEntry exists" />
					<rapc output="@{output}" srcdir="@{srcdir}" destdir="@{destdir}">
						<jdp file="@{jdp}">
							<entry file="@{entryfile}" />
					<echo message="AltEntry does not exist" />
					<rapc output="@{output}" srcdir="@{srcdir}" destdir="@{destdir}">
						<jdp file="@{jdp}" />
	<!-- Build cod -->
	<target name="-build" depends="-deps, -init">
		<mkdir dir="${build.dir}" />
		<my.rapc entryfile="">
				<fileset dir="${common.basedir}/.." includes="${deps.list}/build/*.jar" />
				<fileset dir="${src.dir}">
					<include name="**/*.java" />
					<include name="**/*.png" />
					<include name="resources/**/*.*" />
		<echo message="Build ${cod.version} complete." />


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

View raw message