Created
June 23, 2014 09:24
-
-
Save evancauwenberg/01cfcbb2edc782cc0d66 to your computer and use it in GitHub Desktop.
Build.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project name="My Project Name" default="build"> | |
<target name="clean"> | |
<delete dir="${basedir}/build" /> | |
</target> | |
<target name="prepare"> | |
<mkdir dir="${basedir}/build/logs" /> | |
<mkdir dir="${basedir}/build/codebrowser" /> | |
<mkdir dir="${basedir}/build/coverage" /> | |
<mkdir dir="${basedir}/build/cpd" /> | |
<mkdir dir="${basedir}/build/dependencies" /> | |
</target> | |
<target name="phpcs"> | |
<exec dir="${basedir}" executable="phpcs" failonerror="false" output="/dev/null"> | |
<arg line="--extensions=php --ignore=build/*,tests/* --standard=Zend --tab-width=4 --report=checkstyle --report-file=${basedir}/build/logs/checkstyle.xml ." /> | |
</exec> | |
</target> | |
<target name="phpmd"> | |
<exec dir="${basedir}" executable="phpmd" failonerror="false"> | |
<arg line=". xml codesize --reportfile ${basedir}/build/logs/pmd.xml" /> | |
</exec> | |
</target> | |
<target name="phpcpd"> | |
<exec dir="${basedir}" executable="phpcpd" failonerror="false"> | |
<arg line="--log-pmd=${basedir}/build/logs/pmd-cpd.xml | |
--exclude=build | |
--exclude=tests | |
." /> | |
</exec> | |
<exec dir="${basedir}/build/logs" executable="xsltproc" failonerror="false" output="${basedir}/build/cpd/index.html"> | |
<arg line="/path/to/cpd.xsl ${basedir}/build/logs/pmd-cpd.xml" /> | |
</exec> | |
</target> | |
<target name="pdepend"> | |
<exec dir="${basedir}" executable="pdepend" failonerror="false"> | |
<arg line="--jdepend-xml=${basedir}/build/logs/jdepend.xml | |
--jdepend-chart=${basedir}/build/dependencies/jdepend.svg | |
--overview-pyramid=${basedir}/build/dependencies/pyramid.svg | |
--optimization=best | |
--exclude=build,tests | |
." /> | |
</exec> | |
<exec dir="${basedir}/build/dependencies" executable="cp" failonerror="false"> | |
<arg line="${basedir}/path/to/dependencies.html index.html" /> | |
</exec> | |
</target> | |
<target name="phpcb"> | |
<exec dir="${basedir}" executable="phpcb" failonerror="false"> | |
<arg line="--log ${basedir}/build/logs --source ${basedir} --output ${basedir}/build/codebrowser" /> | |
</exec> | |
</target> | |
<target name="phpunit"> | |
<exec dir="${basedir}/tests" executable="phpunit" failonerror="true"> | |
<arg line="--log-junit ${basedir}/build/logs/phpunit.xml | |
--coverage-clover ${basedir}/build/logs/clover.xml | |
--coverage-html ${basedir}/build/coverage" /> | |
</exec> | |
</target> | |
<target name="documentation" depends="prepare"> | |
<exec dir="${basedir}" executable="docblox" failonerror="false"> | |
<arg line="run -t ${basedir}/build/docblox" /> | |
</exec> | |
</target> | |
<target name="parallel"> | |
<parallel> | |
<antcall target="phpcs" /> | |
<antcall target="phpmd" /> | |
<antcall target="phpcpd" /> | |
<antcall target="pdepend" /> | |
</parallel> | |
</target> | |
<target name="build" depends="clean,prepare,parallel" /> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment