<?xml version="1.0" encoding="shift_JIS"?>
<project name="SampleWebSystem" default="compile" basedir="."> 
    <!-- set properties -->
	<property file="build.properties" />
	
	<!-- ============================================================= -->
	<!--                                                               -->
	<!--                      set project classpath                    -->
	<!--                                                               -->
	<!--                             Ver1.00A 2002/11/11 Kano          -->
	<!-- ============================================================= -->
	<path id="project.class.path" >
	    <pathelement path="${home}/${build}"/>
		<pathelement location="${home}/${build}"/>
		<fileset dir="${home}/${lib}">
			<include name="**/*.jar"/>
		</fileset>
		<!-- 単体テスト用クラスライブラリのインクルード -->
		<fileset dir="${home}/${lib.test}">
			<include name="**/*.jar"/>
		</fileset>
		<!-- サーブレット用クラスライブラリのインクルード -->
		<fileset dir="${lib.servlet}">
			<include name="**/*.jar"/>
		</fileset>
		
		
	</path>
	
	<!-- ============================================================= -->
	<!--                                                               -->
	<!--                            init                               -->
	<!--                                                               -->
	<!--                             Ver1.00A 2002/11/11 Kano          -->
	<!-- ============================================================= -->
	<target name="init">
        <!-- set time stamp -->
		<tstamp/>
        <mkdir dir="${home}/${build}"/>
		<mkdir dir="${home}/${lib}"/>
    </target>
    
    <!-- ============================================================= -->
	<!--                                                               -->
	<!--                      compile java file                        -->
	<!--                                                               -->
	<!--                             Ver1.00A 2002/11/11 Kano          -->
	<!-- ============================================================= -->
	<target name="compile" depends="init">
		<!-- src配下のソースをコンパイルします -->
        <javac srcdir="${home}/${src}" destdir="${home}/${build}">
			<classpath refid="project.class.path"/>
		</javac>
		<!-- junitクラスをコンパイルします -->
		<javac srcdir="${home}/${src.test}" destdir="${home}/${build}">
			<classpath refid="project.class.path"/>
		</javac>
		<!-- cactusクラスをコンパイルします -->
		<javac srcdir="${home}/${src.webtest}" destdir="${home}/${build}">
			<classpath refid="project.class.path"/>
		</javac>
    </target>
    
    <!-- ============================================================= -->
	<!--                                                               -->
	<!--                      create jar file                          -->
	<!--                                                               -->
	<!--                             Ver1.00A 2002/11/11 Kano          -->
	<!-- ============================================================= -->
	<target name="jar-commons" depends="compile">
        <mkdir dir="${dist}"/>
		<jar jarfile="${dist}/${projectName}-commons.jar"
			basedir="${home}/${build}" includes="org/itscool/commons/**/*.class"/>
	</target>
	
	<target name="jar-stylist" depends="jar-commons">
        <mkdir dir="${dist}"/>
		<jar jarfile="${dist}/${projectName}-stylist.jar"
			basedir="${home}/${build}" includes="org/itscool/stylist/**/*.class"/>
	</target>
	
	<target name="jar-weber" depends="jar-stylist">
        <mkdir dir="${dist}"/>
		<jar jarfile="${dist}/${projectName}-weber.jar"
		    basedir="${home}/${build}" includes="org/itscool/weber/**/*.class"/>
	</target>
    
    <target name="jar" depends="jar-weber">
        <mkdir dir="${dist}"/>
		<jar jarfile="${dist}/${projectName}-webertest.jar"
		    basedir="${home}/${build}" includes="org/itscool/webertest/**/*.class"/>
	</target>
	
    <!-- ============================================================= -->
	<!--                                                               -->
	<!--                      create java documents                    -->
	<!--                                                               -->
	<!--                             Ver1.00A 2002/11/11 Kano          -->
	<!-- ============================================================= -->
	<target name="javadoc_commons" depends="compile">
		<mkdir dir="${javadoc.dir}/itscool-doc/commons/api"/>
		<javadoc packagenames="org.itscool.commons.*"
		    access="protected" 
		    stylesheetfile="${javadoc.stylesheet}"
		    overview="${javadoc.overview1}"
		    encoding="${javadoc.encode}"
			sourcepath="${home}/${src}"
		    destdir="${javadoc.dir}/itscool-doc/commons/api"
		    version="true"
		    use="true"
		    windowtitle="${projectName} ITS-COOL API documentation"
		    doctitle="${projectName}-commons API library"
			author="true"
		    bottom="Copyright 2005 CoolProjects Inc. All Rights Reserved.">
			<classpath refid="project.class.path"/>
		</javadoc>
    </target>
    
    <target name="javadoc_stylist" depends="javadoc_commons">
		<mkdir dir="${javadoc.dir}/itscool-doc/stylist/api"/>
		<javadoc packagenames="org.itscool.stylist.*"
		    access="protected" 
		    stylesheetfile="${javadoc.stylesheet}"
		    overview="${javadoc.overview2}"
		    encoding="${javadoc.encode}"
			sourcepath="${home}/${src}"
		    destdir="${javadoc.dir}/itscool-doc/stylist/api"
		    version="true"
		    use="true"
		    windowtitle="${projectName} ITS-COOL API documentation"
		    doctitle="${projectName}-stylist API library"
			author="true"
		    bottom="Copyright 2005 CoolProjects Inc. All Rights Reserved.">
			<classpath refid="project.class.path"/>
		</javadoc>
    </target>
    
    <target name="javadoc_weber" depends="javadoc_stylist">
		<mkdir dir="${javadoc.dir}/itscool-doc/weber/api"/>
		<javadoc packagenames="org.itscool.weber.*"
		    access="protected" 
		    stylesheetfile="${javadoc.stylesheet}"
		    overview="${javadoc.overview3}"
		    encoding="${javadoc.encode}"
			sourcepath="${home}/${src}"
		    destdir="${javadoc.dir}/itscool-doc/weber/api"
		    version="true"
		    use="true"
		    windowtitle="${projectName} ITS-COOL API documentation"
		    doctitle="${projectName}-weber API library"
			author="true"
		    bottom="Copyright 2005 CoolProjects Inc. All Rights Reserved.">
			<classpath refid="project.class.path"/>
		</javadoc>
    </target>
    
    <target name="javadoc" depends="javadoc_weber">
		<mkdir dir="${javadoc.dir}/itscool-doc/webertest/api"/>
		<javadoc packagenames="org.itscool.webertest.*"
		    access="protected" 
		    stylesheetfile="${javadoc.stylesheet}"
		    overview="${javadoc.overview4}"
		    encoding="${javadoc.encode}"
			sourcepath="${home}/${src}"
		    destdir="${javadoc.dir}/itscool-doc/webertest/api"
		    version="true"
		    use="true"
		    windowtitle="${projectName} ITS-COOL API documentation"
		    doctitle="${projectName}-webertest API library"
			author="true"
		    bottom="Copyright 2005 CoolProjects Inc. All Rights Reserved.">
			<classpath refid="project.class.path"/>
		</javadoc>
    </target>
    
	<!-- ============================================================= -->
	<!--                                                               -->
	<!--                      crean directory                          -->
	<!--                                                               -->
	<!--                             Ver1.00A 2002/11/11 Kano          -->
	<!-- ============================================================= -->
	<target name="clean">
       <delete dir="${home}/${build}"/>
       <delete dir="${dist}"/>
	   <delete dir="${javadoc.dir}"/>
	   <delete dir="${test.reports.dir}"/>
    </target>
	
</project>       