1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Generated by PHP Project Wizard (PPW) 1.0.4 on Fri Mar 11 16:37:31 CET 2011 -->
3
4<project name="fDOMDocument" default="build" basedir=".">
5 <property name="source" value="src"/>
6
7 <target name="clean" description="Clean up and create artifact directories">
8  <delete dir="${basedir}/build/api"/>
9  <delete dir="${basedir}/build/code-browser"/>
10  <delete dir="${basedir}/build/coverage"/>
11  <delete dir="${basedir}/build/logs"/>
12  <delete dir="${basedir}/build/pdepend"/>
13
14  <mkdir dir="${basedir}/build/api"/>
15  <mkdir dir="${basedir}/build/code-browser"/>
16  <mkdir dir="${basedir}/build/coverage"/>
17  <mkdir dir="${basedir}/build/logs"/>
18  <mkdir dir="${basedir}/build/pdepend"/>
19 </target>
20
21 <target name="phpab">
22  <exec executable="phpab">
23   <arg line='-o src/autoload.php src' />
24  </exec>
25 </target>
26
27 <target name="phpunit" description="Run unit tests using PHPUnit and generates junit.xml and clover.xml">
28  <exec executable="phpunit" failonerror="true"/>
29 </target>
30
31 <target name="parallelTasks" description="Run the pdepend, phpmd, phpcpd, phpcs, phpdoc and phploc tasks in parallel using a maximum of 2 threads.">
32  <parallel threadCount="2">
33   <sequential>
34    <antcall target="pdepend"/>
35    <antcall target="phpmd"/>
36   </sequential>
37   <antcall target="phpcpd"/>
38   <antcall target="phpcs"/>
39   <antcall target="phploc"/>
40  </parallel>
41 </target>
42
43 <target name="pdepend" description="Generate jdepend.xml and software metrics charts using PHP_Depend">
44  <exec executable="pdepend">
45   <arg line="--jdepend-xml=${basedir}/build/logs/jdepend.xml
46              --jdepend-chart=${basedir}/build/pdepend/dependencies.svg
47              --overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg
48              ${source}" />
49  </exec>
50 </target>
51
52 <target name="phpmd" description="Generate pmd.xml using PHPMD">
53  <exec executable="phpmd">
54   <arg line="${source}
55              xml
56              codesize,design,naming,unusedcode
57              --reportfile ${basedir}/build/logs/pmd.xml" />
58  </exec>
59 </target>
60
61 <target name="phpcpd" description="Generate pmd-cpd.xml using PHPCPD">
62  <exec executable="phpcpd">
63   <arg line="--log-pmd ${basedir}/build/logs/pmd-cpd.xml ${source}" />
64  </exec>
65 </target>
66
67 <target name="phploc" description="Generate phploc.csv">
68  <exec executable="phploc">
69   <arg line="--log-csv ${basedir}/build/logs/phploc.csv ${source}" />
70  </exec>
71 </target>
72
73 <target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer">
74  <exec executable="phpcs" output="/dev/null">
75   <arg line="--report=checkstyle
76              --report-file=${basedir}/build/logs/checkstyle.xml
77              --standard=phpcs.xml
78              ${source}" />
79  </exec>
80 </target>
81
82 <target name="phpcb" description="Aggregate tool output with PHP_CodeBrowser">
83  <exec executable="phpcb">
84   <arg line="--log    ${basedir}/build/logs
85              --source ${source}
86              --output ${basedir}/build/code-browser" />
87  </exec>
88 </target>
89
90 <target name="build" depends="clean,parallelTasks,phpunit,phpcb"/>
91</project>
92