<?xml version="1.0"?>

<!--
   Copyright 2004-2006 The Apache Software Foundation.

   Licensed 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.
  
   $Header:$
-->

<!--
      ============================================================

      This build file is merely a placeholder for the importation of the forrest.build.xml file.
      'site', the default target here, is a target imported from forrest.build.xml

      ============================================================
-->
<project name="Beehive Forrest Site Build" default="usage" basedir=".">
 
    <property environment="os"/>
    <property name="forrest.home" location="${os.FORREST_HOME}"/>

    <property name="site.build.dir" location="build/site"/>
    <property name="site.staging.dir" location="www"/>

    <import file="${os.FORREST_HOME}/main/forrest.build.xml"/>

    <target name="build">
        <antcall target="site"/>
    </target>

    <target name="clean">
        <delete dir="build"/>
    </target>

    <target name="stage">
        <copy todir="${site.staging.dir}">
            <fileset dir="${site.build.dir}"/>
        </copy>

        <copy todir="${site.staging.dir}/releases" file="${os.FORREST_HOME}/main/site/releases/release-1.0.html"/>
        <copy todir="${site.staging.dir}/releases" file="${os.FORREST_HOME}/main/site/releases/release-1.0.2.html"/>

        <copy todir="${site.staging.dir}/" overwrite="true">
            <fileset dir="resources/"/>
        </copy>

        <echo>Running dos2unix to fixup line endings on skin generated by Forrest</echo>
        <exec executable="dos2unix" dir="www/skin">
            <arg line="*"/>
        </exec>

        <echo>
Beehive website creation is now complete.  To reflect these changes in on http://beehive.apache.org,
do the following:

svn commit www
ssh minotaur.apache.org
cd /www/beehive.apache.org
svn update
        </echo>
    </target>

    <target name="usage" description="Print the usage for this build.xml">
        <java fork="no" classname="org.apache.tools.ant.Main">
            <arg line="-f build.xml -projecthelp"/>
        </java>
    </target>
</project>
