<!-- Build configutaion for OpenSAML/Java - Walter Hoehn 06/05/2002 -->

<project name="OpenSAML" default="dist" basedir=".">


	<!-- Set global properties for this build -->
	<property name="distname" value="opensaml" />
	<property name="root" value="." />
	<property name="src" value="${root}/src" />
	<property name="build" value="${root}/build" />
	<property name="libdir" value="${root}/lib" />
	<property name="dist" value="${root}/dist" />
	<property name="docs" value="${root}/docs" />
	<property name="javadocs" value="${docs}/api" />

	<property name="year" value="2002"/>
	<property name="copyright" value="Copyright &#169; ${year} UCAID. All Rights Reserved."/>


	<!-- Construct the CLASSPATH -->
	<path id="build.path">
		<pathelement path="${classpath}" />
		<pathelement location="${build}" />
		<fileset dir="${libdir}">
			<include name="**/*.jar" />
		</fileset>
	</path>


	<!-- Prepare directory structure for project build-->
	<target name="init">
	<mkdir dir="${build}" />
	<mkdir dir="${dist}" />
	</target>


	<!-- Compile classes and move them to ${build} -->
	<target name="compile" depends="init">
		<javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
			<classpath refid="build.path" />
		</javac>
		<copy todir="${build}/schemas">
			<fileset dir="${src}/schemas"/>
		</copy>
		<copy todir="${build}/conf">
			<fileset dir="${src}/conf"/>
		</copy>
	</target>

	<!-- Generate API docs -->
	<target name="javadocs">
		<mkdir dir="${docs}" />
		<mkdir dir="${javadocs}" />
		<javadoc packagenames='org.opensaml.*'
			sourcepath='${src}' destdir='${javadocs}'
			author='true' version='true'
			windowtitle='OpenSAML Java API' doctitle='OpenSAML Java API'
			bottom='${copyright}'>
                <classpath refid="build.path" />
        </javadoc>


	</target>

	<!-- Create product distribution and move it to ${dist} -->
	<target name="dist" depends="clean-build, compile, package" />
	<target name="package">
	<jar jarfile="${dist}/${distname}.jar"  basedir="${build}" />
	</target>


	<!-- Cleanup after the build, test, and distribution processes -->
	<target name="clean-all" depends="clean-build, clean-dist, clean-test" />
	<target name="clean-build">
		<delete dir="${build}" />
	</target>
	<target name="clean-test">
		<delete>
			<fileset dir="${root}">
				<include name="**/TEST*.txt" />
			</fileset>
		</delete>
	</target>
	<target name="clean-dist">
		<delete dir="${dist}" />
	</target>

	<target name="clean-javadocs">
		<delete dir="${javadocs}" />
	</target>
	
	<!-- Run automated tests on compiled code -->
	<target name="test-all" />

	
</project>

