<project name="my-portal" basedir="." 
        xmlns:sf="antlib:com.salesforce">

    <property file="build.properties" />

    <taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce">
        <classpath>
            <pathelement location="ant-salesforce.jar" />
        </classpath>
    </taskdef>

    <!-- Deploys components. runAllTests=false will be ignored for Prod. -->
    <target name="build">
        <sf:deploy username="${sf.username}"
            password="${sf.password}"
            serverurl="${sf.serverurl}"
            deployRoot="src" checkOnly="false" runAllTests="false"
            pollWaitMillis="15000"
            maxPoll="100">
        </sf:deploy>
    </target>

    <!-- Runs ALL unit tests, including Managed Package tests. -->
    <target name="test-all">
        <sf:deploy username="${sf.username}"
            password="${sf.password}"
            serverurl="${sf.serverurl}"
            deployRoot="build/src" checkOnly="true" runAllTests="true"
            logType="Debugonly">
        </sf:deploy>
    </target>

    <!-- Validates package against an environment without running all managed package tests. -->
    <target name="validate-prod">
        <sf:deploy username="${sf.username}"
            password="${sf.password}"
            serverurl="${sf.serverurl}"
            deployRoot="build/src" checkOnly="true" runAllTests="false"
            pollWaitMillis="15000"
            maxPoll="100">
        </sf:deploy>
    </target>

    <target name="retrieve-package">
        <sf:retrieve username="${sf.username}"
            password="${sf.password}"
            serverurl="${sf.serverurl}"
            retrieveTarget="src" unpackaged="src/package.xml"/>
    </target>

    <path id="ant.additions.classpath">
        <fileset dir="ant"/>
    </path>


</project>
