<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="XEMELIOS-build-tools" default="usage" basedir=".">
	<description>Builds, tests, and runs the project XEMELIOS_3 auth-dgcp</description>
	<property file="${user.home}/.ant.properties"/>
	
	<target name="usage">
		<echo>
			Using ${ant.version}
			
			These are targets supported by this ANT build script:
			
			compile       - compile all .java files, except
					thoses in ./tmp folder.
			clean         - deletes all compiled and generated
					files and resources.
			jars          - build jar files.
			
			Do not call this script directly, use the one located
				at root of projet (in ../..) instead.
		</echo>
	</target>
	
	<target name="compile" depends="mk-output-dirs">
		<javac srcdir="java" destdir="build/classes" debug="${compile.debug}" encoding="ISO-8859-1">
            <classpath>
                <pathelement path="../xemelios-core/build/classes"/>
                <pathelement path="../core/build/classes"/>
				<fileset dir="../core/lib" includes="*.jar"/>
                <pathelement path="../xml-marshall/build/classes"/>
            </classpath>
		</javac>
		<copy todir="build/classes">
			<fileset dir="java">
				<include name="**/*"/>
				<exclude name="**/*.class"/>
                <exclude name="**/*.java"/>
                <exclude name="**/*.form"/>
			</fileset>
		</copy>
	</target>
	
	<target name="jars">
		<jar destfile="build/jars/build-tools.jar" basedir="build/classes"/>
	</target>
	
	<target name="clean">
		<delete dir="build"/>
	</target>
        
	
	<target name="mk-output-dirs">
		<mkdir dir="build/classes"/>
		<mkdir dir="build/jars"/>
	</target>
</project>
 
