<?xml version="1.0" encoding="UTF-8"?>
<project name="com_e2directory" default="stablebuild">

    <!--Set the definition for the Joomla manifest class-->

    <!--Set the properties for the build-->
    <property name="svnurl" value="https://svn.orchid1software.com" override="true"/>
    <property name="svnexe" value="C:\Program Files (x86)\CollabNet\Subversion Client\svn.exe" override="true"/>
    <property name="savedir" value="C:\Users\Owner\Earnware\E2directory\" override="true"/>
    <property name="manifest" value="C:\xampp\htdocs\com_e2directory\e2directory.xml" override="true"/>

    <!-- Make the time -->
    <tstamp>
          <format property="DATE" pattern="%m-%d-%Y" locale="En-Us"/>
          <format property="CTIME" pattern="%H-%M" locale="En-Us"/>
     </tstamp>


    <!-- Default Target Compress -->
    <target name="stablebuild" description="Builds com_e2directory tar.gaz">


        <!-- Initial comfirmations -->
        <echo>Running build.xml...</echo>


        <!--Confirmation that the latest revision number is being retrived from the SVN repository-->
        <echo msg="Getting last revision number from repository..." />


        <!-- Get Latest SVN revision number -->
         <svnlastrevision
           svnpath="${svnexe}"
           repositoryurl="${svnurl}"
           propertyname="svn.lastversion"/>


        <!--confirm the latest evision number-->
        <echo msg="Latest build is ${svn.lastversion}." />


        <!--Confirm that you are getting the files fromt he server-->
        <echo msg="Getting trunk from repository"/>


        <!-- Export files form repository -->
        <svnexport
           nocache="true"
           svnpath="${svnexe}"
           repositoryurl="${svnurl}"
           todir="${savedir}com_e2directory"/>


        <!--Confirm that the files have been retived formt he repository-->
        <echo msg="Files have been donwloaded"/>


        <!-- Fileset property names all files for all files -->
        <fileset dir="${savedir}com_e2directory/com_e2directory"
                 id="allfiles">
            <include name="**" />
        </fileset>

        <!--Confirmation of files being zipped-->
        <echo msg="Creating archive..." />

        <tar destfile="${savedir}com_e2directory_${DATE}_Time_${CTIME}_Revision_${svn.lastversion}.tar.gz"
             compression="gzip">
            <fileset refid="allfiles" />
        </tar>


        <!--Comfirmation that files are being deleted-->
        <echo msg="Deleting files"/>


        <delete dir="${savedir}com_e2directory" />


        <!-- Final confirmation -->
     <echo msg="Files copied and archive file created OK!" />
    </target>


</project>