-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
78 lines (69 loc) · 2.55 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<project name="pageFactory" default="build">
<property file="build.properties"/>
<property name="source" value="library/Tzander"/>
<property name="exclude_lib" value="tests"/>
<target name="build" depends="clean,prepare,phpunit"/>
<target name="clean">
<delete dir="build"/>
<delete dir="api"/>
<delete dir="web"/>
</target>
<!-- create the used directories -->
<target name="prepare">
<mkdir dir="build/logs"/>
<mkdir dir="build/screenshots"/>
<mkdir dir="api"/>
<mkdir dir="web"/>
</target>
<target name="doc-blox">
<exec executable="docblox" dir="${source}" logerror="on">
<arg line="run -d ${base}/${source} -t ${base}/api "/>
</exec>
</target>
<!-- detects the copy and paste parts -->
<target name="phpcpd" depends="prepare">
<exec dir="${base}" executable="phpcpd" failonerror="false">
<arg line="--log-pmd build/logs/cpd.xml ${source}"/>
</exec>
</target>
<!-- pdepend uses some metrics -->
<target name="pdepend" depends="prepare">
<exec dir="${base}" executable="pdepend" failonerror="false">
<arg
line="--ignore=${exclude_lib}
--jdepend-xml=build/logs/jdepend.xml ${source}"/>
</exec>
</target>
<!-- codesniffer checks the source for some coding style violations -->
<target name="phpcs" depends="prepare">
<exec dir="${base}" executable="phpcs"
output="${base}/build/logs/checkstyle.xml" failonerror="false">
<arg
line="--ignore=${exclude_lib}
--extensions=php
--standard=PSR2
--report=checkstyle ${source}
"/>
</exec>
</target>
<!-- unittesting - creates 2 log files a test log and a coverage log -->
<target name="phpunit">
<exec dir="${base}/tests" executable="phpunit" failonerror="true">
<arg
line=" --debug
--log-junit ${base}/build/logs/junit.xml
--coverage-clover ${base}/build/logs/clover.xml
--coverage-html ${base}/web
--configuration ${base}/tests/phpunit.xml"/>
</exec>
</target>
<target name="phpmd">
<exec dir="${source}/" executable="phpmd" failonerror="false">
<arg
line=". xml codesize
--reportfile ${base}/build/logs/pmd.xml
--exclude ${exclude_lib}"/>
</exec>
</target>
<target name="release" depends="build"/>
</project>