<!--
Build include file for the GridSphere Portal source code, see build.xml

 - $Id: build-database.xml 4726 2006-04-10 04:36:46Z novotny $

-->


<project name="GridSphere database">

    <!-- Creates the database . Include file to build.xm -->

    <!-- =================================================================== -->
    <!-- Creates database                                                    -->
    <!-- =================================================================== -->

    <target name="create-database" depends="setenv">
        <taskdef name="dbtask"
            classname="org.gridlab.gridsphere.core.persistence.hibernate.DBTask"
            classpathref="classpath">
            <classpath id="hib.classpth">
                <pathelement location="config"/>
            </classpath>
        </taskdef>
        <dbtask
            configdir="${appserver.home}/webapps/${gridsphere.deploy}"
            action="CREATE"/>
    </target>

    <target name="update-database" depends="setenv">
        <taskdef name="dbtask"
            classname="org.gridlab.gridsphere.core.persistence.hibernate.DBTask"
            classpathref="classpath"/>
        <dbtask
            configdir="${appserver.home}/webapps/${gridsphere.deploy}"
            action="UPDATE"/>
    </target>

    <target name="hsql" depends="setenv">
        <echo message="Starting HSQLDB"/>
        <java dir="." fork="true" classname="org.hsqldb.Server" classpathref="classpath">
            <arg line="-database ${appserver.home}/webapps/${gridsphere.deploy}/WEB-INF/CustomPortal/database/gridsphere"/>
 <!--           <arg value="/Users/novotny/Jakarta/jakarta-tomcat-5.0.28/webapps/g
ridsphere/WEB-INF/CustomPortal/database/gridsphere"/>
            <arg value="-dbname.0"/>
            <arg value="gridsphere"/> -->
        </java>
    </target>

</project>
