<?xml version="1.0" ?>
<project xmlns:ant="jelly:ant" xmlns:artifact="artifact" >
	<goal name="s2dao:compile">
		<ant:javac srcdir="${src}" destdir="${build}" debug="on">
          <ant:classpath>
            <ant:path refid="maven.dependency.classpath"/>
		  </ant:classpath>
		</ant:javac>
	</goal>

	<goal name="s2dao:copy" prereqs="s2dao:compile">
		<ant:copy todir="${build}">
			<ant:fileset dir="${src}">
				<ant:include name="**/*.properties" />
				<ant:include name="**/*.xml" />
				<ant:include name="**/*.dtd" />
				<ant:exclude name="build.xml" />
			</ant:fileset>
		</ant:copy>
	</goal>

	<goal name="s2dao:dist" prereqs="s2dao:compile,s2dao:copy,s2dao:cleans2jarfile">
		<ant:jar jarfile="${lib}/${jarfile}" basedir="${build}" includes="${package}, DAO*.properties, dbms.properties" />	
	</goal>

	<goal name="s2dao:cleanbuild">
		<ant:delete dir="${build}/${package}" />
	</goal>

	<goal name="s2dao:clean" prereqs="s2dao:cleanbuild">
		<ant:delete file="${dist}/${jarfile}" />	
	</goal>

	<goal name="s2dao:cleans2jarfile">
		<ant:delete>
			<ant:fileset dir="${lib}" defaultexcludes="no">
				<ant:include name="s2-dao-*.jar" />
			</ant:fileset>
		</ant:delete>
	</goal>

	<goal name="s2dao:setup" prereqs="s2dao:dist">
		<ant:delete>
			<ant:fileset dir="${setupdir}" />
		</ant:delete>
		<ant:copy todir="${setupdir}">
			<ant:fileset dir=".">
				<ant:exclude name="**/CVS/**" />
				<ant:exclude name="${build}/**" />
				<ant:exclude name="doc/**" />
			</ant:fileset>
			<ant:fileset dir="../seasar2/">
				<ant:include name="doc/" />
			</ant:fileset>
		</ant:copy>
		<ant:delete dir="${setupdir}build" />
		<ant:mkdir dir="${setupdir}build" />
		<ant:zip zipfile="${releasejarfile}" basedir="../setup2" includes="s2dao/" />
	</goal>

	<goal name="s2dao:install">
		<attainGoal name="s2dao:dist" /> 
		<artifact:install
			artifact= "${lib}/${jarfile}"
			type= "jar" 
			project= "${pom}" /> 
	</goal>

	<goal name="s2dao:deploy" prereqs="s2dao:clean">
		<attainGoal name="s2dao:dist" /> 
		<artifact:deploy 
			artifact= "${lib}/${jarfile}"
			type= "jar" 
			project= "${pom}" /> 
	</goal>

	<goal name="s2dao:install-snapshot">
		<attainGoal name="s2dao:dist" /> 
		<artifact:install-snapshot 
			artifact= "${lib}/${jarfile}"
			type= "jar" 
			project= "${pom}" /> 
	</goal>

	<goal name="s2dao:deploy-snapshot">
		<attainGoal name="s2dao:dist" /> 
		<artifact:deploy-snapshot
			artifact= "${lib}/${jarfile}"
			type= "jar" 
			project= "${pom}" /> 
	</goal>
</project>
