<!--
i-net software provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied warranties
of merchantability and/or fitness for a particular purpose. This programming example
assumes that you are familiar with the programming language being demonstrated and
the tools used to create and debug procedures. i-net software support professionals
can help explain the functionality of a particular procedure, but they will not modify
these examples to provide added functionality or construct procedures to meet your
specific needs.
© i-net software 1998-2010
 -->

<project name="GenerateReports" default="all">
	<!-- modify this variable to point to your i-net Clear Reports installation
	directory containing ClearReports.jar -->
	<property name="path.clearreports" value="E:"/>
	
	
	<!-- DO NOT MODIFY THE CODE BELOW -->
	<property name="target" value="../../../target"/>
	<property name="target.src" value="${target}/src"/>
	<property name="target.bin" value="${target}/bin"/>
	<target name="all">
		<!-- prepare the output directory -->
		<delete dir="${target}"/>
		<mkdir dir="${target.src}/samples/beans"/>
		<mkdir dir="${target.bin}"/>
		<!-- copy and compile the sample classes -->
		<path id="classpath.clearreports">
    		<pathelement location="${path.clearreports}/ClearReports.jar"/>
		</path>
		<copy todir="${target.src}/samples/beans">
			<fileset dir=".">
				<include name="*.java"/>
			</fileset>
		</copy>
    	<javac destdir="${target.bin}" debug="false" deprecation="false" srcdir="${target.src}">
    		<include name="samples/beans/**.java"/>
    		<classpath refid="classpath.clearreports"/>
		</javac>
		<!-- create the client library for direct sample -->
		<jar destfile="${target}/direct_client.jar">
			<fileset dir="${target.bin}">
				<exclude name="samples/beans/GenerateReportsServlet.class"/>
			</fileset>
		</jar>
		<!-- create the client library for servlet sample -->
		<jar destfile="${target}/servlet_client.jar">
			<fileset dir="${target.bin}">
				<exclude name="samples/beans/BeanDataSourceManagerImpl.class"/>
			</fileset>
		</jar>
		<!-- create the server library for servlet sample -->
		<jar destfile="${target}/servlet_server.jar">
			<fileset dir="${target.bin}">
				<exclude name="samples/beans/Generate*.class"/>
			</fileset>
		</jar>
		<!-- cleanup the temporary files -->
		<delete dir="${target.src}"/>
		<delete dir="${target.bin}"/>
	</target>
</project>
