<?xml version="1.0" encoding="UTF-8"?>

<project name="Maven1.1" default="AppTest" basedir=".">
<!--
    <property name="JUNIT_HOME" value=""/>
-->
	<path id="project.classpath">
        <pathelement location="target/classes"/>
        <pathelement location="target/test-classes"/>
        <pathelement location="bootstrap/install-phase1/lib/ant-1.6.2.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/ant-junit-1.6.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/ant-launcher-1.6.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-beanutils-1.6.1.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-cli-1.0-beta-2.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-collections-2.1.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-digester-1.4.1.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-graph-0.8.1.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-httpclient-2.0.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-io-1.0.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-jelly-1.0-beta-4.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-jelly-tags-ant-1.1-SNAPSHOT.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-jelly-tags-define-1.0.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-jelly-tags-util-1.0.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-jelly-tags-xml-1.0.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-jexl-1.0.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-lang-2.0.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/commons-logging-1.0.3.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/dom4j-1.5.2.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/endorsed/xerces-2.4.0.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/endorsed/xml-apis-1.0.b2.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/forehead-1.0-beta-5.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/jaxen-1.1-beta-4.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/log4j-1.2.8.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/maven.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/maven-jelly-tags-1.1-SNAPSHOT.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/maven-model-3.0.0-SNAPSHOT.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/plexus-utils-1.0-alpha-1.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/wagon-file-1.0-alpha-2-SNAPSHOT.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/wagon-http-1.0-alpha-2-SNAPSHOT.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/wagon-provider-api-1.0-alpha-2-SNAPSHOT.jar"/>
        <pathelement location="bootstrap/install-phase1/lib/which-1.0.jar"/>
        <pathelement location="bootstrap/maven.jar"/>
    </path>

    <condition property="isWindows">
      <os family="windows"/>
    </condition>
    <condition property="isNotWindows">
      <os name="Linux"/>
    </condition>
    <condition property="isNotWindows">
      <os name="unix"/>
    </condition>
    <condition property="isNotWindows">
      <os name="Mac OS X"/>
    </condition>
    <condition property="isNotWindows">
      <os name="SunOS"/>
    </condition>

	<target name="AppTest" depends="AppTestDefault, AppTestFrench, AppTestSpanish"/>
	
	<target name="AppTestDefault">
		<echo>Language defined by the JVM</echo>
        <junit fork="yes" printsummary="withOutAndErr">
            <formatter type="plain"/>
            <test name="org.apache.maven.cli.AppTest"/>
            <classpath refid="project.classpath"/>
        </junit>
	</target>

	<target name="AppTestFrench" depends="AppTestFrench_win32, AppTestFrench_other"/>
	<!-- The file.encoding system property is very important in Windows Command line -->
	<!-- It is used to beautify the display containing accents -->
	<target name="AppTestFrench_win32" if="isWindows">
		<echo>French language</echo>

        <junit fork="yes" printsummary="withOutAndErr">
			<sysproperty key="user.language" value="fr"/>
    		<sysproperty key="file.encoding" value="Cp850"/>
            <formatter type="plain"/>
            <test name="org.apache.maven.cli.AppTest"/>
            <classpath refid="project.classpath"/>
        </junit>
	</target>
	<target name="AppTestFrench_other" if="isNotWindows">
		<echo>Display in the French defined user.language</echo>

        <junit fork="yes" printsummary="withOutAndErr">
			<sysproperty key="user.language" value="fr"/>
            <formatter type="plain"/>
            <test name="org.apache.maven.cli.AppTest"/>
            <classpath refid="project.classpath"/>
        </junit>
	</target>

	<target name="AppTestSpanish">
		<echo>Spanish language (Actually not supported, should be english)</echo>
        <junit fork="yes" printsummary="withOutAndErr">
			<sysproperty key="user.language" value="es"/>
            <formatter type="plain"/>
            <test name="org.apache.maven.cli.AppTest"/>
            <classpath refid="project.classpath"/>
        </junit>
    </target>

</project>

