Project:
NOCC
Code Location:
https://nocc.svn.sourceforge.net/svnroot/nocc/trunk/trunk
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?xml version="1.0" encoding="UTF-8"?> <!-- You need the following tools to run all tasks: * Phing <http://phing.info/> * phpDocumentor <http://www.phpdoc.org/> * PHPunit <http://www.phpunit.de/> * PHP_CodeSniffer <http://pear.php.net/package/PHP_CodeSniffer> * PHP Mess Detector <http://phpmd.org/> * 7-Zip <http://www.7-zip.org/> --> <project name="nocc" default="phplint" basedir="."> <property file="build.properties" /> <!-- ============================================ --> <!-- Target: prepare --> <!-- ============================================ --> <target name="prepare"> <mkdir dir="${project.build.dir}" /> </target> <!-- ============================================ --> <!-- (DEFAULT) Target: phplint --> <!-- ============================================ --> <target name="phplint"> <phplint haltonfailure="true"> <fileset dir="${project.source.dir}"> <include name="**/*.php" /> </fileset> </phplint> </target> <!-- ============================================ --> <!-- Target: phpunit --> <!-- ============================================ --> <target name="phpunit" depends="prepare"> <phpunit haltonfailure="true" haltonerror="true"> <formatter type="plain" todir="${project.build.dir}" outfile="phpunit.txt" /> <batchtest> <fileset dir="${project.test.dir}"> <include name="**/*Test*.php" /> <!-- The "NOCC_Theme" test don't work currently from phing! --> <exclude name="**/NOCC_ThemeTest.php" /> </fileset> </batchtest> </phpunit> </target> <!-- ============================================ --> <!-- Target: phpdoc --> <!-- ============================================ --> <target name="phpdoc" depends="prepare" description="phpDocumentor"> <delete dir="${project.build.dir}/devdocs" includeemptydirs="true" failonerror="true" /> <phpdoc title="NOCC Developer Documentation" destdir="${project.build.dir}/devdocs" output="HTML:Smarty:PHP" sourcecode="false" defaultpackagename="NOCC" defaultcategoryname="default"> <fileset dir="${project.source.dir}"> <include name="**/*.php" /> <exclude name="ckeditor/**" /> </fileset> </phpdoc> </target> <!-- ============================================ --> <!-- Target: phpcs --> <!-- ============================================ --> <target name="phpcs" depends="prepare" description="PHP_CodeSniffer"> <phpcodesniffer standard="PEAR" sniffs="Generic_Sniffs_PHP_LowerCaseConstantSniff, Generic_Sniffs_PHP_DisallowShortOpenTagSniff, Generic_Sniffs_WhiteSpace_DisallowTabIndentSniff, PEAR_Sniffs_Functions_FunctionCallArgumentSpacingSniff" haltonerror="true" haltonwarning="true"> <fileset dir="${project.source.dir}"> <include name="**/*.php" /> <exclude name="ckeditor/**" /> <exclude name="_tests/lang/**" /> <exclude name="_tests/themes/**" /> </fileset> <formatter type="summary" outfile="${project.build.dir}/phpcs-summary.txt" /> <formatter type="full" outfile="${project.build.dir}/phpcs-full.txt" /> </phpcodesniffer> </target> <!-- ============================================ --> <!-- Target: phpmd --> <!-- ============================================ --> <target name="phpmd" depends="prepare" description="PHP Mess Detector"> <phpmd> <fileset dir="${project.source.dir}"> <include name="**/*.php" /> <exclude name="ckeditor/**" /> <exclude name="_tests/lang/**" /> <exclude name="_tests/themes/**" /> </fileset> <formatter type="html" outfile="${project.build.dir}/phpmd.html" /> </phpmd> </target> <!-- ============================================ --> <!-- Target: prepare-release --> <!-- ============================================ --> <target name="prepare-release" depends="prepare,phplint"> <delete dir="${project.release.build.dir}" includeemptydirs="true" failonerror="true" /> <copy todir="${project.release.build.dir}" > <fileset dir="${project.source.dir}"> <include name="**/*" /> <exclude name="config/conf.php" /> <exclude name="prefs/**" /> <exclude name="_tests/**" /> <exclude name="nbproject/**" /> <!-- Netbeans Project --> </fileset> </copy> </target> <!-- ============================================ --> <!-- Target: pack-release --> <!-- ============================================ --> <target name="pack-release"> <echo>Create tar file...</echo> <exec command="7z a -ttar ${project.build.dir}/${project.release.filename}.tar ${project.release.build.dir}/*" dir="${project.build.dir}" checkreturn="true" /> <echo>Create tar.gz file...</echo> <exec command="7z a -tgzip ${project.build.dir}/${project.release.filename}.tar.gz ${project.build.dir}/${project.release.filename}.tar" dir="${project.build.dir}" checkreturn="true" /> <echo>Create zip file...</echo> <exec command="7z a -tzip ${project.build.dir}/${project.release.filename}.zip ${project.release.build.dir}/*" dir="${project.build.dir}" checkreturn="true" /> <echo>Create 7z file...</echo> <exec command="7z a -t7z ${project.build.dir}/${project.release.filename}.7z ${project.release.build.dir}/*" dir="${project.build.dir}" checkreturn="true" /> </target> </project>
