<project name="shared" default="compile">
    <property name="prj.src" value="${basedir}/src"/>
    <property name="prj.externals" value="${basedir}/externals"/>
    <property name="out" value="${basedir}/output"/>
    <property name="out.build" value="${out}/build"/>
    <property name="out.jdoc" value="${out}/jdoc"/>
    <property name="out.lib" value="${out}/lib"/>
    <property name="out.zip" value="${out}/zip"/>
    <property name="version" value="1.3.2"/>
    <property name="javac.target" value="1.4"/>
	
	
	<target name="compile">
		<mkdir dir="${out.build}"/>
		<javac srcdir="${prj.src}" destdir="${out.build}" debug="on"
			target="${javac.target}" source="${javac.target}">
			<classpath>
				<fileset dir="${prj.externals}" includes="**/*.jar"/>
			</classpath>
		</javac>
	</target>
	<target name="jar" depends="compile">
		<mkdir dir="${out.lib}"/>
		<copy file="${prj.src}/ow.tasks" toDir="${out.build}"/>
		<jar jarfile="${out.lib}/ow_util_ant_tasks.jar" basedir="${out.build}">
			<manifest>
				<attribute name="product-title" value="ObjectwebAntTasks"/>
				<attribute name="product-version" value="ObjectwebAntTasks ${version}"/>
				<attribute name="product-vendor" value="Objectweb"/>
				<attribute name="product-description" value="This librairies contains Ant tasks improving base Ant tasks"/>
			</manifest>
		</jar>
	</target>
	<target name="zip" depends="jar,jdoc">
		<mkdir dir="${out.zip}"/>
		<zip destfile="${out.zip}/ow_util_ant_tasks_${version}.zip" 
			basedir="${basedir}" update="true" excludes="output/zip/**"/>
	</target>
	<target name="clean">
		<delete dir="${out}"/>
	</target>
	<target name="jdoc">
        <javadoc destdir="${out.jdoc}"
			windowtitle="Objectweb Ant Task"
			doctitle="Objectweb Ant Task"
			sourcepath="${prj.src}"
			author="true" version="true" use="true">
			<package name="org.objectweb.util.ant"/>
         </javadoc>
	</target>
</project>

