<?xml version="1.0" encoding="UTF-8"?>
<project name="blancoDbCommon" default="build" basedir=".">
	<!-- blancoAnt(0.2.1)により自動生成されました。 (2011/02/07) -->
	<property name="version" value="0.1.5" />

	<property name="project" value="blancoDbCommon" />
	<property name="project.lower" value="blancodbcommon" />
	<property name="project.zip" value="${project}-${version}-src.zip" />
	<property name="project.main.jar" value="blancodbcommon-${version}.jar" />

	<property name="encoding" value="Windows-31J" />
	<property name="eclipse.dir" value="C:/Program Files/eclipse" />

	<!-- Antタスク定義 begin -->
	<taskdef name="blancoanttask" classname="blanco.anttask.task.BlancoAntTaskTask">
		<classpath>
			<fileset dir="lib" includes="*.jar" />
			<fileset dir="lib.ant" includes="*.jar" />
		</classpath>
	</taskdef>

	<taskdef name="blancoconstants" classname="blanco.constants.task.BlancoConstantsTask">
		<classpath>
			<fileset dir="lib" includes="*.jar" />
			<fileset dir="lib.ant" includes="*.jar" />
		</classpath>
	</taskdef>

	<taskdef name="blancomessage" classname="blanco.message.task.BlancoMessageTask">
		<classpath>
			<fileset dir="lib" includes="*.jar" />
			<fileset dir="lib.ant" includes="*.jar" />
		</classpath>
	</taskdef>

	<taskdef name="blancometa2xml" classname="blanco.meta2xml.task.BlancoMeta2XmlTask">
		<classpath>
			<fileset dir="lib" includes="*.jar" />
			<fileset dir="lib.ant" includes="*.jar" />
		</classpath>
	</taskdef>

	<taskdef name="blancoresourcebundle" classname="blanco.resourcebundle.task.BlancoResourceBundleTask">
		<classpath>
			<fileset dir="lib" includes="*.jar" />
			<fileset dir="lib.ant" includes="*.jar" />
		</classpath>
	</taskdef>

	<taskdef name="blancovalueobject" classname="blanco.valueobject.task.BlancoValueObjectTask">
		<classpath>
			<fileset dir="lib" includes="*.jar" />
			<fileset dir="lib.ant" includes="*.jar" />
		</classpath>
	</taskdef>

	<taskdef name="blancostringgroup" classname="blanco.stringgroup.task.BlancoStringGroupTask">
		<classpath>
			<fileset dir="lib" includes="*.jar" />
			<fileset dir="lib.ant" includes="*.jar" />
		</classpath>
	</taskdef>

	<!-- Antタスク定義 end -->

	<target name="pack">
		<echo>packing project</echo>
		<delete file="${project.zip}" />
		<delete dir="bin" />
		<delete dir="javadoc" />

		<delete dir="tmp" />

		<copy todir="lib.ant">
			<fileset dir=".">
				<include name="${project.lower}-*.jar" />
			</fileset>
		</copy>

		<delete>
			<fileset dir=".">
				<include name="${project.lower}-*.jar" />
			</fileset>
		</delete>

		<zip destfile="${project.zip}">
			<zipfileset dir="." prefix="${project}" excludes="${project.zip},**/*.class" />
		</zip>

	</target>

	<target name="jar">
		<echo>building jar</echo>

		<!-- 定義書読込設定XMLファイル(blancoCalcParserが利用) をコピーします。 -->
		<copy file="src/blanco/db/common/BlancoDbMeta2Xml.xml" todir="bin/blanco/db/common" />

		<delete file="${project.main.jar}" />
		<jar destfile="${project.main.jar}">
			<zipfileset dir="doc" prefix="doc" />
			<!-- classの取り込み (※sampleは除外) -->
			<zipfileset dir="bin" includes="**/*" excludes="blanco/sample/**" />
			<!-- Javaソースコード(通常)の取り込み (※sampleは除外) -->
			<zipfileset dir="src" includes="**/*" prefix="src" excludes="blanco/sample/**" />
			<!-- Javaソースコード(自動生成)の取り込み (※sampleは除外) -->
			<zipfileset dir="blanco/main" includes="**/*.java" prefix="src" excludes="blanco/sample/**" />
			<!-- プロパティファイルの取り込み -->
			<zipfileset dir="blanco/main" includes="**/*.properties" excludes="blanco/sample/**" />
			<!-- 自動生成の原料 (meta) の取り込み -->
			<zipfileset dir="meta" prefix="doc/meta" />
		</jar>
	</target>

	<target name="compile">
		<delete dir="bin" />
		<mkdir dir="bin" />
		<javac destdir="bin" debug="true" source="1.5" target="1.5" fork="false" encoding="${encoding}">
			<src path="blanco/main/" />
			<src path="src/" />
			<classpath>
				<!-- ワイルドカードで一括取り込み -->
				<fileset dir="lib" includes="*.jar" />
				<pathelement path="${eclipse.dir}/plugins/org.junit_3.8.2.v20080602-1318/junit.jar" />
			</classpath>
			<include name="**/*.java" />
		</javac>
	</target>

	<target name="javadoc">
		<echo>JavaDocを生成します。</echo>
		<delete dir="javadoc" />
		<javadoc destdir="javadoc" encoding="${encoding}">
			<fileset dir="src" includes="**/*.java" />
			<fileset dir="blanco/main" includes="**/*.java" />
			<classpath>
				<fileset dir="lib" includes="*.jar" />
				<fileset dir="lib.ant" includes="*.jar" />
			</classpath>
		</javadoc>
	</target>

	<target name="meta.clean">
		<delete>
			<fileset dir="blanco/main">
				<include name="**/*.java" />
				<include name="**/*.properties" />
			</fileset>
		</delete>
	</target>

	<target name="meta">
		<blancoconstants metadir="meta/program" encoding="${encoding}" />
		<blancoresourcebundle metadir="meta/program" commenttimestamp="false" encoding="${encoding}" />
		<blancoanttask metadir="meta/program" encoding="${encoding}" />
		<blancovalueobject metadir="meta/program" encoding="${encoding}" />
		<blancomessage metadir="meta/program" encoding="${encoding}" />
		<blancometa2xml metadir="meta/program" encoding="${encoding}" />
		<blancostringgroup metadir="meta/program" encoding="${encoding}" />

		<!-- TODO: ここに自身のantタスクを追加してください。 -->
	</target>

	<target name="build" depends="meta.clean,meta,compile,jar,pack">
	</target>

</project>