<?xml version="1.0" encoding="UTF-8"?>
<project name="Factory" default="build" basedir=".">
    <property name="source" value="src"/>

    <target name="clean" description="Clean up and create artifact directories">
        <delete dir="${basedir}/build/api"/>
        <delete dir="${basedir}/build/coverage"/>
        <delete dir="${basedir}/build/logs"/>

        <mkdir dir="${basedir}/build/api"/>
        <mkdir dir="${basedir}/build/coverage"/>
        <mkdir dir="${basedir}/build/logs"/>
    </target>

    <target name="phpab">
        <exec executable="phpab">
            <arg line='-o src/autoload.php src'/>
        </exec>
    </target>

    <target name="phpunit" description="Run unit tests using PHPUnit and generates junit.xml and clover.xml">
        <exec executable="phpunit" failonerror="true"/>
    </target>

    <target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer">
        <exec executable="phpcs" output="/dev/null">
            <arg line="--report=checkstyle
              --report-file=${basedir}/build/logs/checkstyle.xml
              --standard=phpcs.xml
              ${source}"/>
        </exec>
    </target>

    <target name="build" depends="clean,phpab,phpcs,phpunit"/>
</project>

<?xml version="1.0" encoding="UTF-8"?>
<project name="Factory" default="build" basedir=".">
    <property name="source" value="src"/>

    <target name="clean" description="Clean up and create artifact directories">
        <delete dir="${basedir}/build/api"/>
        <delete dir="${basedir}/build/coverage"/>
        <delete dir="${basedir}/build/logs"/>

        <mkdir dir="${basedir}/build/api"/>
        <mkdir dir="${basedir}/build/coverage"/>
        <mkdir dir="${basedir}/build/logs"/>
    </target>

    <target name="phpab">
        <exec executable="phpab">
            <arg line='-o src/autoload.php src'/>
        </exec>
    </target>

    <target name="phpunit" description="Run unit tests using PHPUnit and generates junit.xml and clover.xml">
        <exec executable="phpunit" failonerror="true"/>
    </target>

    <target name="phpdox">
        <exec executable="phpdox" failonerror="true"/>
    </target>

    <target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer">
        <exec executable="phpcs" output="/dev/null">
            <arg line="--report=checkstyle
              --report-file=${basedir}/build/logs/checkstyle.xml
              --standard=phpcs.xml
              ${source}"/>
        </exec>
    </target>

    <target name="build" depends="clean,phpab,phpcs,phpdox,phpunit"/>
</project>

Build api docs by default
Build api docs by default
