forked from noelg/pdepend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
87 lines (74 loc) · 3.02 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="PHP Depend" basedir=".">
<!--
Include local project properties.
-->
<property file="build.properties" />
<!--
Import common build targets
-->
<import file="${basedir}/setup/src/main/xml/base.xml" />
<!--
Updates the internal used case version number.
-->
<target name="pdepend:update-version">
<exec executable="${commons.executable.php}" failonerror="true">
<arg value="${basedir}/scripts/update-version.php" />
</exec>
</target>
<!--
We use the phar archive after hook to validate that a newly created
phar archive works as expected.
Parameters:
${-package:phar:filename} Name of the created phar file.
-->
<target name="-pdepend:package:phar:after~hooked" extensionOf="-package:phar:after~hook">
<antcall target="-package-execute">
<param name="-package.includepath" value="${commons:tmpdir}"/>
<param name="-package.executable" value="${-package:phar:filename}" />
</antcall>
</target>
<!--
We use the pear archive after hook to validate that a clean PHP_Depend
PEAR installation works as expected.
-->
<target name="-pdepend:package:pear:after~hooked" extensionOf="-package:pear:after~hook">
<antcall target="-package-execute">
<param name="-package.includepath" value="${common-pear-root-dir}"/>
<param name="-package.executable" value="${common-pear-bin-dir}/pdepend" />
</antcall>
</target>
<!--
Will execute the code contained in one of the package files.
Parameters
${-package.includepath} The used include path.
${-package.executable} The projects executable
-->
<target name="-package-execute">
<echo message="Executing:" level="verbose" />
<echo message=" ${-package.executable} --summary-xml... PDepend/Source" level="verbose" />
<exec dir="${commons.srcdir.php}"
executable="${commons.executable.php}"
failonerror="true">
<arg value="-d" />
<arg value="include_path=${-package.includepath}" />
<arg value="${-package.executable}" />
<arg value="--summary-xml=${commons:tmpdir}/summary.xml" />
<arg value="--jdepend-xml=${commons:tmpdir}/jdepend.xml" />
<arg value="--jdepend-chart=${commons:tmpdir}/jdepend.svg" />
<arg value="--overview-pyramid=${commons:tmpdir}/pyramid.svg" />
<arg value="--coderank-mode=inheritance,property,method" />
<arg value="PDepend/Source" />
</exec>
</target>
<!--
UTILIZED EXTENSION POINTS
-->
<!--
This extension of the initialize phase triggers an update of the
internally used case identifier.
-->
<target name="-pdepend:initialize:main~hooked"
depends="pdepend:update-version"
extensionOf="-initialize:main~hook" />
</project>