Source

ant-events / build.xml

Full commit
<project name="ant-events" default="build" basedir="." >
	<target name="build" >
		<mkdir dir="classes" />
		<javac
			srcdir="src"
			destdir="classes"
			target="1.4"
			source="1.4"
			debug="on"
			includeantruntime="true"
		/>
		<copy todir="classes" >
			<fileset dir="src" includes="**/*.xml" />
		</copy>
		<mkdir dir="bin" />
		<jar
			destfile="bin/ant-events.jar"
			basedir="classes"
		/>
	</target>
	
	<target name="clean" >
		<delete dir="classes" quiet="true" />
		<delete dir="bin" quiet="true" />
	</target>
	
	<target name="test" depends="build" >
		<typedef classpath="${basedir}/bin/ant-events.jar" resource="org/antcontrib/events/antlib.xml" />
		
		<event name="foo" priority="2" >
			<echo message="event foo 1" />
		</event>
		
		<event name="foo" priority="1" >
			<echo message="event foo 2" />
		</event>
		
		<event name="foo" priority="3" >
			<echo message="event foo 3" />
		</event>
		
		<fire-event name="foo" />
		<fire-event name="foo" order="ascending" />
		<fire-event name="foo" order="descending" />
	</target>
</project>