1 |
d2a8c3fd
|
Marc NICOLAS
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
<target name="prepare-extensions">
|
25 |
|
|
|
26 |
|
|
<mkdir dir="${dist.dir}" />
|
27 |
|
|
</target>
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
<target name="compile-extensions">
|
31 |
|
|
<javac srcdir="./src" debug="${debug}" deprecation="${deprecation}"
|
32 |
|
|
optimize="${optimize}" encoding="${encoding}" includeAntRuntime="false"
|
33 |
|
|
destdir="${out.classes.dir}">
|
34 |
|
|
<classpath refid="compile.classpath" />
|
35 |
|
|
</javac>
|
36 |
|
|
|
37 |
|
|
<copy todir="${out.classes.dir}">
|
38 |
|
|
<fileset dir="${src.dir}">
|
39 |
|
|
<patternset refid="all.resource.files" />
|
40 |
|
|
</fileset>
|
41 |
|
|
</copy>
|
42 |
|
|
</target>
|
43 |
|
|
|
44 |
|
|
<target name="jar-extensions">
|
45 |
|
|
<delete file="modules.jar" />
|
46 |
|
|
<property name="version.num" value="1.00" />
|
47 |
|
|
<buildnumber file="build.num" />
|
48 |
|
|
<jar jarfile="${dist.dir}/${project.name}.jar" basedir="${out.classes.dir}"
|
49 |
|
|
includes="**/*.class" excludes="**/*Helper">
|
50 |
|
|
<metainf dir="${out.classes.dir}/META-INF">
|
51 |
|
|
<include name="**/*Helper" />
|
52 |
|
|
</metainf>
|
53 |
|
|
</jar>
|
54 |
|
|
</target>
|
55 |
|
|
|
56 |
|
|
<target name="cleanup-extensions">
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
</target>
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
<target name="test-init">
|
72 |
|
|
<mkdir dir="${test.dir}" />
|
73 |
|
|
<delete dir="${test.reports.data.dir}" />
|
74 |
|
|
<delete dir="${test.reports.dir}" />
|
75 |
|
|
<mkdir dir="${test.reports.dir}" />
|
76 |
|
|
<mkdir dir="${test.reports.data.dir}" />
|
77 |
|
|
</target>
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
<target name="test-compile">
|
82 |
|
|
|
83 |
|
|
<javac srcdir="${test.src.dir}" destdir="${test.classes.dir}"
|
84 |
|
|
debug="${debug}" deprecation="${deprecation}" optimize="${optimize}"
|
85 |
|
|
includeAntRuntime="false">
|
86 |
|
|
|
87 |
|
|
<classpath>
|
88 |
|
|
<path refid="test.classpath" />
|
89 |
|
|
</classpath>
|
90 |
|
|
</javac>
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
<copy todir="${test.conf.dir}" includeemptydirs="false">
|
94 |
|
|
<fileset dir="${test.src.dir}" excludes="**/*.java" />
|
95 |
|
|
</copy>
|
96 |
|
|
</target>
|
97 |
|
|
|
98 |
|
|
<property name="test.last.failed.file" location="${test.dir}/.lasttestsfailed" />
|
99 |
|
|
|
100 |
|
|
|
101 |
|
|
|
102 |
|
|
<target name="test"
|
103 |
|
|
description="Execution des tests JUnit et generation du rapport de test">
|
104 |
|
|
<echo level="info" message="" />
|
105 |
|
|
|
106 |
|
|
|
107 |
|
|
<junit printsummary="yes" errorProperty="test.failed"
|
108 |
|
|
failureProperty="test.failed" fork="yes" dir="${basedir}">
|
109 |
|
|
<sysproperty key="net.sourceforge.cobertura.datafile"
|
110 |
|
|
file="cobertura.ser" />
|
111 |
|
|
<classpath refid="instrumented.classpath" />
|
112 |
|
|
<classpath refid="test.classpath" />
|
113 |
|
|
<formatter type="brief" usefile="false" />
|
114 |
|
|
<formatter type="xml" />
|
115 |
|
|
<test name="${testcase}" if="testcase" />
|
116 |
|
|
<batchtest todir="${test.reports.data.dir}" unless="testcase">
|
117 |
|
|
<fileset dir="${test.classes.dir}" includes="**/ext/test/**/Test*.class"
|
118 |
|
|
excludes="**/Abstract*.class **/TestRunner.class" />
|
119 |
|
|
<fileset dir="${test.classes.dir}" includes="**/ext/test/**/*Test.class"
|
120 |
|
|
excludes="**/Abstract*.class" />
|
121 |
|
|
<fileset dir="${test.classes.dir}" includes="**/ext/test/**/*TestCase.class"
|
122 |
|
|
excludes="**/Abstract*.class" />
|
123 |
|
|
</batchtest>
|
124 |
|
|
</junit>
|
125 |
|
|
|
126 |
|
|
<junitreport todir="${test.reports.data.dir}">
|
127 |
|
|
<fileset dir="${test.reports.data.dir}">
|
128 |
|
|
<include name="TEST-*.xml" />
|
129 |
|
|
</fileset>
|
130 |
|
|
<report format="frames" todir="${test.reports.dir}" />
|
131 |
|
|
</junitreport>
|
132 |
|
|
|
133 |
|
|
<echo message="last build failed tests" file="${test.last.failed.file}" />
|
134 |
|
|
<fail if="test.failed">
|
135 |
|
|
Unit tests failed. Check log or reports for details
|
136 |
|
|
</fail>
|
137 |
|
|
|
138 |
|
|
|
139 |
|
|
<delete file="${test.last.failed.file}" />
|
140 |
|
|
</target>
|
141 |
|
|
|
142 |
|
|
|
143 |
|
|
<path id="instrument.classpath">
|
144 |
|
|
<fileset dir="${out.classes.dir}">
|
145 |
|
|
<include name="**/*.class" />
|
146 |
|
|
</fileset>
|
147 |
|
|
</path>
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
<path id="instrumented.classpath">
|
151 |
|
|
<pathelement location="${instrumented.dir}" />
|
152 |
|
|
</path>
|
153 |
|
|
|
154 |
|
|
<target name="instrumentClasses" depends="build-extensions">
|
155 |
|
|
<delete dir="${cobertura.reports.dir}" />
|
156 |
|
|
<mkdir dir="${cobertura.reports.dir}" />
|
157 |
|
|
<path refid="test" />
|
158 |
|
|
<cobertura-instrument todir="${instrumented.dir}"
|
159 |
|
|
datafile="cobertura.ser">
|
160 |
|
|
<ignore regex="org.apache.log4j.*" />
|
161 |
|
|
<fileset dir="${out.classes.dir}">
|
162 |
|
|
<include name="**/*.class" />
|
163 |
|
|
<exclude name="**/*Test.class" />
|
164 |
|
|
</fileset>
|
165 |
|
|
</cobertura-instrument>
|
166 |
|
|
</target>
|
167 |
|
|
|
168 |
|
|
<target name="coverage" depends="instrumentClasses, execute-tests-ext">
|
169 |
|
|
<cobertura-report format="html" srcdir="${src.dir}"
|
170 |
|
|
destdir="${cobertura.reports.dir}" datafile="cobertura.ser" />
|
171 |
|
|
<cobertura-report format="xml" srcdir="${src.dir}"
|
172 |
|
|
destdir="${cobertura.reports.dir}" datafile="cobertura.ser" />
|
173 |
|
|
</target>
|
174 |
|
|
|
175 |
|
|
<target name="audit" description="Generates a report of code convention violations.">
|
176 |
|
|
|
177 |
|
|
<delete dir="${checkstyle.reports.dir}" />
|
178 |
|
|
<delete dir="${pmd.reports.dir}" />
|
179 |
|
|
<delete dir="${cpd.reports.dir}" />
|
180 |
|
|
|
181 |
|
|
<mkdir dir="${checkstyle.reports.dir}" />
|
182 |
|
|
<mkdir dir="${pmd.reports.dir}" />
|
183 |
|
|
<mkdir dir="${cpd.reports.dir}" />
|
184 |
|
|
|
185 |
|
|
|
186 |
|
|
<checkstyle config="${audit.checkstyle.rules.dir}/AKKA-CheckStyle.xml"
|
187 |
|
|
failureProperty="checkstyle.failure" failOnViolation="false">
|
188 |
|
|
<formatter type="xml"
|
189 |
|
|
tofile="${checkstyle.reports.dir}/checkstyle_report.xml" />
|
190 |
|
|
<fileset dir="${src.dir}" includes="**/*.java" />
|
191 |
|
|
</checkstyle>
|
192 |
|
|
<xslt in="${checkstyle.reports.dir}/checkstyle_report.xml" out="${checkstyle.reports.dir}/checkstyle_report.html"
|
193 |
|
|
style="${audit.xsl.dir}/${checkstyle.xsl}" />
|
194 |
|
|
|
195 |
|
|
|
196 |
|
|
<pmd rulesetfiles="${audit.pmd.rules.dir}/AKKA-PMD.xml">
|
197 |
|
|
<formatter type="xml" toFile="${pmd.reports.dir}/pmd_report.xml" />
|
198 |
|
|
<fileset dir="${src.dir}">
|
199 |
|
|
<include name="**/*.java" />
|
200 |
|
|
</fileset>
|
201 |
|
|
</pmd>
|
202 |
|
|
|
203 |
|
|
|
204 |
|
|
<cpd minimumTokenCount="100" outputFile="${cpd.reports.dir}/cpd_report.xml"
|
205 |
|
|
format="xml">
|
206 |
|
|
<fileset dir="${src.dir}">
|
207 |
|
|
<include name="**/*.java" />
|
208 |
|
|
</fileset>
|
209 |
|
|
</cpd>
|
210 |
|
|
|
211 |
|
|
</target>
|
212 |
|
|
|
213 |
|
|
|
214 |
|
|
|
215 |
|
|
|
216 |
|
|
<target name="init">
|
217 |
|
|
|
218 |
|
|
|
219 |
|
|
<tstamp />
|
220 |
|
|
|
221 |
|
|
|
222 |
|
|
<echo message="--------- ${project.fullname} ${project.version} ---------" />
|
223 |
|
|
<echo message="" />
|
224 |
|
|
|
225 |
|
|
<echo message="java.class.path = ${java.class.path}" />
|
226 |
|
|
<echo message="" />
|
227 |
|
|
<echo message="java.home = ${java.home}" />
|
228 |
|
|
<echo message="user.home = ${user.home}" />
|
229 |
|
|
<echo message="" />
|
230 |
|
|
<echo message="basedir = ${basedir}" />
|
231 |
|
|
<echo message="" />
|
232 |
|
|
<echo message="compile.classpath = ${toString:compile.classpath}" />
|
233 |
|
|
|
234 |
|
|
|
235 |
|
|
|
236 |
|
|
|
237 |
|
|
|
238 |
|
|
|
239 |
|
|
|
240 |
|
|
|
241 |
|
|
<filter token="project" value="${project.fullname}" />
|
242 |
|
|
<filter token="version" value="${project.version}" />
|
243 |
|
|
<filter token="year" value="${year}" />
|
244 |
|
|
<filter token="author" value="${author}" />
|
245 |
|
|
</target>
|
246 |
|
|
|
247 |
|
|
|
248 |
|
|
|
249 |
|
|
<target name="clean">
|
250 |
|
|
|
251 |
|
|
<delete>
|
252 |
|
|
<fileset dir=".">
|
253 |
|
|
<patternset refid="all.tmp.files" />
|
254 |
|
|
</fileset>
|
255 |
|
|
</delete>
|
256 |
|
|
|
257 |
|
|
|
258 |
|
|
<delete dir="${out.classes.dir}" />
|
259 |
|
|
<mkdir dir="${out.classes.dir}" />
|
260 |
|
|
</target>
|
261 |
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
|
|
|
265 |
|
|
<target name="prepare">
|
266 |
|
|
|
267 |
|
|
<mkdir dir="${out.classes.dir}" />
|
268 |
|
|
<mkdir dir="${lib.dir}" />
|
269 |
|
|
|
270 |
|
|
<mkdir dir="${dist.dir}" />
|
271 |
|
|
</target>
|
272 |
|
|
|
273 |
|
|
<path id="javadoc">
|
274 |
|
|
<pathelement location="${src.dir}" />
|
275 |
|
|
</path>
|
276 |
|
|
|
277 |
|
|
<target name="javadoc">
|
278 |
|
|
|
279 |
|
|
|
280 |
|
|
<delete dir="${out.javadoc.dir}/sources" />
|
281 |
|
|
|
282 |
|
|
|
283 |
|
|
<mkdir dir="${out.javadoc.dir}/sources" />
|
284 |
|
|
|
285 |
|
|
|
286 |
|
|
<javadoc sourcepathref="javadoc" packagenames="${project.packagenames}.*"
|
287 |
|
|
destdir="${out.javadoc.dir}/sources" author="true" public="true"
|
288 |
|
|
version="true" use="true" windowtitle="${project.fullname} ${project.version}"
|
289 |
|
|
doctitle="${project.fullname} ${project.version}"
|
290 |
|
|
bottom="Copyright &copy; ${year} ${author}. All Rights Reserved.">
|
291 |
|
|
<classpath>
|
292 |
|
|
<path>
|
293 |
|
|
<fileset dir="${cots.dir}/restlet-2.0.5-patched">
|
294 |
|
|
<include name="**/*.jar" />
|
295 |
|
|
</fileset>
|
296 |
|
|
</path>
|
297 |
|
|
<path>
|
298 |
|
|
<fileset dir="${ROOT_DIRECTORY}/workspace/libraries">
|
299 |
|
|
<include name="**/*.jar" />
|
300 |
|
|
</fileset>
|
301 |
|
|
</path>
|
302 |
|
|
<path>
|
303 |
|
|
<fileset dir="${ROOT_DIRECTORY}/workspace/org.restlet.ext.solr">
|
304 |
|
|
<include name="**/*.jar" />
|
305 |
|
|
</fileset>
|
306 |
|
|
</path>
|
307 |
|
|
</classpath>
|
308 |
|
|
</javadoc>
|
309 |
|
|
|
310 |
|
|
|
311 |
|
|
<zip zipfile="${dist.dir}/${project.name}-doc-${project.version}.zip"
|
312 |
|
|
basedir="${out.javadoc.dir}" />
|
313 |
|
|
|
314 |
|
|
|
315 |
|
|
|
316 |
|
|
</target>
|
317 |
|
|
|
318 |
|
|
<target name="javadoc-tests">
|
319 |
|
|
|
320 |
|
|
|
321 |
|
|
<delete dir="${out.javadoc.dir}/tests" />
|
322 |
|
|
|
323 |
|
|
|
324 |
|
|
<mkdir dir="${out.javadoc.dir}/tests" />
|
325 |
|
|
|
326 |
|
|
|
327 |
|
|
<javadoc sourcepath="${test.src.dir}" packagenames="${project.packagenames}.*"
|
328 |
|
|
destdir="${out.javadoc.dir}/tests" author="true" public="true"
|
329 |
|
|
version="true" use="true" windowtitle="${project.fullname} ${project.version}"
|
330 |
|
|
doctitle="${project.fullname} ${project.version}"
|
331 |
|
|
bottom="Copyright &copy; ${year} ${author}. All Rights Reserved.">
|
332 |
|
|
<link href="http://localhost:8182/sitools/developer/javadoc"
|
333 |
|
|
packagelistloc="." />
|
334 |
|
|
<link offline="true" href="http://www.restlet.org/documentation/2.0/jse/api/"
|
335 |
|
|
packagelistloc="${cots.dir}/restlet-jse-2.0snapshot/docs/api" />
|
336 |
|
|
<link offline="true" href="http://xstream.codehaus.org"
|
337 |
|
|
packagelistloc="http://xstream.codehaus.org/javadoc/" />
|
338 |
|
|
<link offline="true" href="http://www.junit.org/" packagelistloc="${cots.dir}/junit/junit4.8.2/javadoc" />
|
339 |
|
|
<classpath>
|
340 |
|
|
<pathelement path="${java.class.path}" />
|
341 |
|
|
<pathelement path="${servlet.jar}" />
|
342 |
|
|
<fileset dir="${lib.dir}">
|
343 |
|
|
<include name="**/*.jar" />
|
344 |
|
|
<include name="**/*.zip" />
|
345 |
|
|
</fileset>
|
346 |
|
|
<fileset dir="${cots.dir}/restlet-2.0.5-patched">
|
347 |
|
|
<include name="**/*.jar" />
|
348 |
|
|
<include name="**/*.zip" />
|
349 |
|
|
</fileset>
|
350 |
|
|
</classpath>
|
351 |
|
|
</javadoc>
|
352 |
|
|
|
353 |
|
|
|
354 |
|
|
<zip
|
355 |
|
|
zipfile="${dist.dir}/${project.name}-doc-tests-${project.version}-${DSTAMP}.zip"
|
356 |
|
|
basedir="${out.javadoc.dir}/tests" />
|
357 |
|
|
|
358 |
|
|
|
359 |
|
|
|
360 |
|
|
</target> |