forked from OpenConext-Attic/OpenConext-serviceregistry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
89 lines (79 loc) · 3.7 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
79
80
81
82
83
84
85
86
87
88
89
<project name="COIN EngineBlock" default="build">
<target name="build" depends="clean,prepare,lint,phpunit" />
<target name="report" depends="build, parallel" />
<target name="parallel">
<parallel>
<antcall target="phpcs" />
<antcall target="phpmd" />
<antcall target="phpcpd" />
<antcall target="pdepend" />
<antcall target="phpcb" />
</parallel>
</target>
<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="lint" description="Run syntax check for all classes" >
<apply dir="${basedir}" executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}">
<include name="**/*.php"/>
<include name="**/*.phtml"/>
<exclude name=".svn/**"/>
<exclude name="lib/Zend/**"/>
<exclude name="modules/janus/lib/jsonwrapper/jsonwrapper_inner.php"/>
</fileset>
</apply>
</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="phpcs">
<exec dir="${basedir}" executable="phpcs" failonerror="false" output="/dev/null">
<arg line="--extensions=php --ignore=build,tests,library/Zend,library/shindig,library/Corto --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 --exclude library/Zend --exclude library/shindig --exclude library/Corto ." />
</exec>
<exec dir="${basedir}/build/logs" executable="xsltproc" failonerror="false" output="${basedir}/build/cpd/index.html">
<arg line="${basedir}/ci/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,library/Zend,library/shindig,library/Corto
." />
</exec>
<exec dir="${basedir}/build/dependencies" executable="cp" failonerror="false">
<arg line="${basedir}/ci/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>
</project>