<?xml version="1.0"?>
<!--
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
-->
<project name="live" default="build" basedir=".">
    
    <target name="build">
        <ant dir="apps" inheritAll="false" inheritRefs="false"/>
    </target>
    
    <target name="compile" depends="build"></target>
    
    <target name="deploy" depends="build">
        <ant dir="apps" target="deploy" inheritAll="false" inheritRefs="false"/>
        <ant dir="apps" target="deploy" inheritAll="false" inheritRefs="false"/>
    </target>
    
    <target name="undeploy">
        <ant dir="apps" target="undeploy" inheritAll="false" inheritRefs="false"/>
        <ant dir="apps" target="undeploy" inheritAll="false" inheritRefs="false"/>
    </target>
    
    <target name="run" depends="deploy">
        <ant dir="apps" target="run" inheritAll="false" inheritRefs="false"/>
    </target>
    
    <target name="setup">
        <ant dir="apps" target="setup" inheritAll="false" inheritRefs="false"/>
    </target>
    
    <target name="unsetup">
        <ant dir="apps" target="unsetup" inheritAll="false" inheritRefs="false"/>
    </target>
    
    <target name="clean">
        <delete dir="dist"/>
        <ant dir="apps" target="clean" inheritAll="false" inheritRefs="false"/>
    </target>
    
    <target name="checkLines">
        <fixcrlf srcdir="./apps" tab="remove" tablength="4" eol="unix" includes="**/*.properties,**/*.jsp,**/*.html,**/*.sh,**/*.java,**/*.xml" excludes="**/ja/**" />
        <fixcrlf srcdir="./docs" tab="remove" tablength="4" eol="unix" includes="**/*.properties,**/*.jsp,**/*.html,**/*.sh,**/*.java,**/*.xml" excludes="**/ja/**" />
    </target>
        
    <target name="include-jmaki">
        <echo>Copying jMaki Runtime to ${target.dir}</echo>
        <mkdir dir="${target.dir}/temp"/>
        <unzip src="${jmaki.zip}" dest="${target.dir}/temp" />
        <mkdir dir="${target.dir}/resources"/>
        <!--
        <copy todir="${target.dir}/resources">
            <fileset dir="${target.dir}/temp/jmaki-core/web/resources" excludes="**/config.json,**/hello**,**/xsl**, **/xhp.json"/>      
        </copy>
        <mkdir dir="${target.dir}/WEB-INF/lib"/>
        <copy todir="${target.dir}/WEB-INF/lib">
            <fileset dir="${target.dir}/temp/jmaki-core/web/WEB-INF/lib" includes="**/**"/>      
        </copy>      
        -->
        <delete dir="${target.dir}/temp"/>
    </target>
    
</project>
