PHP Classes
elePHPant
Icontem

File: build.xml

Recommend this page to a friend!
  Classes of Will Tinsdeall  >  Boiler Framework  >  build.xml  >  Download  
File: build.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Boiler Framework
Web application framework that implements MVC
Author: By
Last change:
Date: 5 years ago
Size: 4,193 bytes
 

 

Contents

Class file image Download
<?xml version="1.0" encoding="UTF-8"?>
<project name="My Project" default="build">
	<property name="cmd.doxygen" value="/usr/bin/doxygen" />
	<property name="db" value="database_name" />
	<property name="db_user" value="database_user" />
	<property name="db_password" value="database_password" />
	<property name="db_server" value="localhost" />
	<property name="db_port" value="3306" />

	<target name="build" depends="db-config" />
	<target name="test" depends="docs,phpunit,phpcpd,phpmd,phpcs,skelgen" />
	<target name="configure" depends="db-config" />
	
	<target name="models" depends="db-config">
			<exec executable="php" dir="${basedir}/build/generation" failonerror="off">
				<arg line=" 'models.php'" />
			</exec>
	</target>
	
	<target name="models-clean" depends="db-config">
				<exec executable="php" dir="${basedir}/build/generation" failonerror="off">
					<arg line=" 'models-clean.php'" />
				</exec>
		</target>

	<target name="api" depends="db-config">
		<mkdir dir="${basedir}/framework/application/controller/api" />
		<exec executable="php" dir="${basedir}/build/generation" failonerror="off">
			<arg line=" 'api.php'" />
		</exec>
	</target>
	
	<target name="docs" depends="init">
		<exec executable="${cmd.doxygen}" dir="${basedir}" failonerror="off">
					<arg
						line=" build/doxyfile.cfg" />
				</exec>
	</target>
	<!-- Housekeeping -->
	<target name="clean">
		<delete dir="${basedir}/build/logs" />
		<delete dir="${basedir}/tests/framework" />
	</target>
	

	<target name="init" depends="clean">
		<mkdir dir="${basedir}/build/logs" />
		<mkdir dir="${basedir}/build/logs/docs" />
		<mkdir dir="${basedir}/build/logs/docs/doxygen" />
		<mkdir dir="${basedir}/build/logs/docs/clover" />
		<chmod dir="${basedir}/build/logs" perm="0777" />
		<chmod dir="${basedir}/build/logs/docs/doxygen" perm="0777" />
	</target>

	<!-- Configuration -->
	<target name="db-config">
		<exec executable="bash" dir="${basedir}/build" failonerror="off">
			<arg
				line=" 'dbconfig.sh' ${db} ${db_user} ${db_password} ${db_server} ${db_port}" />
		</exec>
	</target>

	<target name="db-schema" depends="db-config">
		<exec executable="php" dir="${basedir}/build" failonerror="off">
			<arg line=" 'schema_load.php'" />
		</exec>
	</target>

	<!-- Test Data -->
	<target name="db-testdata" depends="db-schema">
		<exec executable="php" dir="${basedir}/build" failonerror="off">
			<arg line=" 'testdata_load.php'" />
		</exec>
	</target>

	<!-- Testers -->
	<target name="skelgen">
		<exec executable="bash" dir="${basedir}" failonerror="off">
			<arg line=" '${basedir}/build/build.sh'" />
		</exec>
	</target>

	<target name="phpmd" depends="init">
		<exec executable="phpmd" dir="${basedir}/framework" failonerror="off">
			<arg
				line=" '${basedir}/framework' xml codesize,unusedcode --reportfile '${basedir}/build/logs/pmd.xml'" />
		</exec>
	</target>

	<target name="phpcs" depends="init">
		<exec executable="phpcs" dir="${basedir}/framework"
			output="${basedir}/build/logs/checkstyle.xml" failonerror="off">
			<arg
				line=" --standard='${basedir}/build/PHPCS' --report=checkstyle --tab-width=4 --extensions=php '${basedir}/framework'" />
		</exec>
	</target>

	<target name="phpcpd" depends="init">
		<exec executable="phpcpd" dir="${basedir}/framework" failonerror="off">
			<arg
				line=" --log-pmd '${basedir}/build/logs/phpcpd.xml' '${basedir}/framework'" />
		</exec>
	</target>

	<target name="phpunit" depends="init,db-testdata,skelgen">
		<exec executable="phpunit" dir="${basedir}" failonerror="off">
			<arg
				line=" --bootstrap '${basedir}/build/phpunit/phpunit.php' --log-junit '${basedir}/build/logs/phpunit.xml' --coverage-clover '${basedir}/build/logs/clover.xml' --coverage-html '${basedir}/build/logs/coverage' '${basedir}/tests/'" />
		</exec>
	</target>
	

	<target name="phpunit-manual">
		<exec executable="phpunit" dir="${basedir}" failonerror="off">
			<arg
				line=" --bootstrap '${basedir}/build/phpunit/phpunit.php' --log-junit '${basedir}/build/logs/phpunit.xml' --coverage-clover '${basedir}/build/logs/clover.xml' --coverage-html '${basedir}/build/logs/coverage' '${basedir}/tests/${test}'" />
		</exec>
	</target>
</project>