Location: PHPKode > projects > Arcavias > arcavias-core_2013-05/client/html/build.xml
<?xml version="1.0" encoding="UTF-8"?>

<project name="Arcavias HTML client" default="all">
	
	<target name="test" description="Executes unit tests">
		<echo msg="Executing unit tests" />
		<delete file="tests/unit.log" quiet="true" failonerror="false" />
		<exec command="phpunit -d memory_limit=-1 --configuration=phpunit.xml"
			  dir="tests" checkreturn="true" logoutput="true"/>
	</target>
	
	<target name="testperf" description="Executes performance tests">
		<echo msg="Executing performance tests" />
		<delete file="tests/unitperf.log" quiet="true" failonerror="false" />
		<exec command="phpunit -d memory_limit=-1 --configuration=phpunit-perf.xml"
			  dir="tests" checkreturn="true" logoutput="true"/>
	</target>
	
	<target name="coverage" description="Generates code coverage report">
		<echo msg="Generating code coverage report" />
		<delete file="tests/unittests.log" quiet="true" failonerror="false" />
		<delete dir="tests/coverage" quiet="true" failonerror="false" />
		<exec command="phpunit -d memory_limit=-1 --configuration=phpunit-coverage.xml"
			  dir="tests" checkreturn="true" logoutput="true"/>
	</target>
	
	<target name="check" description="Executes code sniffer">
		<echo msg="Executing code sniffer" />
		<exec command="phpcs -n --standard=${application.startdir}/coding/Metaways src tests/Client tests/MW tests/Perf"
			  checkreturn="true" logoutput="true"/>
	</target>

	<target name="clean" description="Cleans up temporary files">
		<delete dir="tests/coverage" quiet="true" failonerror="false" />
		<delete quiet="true" failonerror="false" >
			<fileset dir="tests">
				<include name="*.log" />
			</fileset>
		</delete>
	</target>

	<target name="i18n" description="Creates translation message files">
		<exec command="find ./layouts/ ./src/ -type f | xgettext -s --no-wrap --add-comments=/ --language=PHP --from-code=UTF-8 --keyword=printf:1 --keyword=sprintf:1 --keyword=translate:2,2t --keyword=translate:2,3,4t -o i18n/core-client-html.pot -f -"
			checkreturn="true" logoutput="true" />
		<exec command="msgmerge -s --no-wrap -U --backup=none i18n/en.po i18n/core-client-html.pot" checkreturn="true" logoutput="true" />
		<exec command="msgmerge -s --no-wrap -U --backup=none i18n/code/en.po i18n/code/core-client-html-code.pot" checkreturn="true" logoutput="true" />
		<exec command="msgmerge -s --no-wrap -U --backup=none i18n/country/en.po i18n/country/core-client-html-country.pot" checkreturn="true" logoutput="true" />
		<exec command="msgmerge -s --no-wrap -U --backup=none i18n/currency/en.po i18n/currency/core-client-html-currency.pot" checkreturn="true" logoutput="true" />
		<exec command="msgmerge -s --no-wrap -U --backup=none i18n/language/en.po i18n/language/core-client-html-language.pot" checkreturn="true" logoutput="true" />
	</target>

	<target name="build" description="Builds package for deployment">
		<foreach param="po-fname" absparam="po-filename" target="build-mo">
            <fileset dir="./i18n">
                <include name="*.po" />
            </fileset>
        </foreach>
		<foreach param="po-fname" absparam="po-filename" target="build-mo">
            <fileset dir="./i18n">
                <include name="*/*.po" />
            </fileset>
        </foreach>
	</target>

	<target name="build-mo" description="Generates binary translation files">
		<fail unless="po-filename" message="Missing file name" />
		<exec command="msgfmt --statistics -c -o `echo ${po-filename} | sed s/\.po//` ${po-filename}" checkreturn="true" logoutput="true" /> 
    </target>

	<target name="all" depends="coverage,testperf,check" description="Builds all parts of the package">
	</target>

</project>
Return current item: Arcavias