<?xml version="1.0" encoding="Shift_JIS"?>
<!-- 
=================================================================================
  GroupSession2
  create    2007.05.28  JTS
=================================================================================
-->

<project name="GroupSession2 for Developer" default="build" basedir=".">
<!-- 
=================================================================================
Properties: 変数の定義
=================================================================================
 -->

<!-- ディレクトリ名の定義 -->
<property name="CMN.CLS.DIR"      value="./WEB-INF/classes" />
<property name="SML.CLS.DIR"      value="./WEB-INF/plugin/smail/classes" />
<property name="ZSK.CLS.DIR"      value="./WEB-INF/plugin/zaiseki/classes" />
<property name="RSV.CLS.DIR"      value="./WEB-INF/plugin/reserve/classes" />
<property name="PLGIN.CMN.DIR"    value="./WEB-INF/plugin/common" />
<property name="PLGIN.BBS.DIR"    value="./WEB-INF/plugin/bulletin" />
<property name="PLGIN.RSV.DIR"    value="./WEB-INF/plugin/reserve" />
<property name="PLGIN.RNG.DIR"    value="./WEB-INF/plugin/ringi" />
<property name="PLGIN.TCD.DIR"    value="./WEB-INF/plugin/timecard" />
<property name="PLGIN.SRH.DIR"    value="./WEB-INF/plugin/search" />

<!-- Compile Options -->
<property  name="BLD.TARGET"   value="1.5" />
<property  name="DEBUG"        value="yes" />
<property  name="DEPRECATION"  value="true" />
<property  name="SRC.ENC"      value="Windows-31J" />

<!-- Java Doc Properties -->
<property  name="DOC.DIR"      value="./doc"/>
<property  name="API.DIR"      value="${DOC.DIR}/api"/>   
<property  name="DOC.AUTHOR"   value="true" />
<property  name="DOC.VERSION"  value="true" />
<property  name="DOC.PRIVATE"  value="true" />
<property  name="DOC.WINTITLE" value="Group Session2" />
<property  name="DOC.DOCTITLE" value="${DOC.WINTITLE} API Specification" />
<property  name="DOC.ENCODING" value="UTF-8" />
<property  name="DOC.FOOTER"   value="${DOC.WINTITLE} API" />


<!-- ClassPath -->
<path id="app_classpath">

  <!-- OSのクラスパス -->
  <pathelement path="${classpath}" />

  <!-- LIBディレクトリ -->
  <pathelement location="./WEB-INF/convert/v1.1.7tov2.0.0/lib/gsession1_lib.zip"/>
  <pathelement location="./WEB-INF/convert/v1.1.7tov2.0.0/lib/jsp-api.jar"/>
  <pathelement location="./WEB-INF/convert/v1.1.7tov2.0.0/lib/servlet-api.jar"/>

  <fileset dir="./WEB-INF/lib">
    <include name="**/*.jar"/>
    <include name="**/*.zip"/>
  </fileset>

  <!-- アプリケーション 共通クラス -->
  <pathelement location="${CMN.CLS.DIR}" />
  <!-- ショートメールクラス -->
  <pathelement location="${SML.CLS.DIR}" />
  <!-- 在席管理クラス -->
  <pathelement location="${ZSK.CLS.DIR}" />
  <!-- 施設予約クラス -->
  <pathelement location="${RSV.CLS.DIR}" />

</path>

<!-- 
=================================================================================
BUILD: 初期化
=================================================================================
 -->
<target name="init"
	    description="init"
  >
  <tstamp>
    <format property="YMDHMS"
            pattern="yyyy.MM.dd hh:mm:ss"
    />
  </tstamp>
  <echo message="Project Name  = ${ant.project.name}" />
  <echo message="Project Root  = ${basedir}" />
  <echo message="JDK Version   = ${ant.java.version}" />
  <echo message="Building Time = ${YMDHMS}" />
  <echo message="" />

</target>

<!-- 
=================================================================================
BUILD: Classファイルの作成(コンパイル)
=================================================================================
 -->

<target name="build">

	  <!-- 共通クラスのビルド -->
	  <property  name="CMN.SRC.DIR"      value="./WEB-INF/plugin/common/src" />
	  <mkdir dir="${CMN.CLS.DIR}"/>
	  <javac
	    classpathref = "app_classpath"
	    destdir      = "${CMN.CLS.DIR}"
	    target       = "${BLD.TARGET}"
	    debug        = "${DEBUG}"
	    deprecation  = "${DEPRECATION}"
	    encoding     = "${SRC.ENC}">
	    <src path="${CMN.SRC.DIR}" />
	    <compilerarg value="-Xlint:unchecked" />
	    <include name="**/*.java"/>
	    <exclude name="**/*Test.java" />
	  </javac>

	  <!-- 共有メッセージの配置 -->
	  <native2ascii encoding="${SRC.ENC}"
	    src="${PLGIN.CMN.DIR}"
	    dest="${PLGIN.CMN.DIR}"
	    includes="**/Messages.properties.SJIS" ext="" />

	  <!-- ショートメールのビルド -->
	  <property name="SML.SRC.DIR" value="WEB-INF/plugin/smail/src" />
	  <mkdir dir="${SML.CLS.DIR}"/>
	  <javac
	    classpathref = "app_classpath"
	    destdir      = "${SML.CLS.DIR}"
	    target       = "${BLD.TARGET}"
	    debug        = "${DEBUG}"
	    deprecation  = "${DEPRECATION}"
	    encoding     = "${SRC.ENC}">
	    <src path="${SML.SRC.DIR}" />
	    <compilerarg value="-Xlint:unchecked" />
	    <include name="**/*.java"/>
	    <exclude name="**/*Test.java" />
	  </javac>


	  <!-- 在席管理のビルド -->
	  <property name="ZSK.SRC.DIR" value="WEB-INF/plugin/zaiseki/src" />
	  <mkdir dir="${ZSK.CLS.DIR}"/>
	  <javac
	    classpathref = "app_classpath"
	    destdir      = "${ZSK.CLS.DIR}"
	    target       = "${BLD.TARGET}"
	    debug        = "${DEBUG}"
	    deprecation  = "${DEPRECATION}"
	    encoding     = "${SRC.ENC}">
	    <src path="${ZSK.SRC.DIR}" />
	    <compilerarg value="-Xlint:unchecked" />
	    <include name="**/*.java"/>
	    <exclude name="**/*Test.java" />
	  </javac>


	  <!-- 掲示版のビルド -->
	  <property name="BLT.CLS.DIR" value="WEB-INF/plugin/bulletin/classes" />
	  <property name="BLT.SRC.DIR" value="WEB-INF/plugin/bulletin/src" />
	  <mkdir dir="${BLT.CLS.DIR}"/>
	  <javac
	    classpathref = "app_classpath"
	    destdir      = "${BLT.CLS.DIR}"
	    target       = "${BLD.TARGET}"
	    debug        = "${DEBUG}"
	    deprecation  = "${DEPRECATION}"
	    encoding     = "${SRC.ENC}">
	    <src path="${BLT.SRC.DIR}" />
	    <compilerarg value="-Xlint:unchecked" />
	    <include name="**/*.java"/>
		    <exclude name="**/*Test.java" />
	  </javac>
	  <!-- Native2ascii -->
	  <native2ascii encoding="${SRC.ENC}"
	    src="${PLGIN.BBS.DIR}"
	    dest="${PLGIN.BBS.DIR}"
	    includes="**/Messages.properties.SJIS" ext="" />

	  <!-- 回覧板のビルド -->
	  <property name="CIR.CLS.DIR" value="WEB-INF/plugin/circular/classes" />
	  <property name="CIR.SRC.DIR" value="WEB-INF/plugin/circular/src" />
	  <mkdir dir="${CIR.CLS.DIR}"/>
	  <javac
	    classpathref = "app_classpath"
	    destdir      = "${CIR.CLS.DIR}"
	    target       = "${BLD.TARGET}"
	    debug        = "${DEBUG}"
	    deprecation  = "${DEPRECATION}"
	    encoding     = "${SRC.ENC}">
	    <src path="${CIR.SRC.DIR}" />
	    <compilerarg value="-Xlint:unchecked" />
	    <include name="**/*.java"/>
	    <exclude name="**/*Test.java" />
	  </javac>

	  <!-- 施設予約のビルド -->
	  <property name="RSV.CLS.DIR" value="WEB-INF/plugin/reserve/classes" />
	  <property name="RSV.SRC.DIR" value="WEB-INF/plugin/reserve/src" />
	  <mkdir dir="${RSV.CLS.DIR}"/>
	  <javac
	    classpathref = "app_classpath"
	    destdir      = "${RSV.CLS.DIR}"
	    target       = "${BLD.TARGET}"
	    debug        = "${DEBUG}"
	    deprecation  = "${DEPRECATION}"
	    encoding     = "${SRC.ENC}">
	    <src path="${RSV.SRC.DIR}" />
	    <compilerarg value="-Xlint:unchecked" />
	    <include name="**/*.java"/>
	    <exclude name="**/*Test.java" />
	  </javac>
	  <!-- Native2ascii -->
	  <native2ascii encoding="${SRC.ENC}"
	    src="${PLGIN.RSV.DIR}"
	    dest="${PLGIN.RSV.DIR}"
	    includes="**/Messages.properties.SJIS" ext="" />

	  <!-- スケジュールのビルド -->
	  <property name="SCH.CLS.DIR" value="WEB-INF/plugin/schedule/classes" />
	  <property name="SCH.SRC.DIR" value="WEB-INF/plugin/schedule/src" />
	  <mkdir dir="${SCH.CLS.DIR}"/>
	  <javac
	    classpathref = "app_classpath"
	    destdir      = "${SCH.CLS.DIR}"
	    target       = "${BLD.TARGET}"
	    debug        = "${DEBUG}"
	    deprecation  = "${DEPRECATION}"
	    encoding     = "${SRC.ENC}">
	    <src path="${SCH.SRC.DIR}" />
	    <compilerarg value="-Xlint:unchecked" />
	    <include name="**/*.java"/>
	    <exclude name="**/*Test.java" />
	  </javac>

	  <!-- タイムカードのビルド -->
	  <property name="TCD.CLS.DIR" value="WEB-INF/plugin/timecard/classes" />
	  <property name="TCD.SRC.DIR" value="WEB-INF/plugin/timecard/src" />
	  <mkdir dir="${TCD.CLS.DIR}"/>
	  <javac
	    classpathref = "app_classpath"
	    destdir      = "${TCD.CLS.DIR}"
	    target       = "${BLD.TARGET}"
	    debug        = "${DEBUG}"
	    deprecation  = "${DEPRECATION}"
	    encoding     = "${SRC.ENC}">
	    <src path="${TCD.SRC.DIR}" />
	    <compilerarg value="-Xlint:unchecked" />
	    <include name="**/*.java"/>
	    <exclude name="**/*Test.java" />
	  </javac>
	  <!-- Native2ascii -->
	  <native2ascii encoding="${SRC.ENC}"
	    src="${PLGIN.TCD.DIR}"
	    dest="${PLGIN.TCD.DIR}"
	    includes="**/Messages.properties.SJIS" ext="" />

	  <!-- 稟議のビルド -->
	  <property name="RNG.CLS.DIR" value="WEB-INF/plugin/ringi/classes" />
	  <property name="RNG.SRC.DIR" value="WEB-INF/plugin/ringi/src" />
	  <mkdir dir="${RNG.CLS.DIR}"/>
	  <javac
	    classpathref = "app_classpath"
	    destdir      = "${RNG.CLS.DIR}"
	    target       = "${BLD.TARGET}"
	    debug        = "${DEBUG}"
	    deprecation  = "${DEPRECATION}"
	    encoding     = "${SRC.ENC}">
	    <src path="${RNG.SRC.DIR}" />
	    <compilerarg value="-Xlint:unchecked" />
	    <include name="**/*.java"/>
	    <exclude name="**/*Test.java" />
	  </javac>
	  <!-- Native2ascii -->
	  <native2ascii encoding="${SRC.ENC}"
	    src="${PLGIN.RNG.DIR}"
	    dest="${PLGIN.RNG.DIR}"
	    includes="**/Messages.properties.SJIS" ext="" />
		
	  <!-- WEB検索のビルド -->
	  <property name="SRH.CLS.DIR" value="WEB-INF/plugin/search/classes" />
	  <property name="SRH.SRC.DIR" value="WEB-INF/plugin/search/src" />
	  <mkdir dir="${SRH.CLS.DIR}"/>
	  <javac
	    classpathref = "app_classpath"
	    destdir      = "${SRH.CLS.DIR}"
	    target       = "${BLD.TARGET}"
	    debug        = "${DEBUG}"
	    deprecation  = "${DEPRECATION}"
	    encoding     = "${SRC.ENC}">
	    <src path="${SRH.SRC.DIR}" />
	    <compilerarg value="-Xlint:unchecked" />
	    <include name="**/*.java"/>
	    <exclude name="**/*Test.java" />
	  </javac>
	  <!-- Native2ascii -->
	  <native2ascii encoding="${SRC.ENC}"
	    src="${PLGIN.SRH.DIR}"
	    dest="${PLGIN.SRH.DIR}"
	    includes="**/Messages.properties.SJIS" ext="" />

	  <!-- ヘルプのビルド -->
	  <property name="HLP.CLS.DIR" value="WEB-INF/plugin/help/classes" />
	  <property name="HLP.SRC.DIR" value="WEB-INF/plugin/help/src" />
	  <mkdir dir="${HLP.CLS.DIR}"/>
	  <javac
	    classpathref = "app_classpath"
	    destdir      = "${HLP.CLS.DIR}"
	    target       = "${BLD.TARGET}"
	    debug        = "${DEBUG}"
	    deprecation  = "${DEPRECATION}"
	    encoding     = "${SRC.ENC}">
	    <src path="${HLP.SRC.DIR}" />
	    <compilerarg value="-Xlint:unchecked" />
	    <include name="**/*.java"/>
	    <exclude name="**/*Test.java" />
	  </javac>

</target>

<!-- 
=================================================================================
JavaDoc:
=================================================================================
 -->

<target name="javadoc">

  <antcall target="init" />

  <mkdir dir="${API.DIR}"/>

  <javadoc 
    packagenames = "jp.co.sjts.*,jp.groupsession.*" 
    destdir      = "${API.DIR}" 
    classpathref = "app_classpath"
    author       = "${DOC.AUTHOR}"
    version      = "${DOC.VERSION}"
    Windowtitle  = "${DOC.WINTITLE}"
    Doctitle     = "${DOC.DOCTITLE}"
    Private      = "${DOC.PRIVATE}" 
    bottom       = "${DOC.FOOTER}"
    encoding     = "${SRC.ENC}"
    docencoding  = "${DOC.ENCODING}"
    >
   <sourcepath>
    <dirset dir="WEB-INF/plugin">
      <include name="**/src"/>
    </dirset>
   </sourcepath>
  </javadoc>

</target>

<!-- 
=================================================================================
CLEAN:*.*~ファイル、*.classファイルを削除します。
=================================================================================
 -->
<target name="clean">

	  <antcall target="init" />

	  <delete dir="${DOC.DIR}" />

	  <delete>
	    <fileset dir="." defaultexcludes="no" includes="**/*.*~,**/Thumbs.db" />
	  </delete>

	  <delete includeEmptyDirs="true">
	    <fileset dir="./WEB-INF/classes" defaultexcludes="no" includes="**/*.class" />
	  </delete>

	  <delete includeEmptyDirs="true" >
	    <fileset dir="WEB-INF/plugin">
	      <include name="**/classes/"/>
	    </fileset>
	  </delete>

	  <delete includeEmptyDirs="true" >
	    <fileset dir="WEB-INF/plugin">
	      <include name="**/Messages.properties"/>
	    </fileset>
	  </delete>

</target>

<!-- 
=================================================================================
HELP:
=================================================================================
 -->
<target name="help">
  <echo message="Ant Build Targets" />
  <echo message="" />
  <echo message="  init          初期化を行います。" />
  <echo message="  build         コンパイルを行います。" />
  <echo message="  javadoc       javadocを作成します。" />
  <echo message="  clean         生成物を削除します。" />
</target>

<target name="targets" depends="help" />

</project>
