-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
597 lines (483 loc) · 23.3 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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
<!--
Ant build script for the fb-contrib Eclipse Plugin.
Use the dist target to build a distributable plugin zip file.
Use the site target to build an update site.
-->
<project name="fbcontribeclipse" default="make-stable-p2">
<!-- Eclipse plugin id, will never change -->
<property name="plugin.id" value="fb-contrib-eclipse-quick-fixes" />
<!-- Plugin id suffix which is the build date -->
<tstamp>
<format property="plugin.date" pattern="yyyyMMdd-HHmm" />
</tstamp>
<echo>"${plugin.date}"</echo>
<!--
The local.properties file must contain the location of
- Eclipse platform (key is "build.eclipse.dir", value is the 3.3+ Eclipse plugins folder)
- a git installation (key is "git.full-path", value is the absolute path to the git executable)
This values are likely to be different for each checkout of the plugin,
so the local.properties file is not managed by version control.
See local.properties.example for an example setup file
-->
<property file="local.properties" />
<property file="build.properties" />
<!-- Sets a default eclipse location -->
<property name="build.eclipse.dir" value="~/eclipse" />
<property name="test.eclipse.dir" value = "${build.eclipse.dir}" />
<!-- Sets a default git location (for Ubuntu) -->
<property name="git.full-path" value="/usr/bin/git" />
<property name="build.dir" value="."/>
<property name="src.dir" value="src"/>
<property name="test.dir" value="test"/>
<property name="zip.dir" value="zips"/>
<property name="dist.dir" value="dist"/>
<property name="jvm.args.test" value=""/>
<!-- the binaries/classes, built by javac -->
<property name="bin.dir" value="bin_build" />
<!-- update site destination directory -->
<property name="site.dir" value="${bin.dir}/site" />
<property name="test-site.dir" value="${bin.dir}/test-site" />
<property name="test.reports.dir" value="reports/" />
<!-- fb-contrib core package name in slashed notation -->
<property name="fbcontribpackage" value="com/mebigfatguy/fbcontrib" />
<property name="findbugs.dev.dir" value="../findbugs/" />
<!-- For building -->
<property name="findbugs.dev.plugin.url" value="https://github.com/kjlubick/fb-contrib-eclipse-quick-fixes/releases/download/0.5.2/plugins-edu.umd.cs.findbugs.plugin.eclipse_3.0.1.20150306-5afe4d1.jar" />
<!-- For Testing -->
<property name="findbugs.dev.plugin.with.plugins.url" value="https://github.com/kjlubick/fb-contrib-eclipse-quick-fixes/releases/download/0.5.2/plugins-edu.umd.cs.findbugs.plugin.eclipse_3.0.1.20150306-5afe4d1_fb_contrib_find_security_bugs.jar" />
<property name="findbugs.dev.feature.url" value="https://github.com/kjlubick/fb-contrib-eclipse-quick-fixes/releases/download/0.5.2/features-edu.umd.cs.findbugs.plugin.eclipse_3.0.1.20150306-5afe4d1.jar" />
<property name="findbugs.dev.version" value="3.0.1.20150306-5afe4d1" />
<!-- Location of fb-contrib.jar to extract and include in this build -->
<property name="fb-contrib.jar" value="${fb-contrib.dir}/fb-contrib-${fb-contrib.version}.jar" />
<property name="fb-contrib.url" value="https://github.com/kjlubick/fb-contrib-eclipse-quick-fixes/releases/download/0.4.0/fb-contrib-6.1.0.jar"/>
<target name="init">
<fail message="Please specify path to the Eclipse 3.6+ plugins folder in local.properties file. See local.properties.example">
<condition>
<not>
<available file="${build.eclipse.dir}/plugins" type="dir"/>
</not>
</condition>
</fail>
<fail message="Requires JDK 7.x (not 8!), using: ${ant.java.version}">
<condition>
<equals arg1="1.8" arg2="${ant.java.version}"/>
</condition>
</fail>
<mkdir dir="${fb-contrib.dir}"/>
<mkdir dir="${findbugs.dev.dir}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${bin.dir}"/>
<mkdir dir="${zip.dir}"/>
</target>
<target name="clean" depends="init" description="Clean up temporary files">
<delete includeemptydirs="true" >
<fileset dir="${bin.dir}" includes="**/*"/>
<fileset dir="${zip.dir}" includes="**/*"/>
<!-- defaultexcludes is required to delete .svn and .cvsignore -->
<fileset dir="${dist.dir}" includes="**/*" defaultexcludes="false"/>
</delete>
</target>
<target name="fb-contrib.check">
<condition property="fb-contrib.exists">
<available file="${fb-contrib.jar}" type="file"/>
</condition>
</target>
<target name="downloadFB-contrib" depends="clean, fb-contrib.check" unless="fb-contrib.exists" description="download fb-contrib if it doesn't exist">
<echo message="Downloading fb-contrib" />
<get src="${fb-contrib.url}" dest="${fb-contrib.jar}" verbose="true" />
</target>
<target name="findbugs-installed-check">
<condition property="findbugs.dev.exists">
<available file="${findbugs.dev.dir}/findbugs-plugin.jar" type="file"/>
</condition>
<echo message="Does ${findbugs.dev.dir}/findbugs-plugin.jar exist? ${findbugs.dev.exists}" />
</target>
<target name="download-dev-findbugs" depends="clean, findbugs-installed-check" unless="findbugs.dev.exists" description="download a dev version of eclipse">
<echo message="Downloading Dev version of findbugs" />
<get src="${findbugs.dev.plugin.url}"
dest="${findbugs.dev.dir}/findbugs-dev.jar" verbose="true"/>
<unzip src="${findbugs.dev.dir}/findbugs-dev.jar" dest="${findbugs.dev.dir}"/>
</target>
<target name="extractJar" depends="init, downloadFB-contrib">
<echo message="Copying fb-contrib classes to Eclipse plugin"/>
<unzip src="${fb-contrib.jar}" dest="${bin.dir}">
<patternset>
<include name="**/*.*" />
<exclude name="${fbcontribpackage}/collect/*.*" />
<exclude name="*.xml" />
<exclude name="bugrank.txt" />
<exclude name="META-INF/*.*" />
</patternset>
</unzip>
</target>
<target name="classes" depends="init, extractJar, download-dev-findbugs, downloadFB-contrib" description="Compile java source files">
<echo message="Compiling fb-contrib Eclipse quickfixes plugin" />
<!-- Set up Classpath -->
<path id="plugin.classpath">
<fileset dir="${build.eclipse.dir}/plugins">
<include name="**/*.jar"/>
<exclude name="**/datanucleus-enhancer*.jar"/>
<exclude name="fb-contrib-eclipse-quick-fixes/*.jar"/>
<exclude name="edu.umd.cs.*"/>
</fileset>
<fileset dir="${findbugs.dev.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- Compile Java source files. -->
<javac srcdir="${src.dir}" includeantruntime="false"
destdir="${bin.dir}" source="1.7" target="1.7" debug="on" >
<classpath refid="plugin.classpath"/>
<compilerarg value="-Xlint:all,-path,-unchecked"/>
</javac>
<antcall target="classes-test" inheritRefs="true"/>
</target>
<target name="classes-test" if="include.tests">
<!-- Compile test files. -->
<javac srcdir="${test.dir}" includeantruntime="false"
destdir="${bin.dir}" source="1.7" target="1.7" debug="on" >
<classpath refid="plugin.classpath"/>
<compilerarg value="-Xlint:all,-path,-unchecked"/>
</javac>
</target>
<target name="version" description="Extract the plugin id and version">
<echo message="Verifying and creating fb-contrib Eclipse quickfixes plugin version info"/>
<!-- 1) read plugin base version from META-INF/MANIFEST.MF to ${eclipse.release.base} -->
<loadfile srcFile="META-INF/MANIFEST.MF" property="eclipse.release.base">
<filterchain>
<tokenfilter>
<containsregex pattern="Bundle-Version: (.*)\.qualifier" replace="\1"/>
</tokenfilter>
<deletecharacters chars=" \n\r"/>
</filterchain>
</loadfile>
<echo message="${eclipse.release.base}" file="${basedir}/version.txt" />
<!-- 1) set the values for plugin.version -->
<property name="plugin.qualifier" value="${plugin.date}" />
<property name="plugin.version" value="${eclipse.release.base}.${plugin.qualifier}" />
<echo>plugin version ${plugin.version}</echo>
<!-- 3) Copy META-INF/MANIFEST.MF to ${dist.dir}, update "qualifier" to current date/time -->
<copy file="META-INF/MANIFEST.MF" toFile="${dist.dir}/META-INF/MANIFEST.MF" overwrite="true">
<filterset begintoken="q" endtoken="r">
<filter token="ualifie" value="${plugin.qualifier}"/>
</filterset>
</copy>
</target>
<!-- per default, FB core classes are not recompiled if already available -->
<target name="dist" depends="clean,classes,version"
description="Build a plugin distributable">
<echo message="Creating fb-contrib Eclipse quickfixes plugin binary distribution"/>
<jar destfile="${dist.dir}/fb-contrib-eclipse-plugin.jar" >
<fileset dir="${bin.dir}"/>
</jar>
<copy todir="${dist.dir}" >
<fileset dir="${build.dir}" >
<include name="RELEASENOTES"/>
<include name="plugin.xml"/>
<include name=".options"/>
<include name="plugin*.properties"/>
<include name="about.*"/>
<include name="plugin/*.*" />
<!-- p2 installation instructions, added because of bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=265525#c18
and disabled because of bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=256361
<include name="META-INF/p2.inf" /> -->
</fileset>
</copy>
<antcall target="dist-test"/>
<!-- Create plugin zipfile. -->
<zip destfile="${zip.dir}/${plugin.id}_${plugin.version}.zip">
<zipfileset prefix="${plugin.id}_${plugin.version}" dir="${dist.dir}" includes="**"/>
</zip>
</target>
<target name="dist-test" if="include.tests">
<mkdir dir="${dist.dir}/classesToFix"/>
<mkdir dir="${dist.dir}/fixedClasses"/>
<mkdir dir="${dist.dir}/mockLibraries"/>
<copy todir="${dist.dir}/classesToFix" >
<fileset dir="${build.dir}/classesToFix" >
<include name="**/*.java"/>
</fileset>
</copy>
<copy todir="${dist.dir}/fixedClasses" >
<fileset dir="${build.dir}/fixedClasses" >
<include name="**/*.java"/>
</fileset>
</copy>
<copy todir="${dist.dir}/mockLibraries" >
<fileset dir="${build.dir}/mockLibraries" >
<include name="**/*.java"/>
</fileset>
</copy>
<jar destfile="${dist.dir}/pde-test.jar" >
<fileset dir="${bin.dir}">
<include name="utils/PDE*.class"/>
</fileset>
</jar>
</target>
<!-- Build source distribution. -->
<target name="srcdist" depends="clean,classes,version,dist" unless="doNotExportSrc">
<echo message="Creating fb-contrib Eclipse quickfixes plugin source distribution"/>
<property file="${bin.dir}/plugininfo.properties"/>
<mkdir dir="${dist.dir}/src"/>
<delete dir="${dist.dir}/src/eclipsePlugin-${plugin.version}"/>
<exec executable="${git.full-path}" spawn="false" dir="${basedir}" failonerror="true">
<arg value="archive"/>
<arg value="-o"/>
<arg value="${zip.dir}/${plugin.id}_${plugin.version}-source.zip"/>
<arg value="HEAD"/>
</exec>
</target>
<target name="stable-site" depends="srcdist" description="Creates Eclipse update site with this version as the primary version">
<echo message="Creating fb-contrib Eclipse quickfixes plugin update sites"/>
<filterset id="sitevars">
<filter token="PLUGIN_ID" value="${plugin.id}"/>
<filter token="PLUGIN_VERSION" value="${plugin.version}"/>
<filter token="FEATURE_ID" value="${plugin.id}"/>
<filter token="FEATURE_VERSION" value="${plugin.version}"/>
<filter token="FINDBUGS_VERSION" value="${findbugs.dev.version}"/>
</filterset>
<mkdir dir="${site.dir}"/>
<mkdir dir="${site.dir}/features"/>
<mkdir dir="${site.dir}/plugins"/>
<!-- plugin.jar: can't rename the .zip file from the 'dist' target because of the prefix -->
<zip destfile="${site.dir}/plugins/${plugin.id}_${plugin.version}.jar">
<fileset dir="${dist.dir}" includes="**"/>
</zip>
<!-- feature.jar -->
<copy file="${build.dir}/plugin_feature.xml" toFile="${site.dir}/feature.xml">
<filterset refid="sitevars"/>
</copy>
<!-- use zip task, not jar task, since we don't want a manifest -->
<zip destfile="${site.dir}/features/${plugin.id}_${plugin.version}.jar" compress="false">
<fileset file="${site.dir}/feature.xml"/>
</zip>
<move file="${site.dir}/feature.xml" tofile="${site.dir}/.feature.xml"/>
<!-- site.xml -->
<echo level="info" message="copying site.xml to ${site.dir}"/>
<copy file="${build.dir}/plugin_site_stable.xml" toFile="${site.dir}/site.xml">
<filterset refid="sitevars"/>
</copy>
<condition property="findbugs.alreadydownloaded">
<available file="${site.dir}/plugins/edu.umd.cs.findbugs.plugin.eclipse_${findbugs.dev.version}.jar" type="file"/>
</condition>
<antcall target="download-findbugs-dev-plugin">
<param name="dl.loc" value="${site.dir}"/>
</antcall>
<echo>Built site for stable plugin version ${plugin.version}</echo>
</target>
<target name="download-findbugs-dev-plugin" unless="findbugs.alreadydownloaded">
<echo level="info" message="Downloading FindBugs dev version ${findbugs.dev.version}" />
<get src="${findbugs.dev.plugin.url}"
dest="${dl.loc}/plugins/edu.umd.cs.findbugs.plugin.eclipse_${findbugs.dev.version}.jar" verbose="true"/>
</target>
<target name="dev-site" depends="srcdist" description="Creates Eclipse update site with this version added as a dev version">
<echo message="Creating fb-contrib Eclipse quickfixes plugin update sites"/>
<filterset id="sitevars">
<filter token="PLUGIN_ID" value="${plugin.id}"/>
<filter token="PLUGIN_VERSION" value="${plugin.version}"/>
<filter token="FEATURE_ID" value="${plugin.id}"/>
<filter token="FEATURE_VERSION" value="${plugin.version}"/>
<filter token="FINDBUGS_VERSION" value="${findbugs.dev.version}"/>
</filterset>
<mkdir dir="${site.dir}"/>
<mkdir dir="${site.dir}/dev-features"/>
<mkdir dir="${site.dir}/plugins"/>
<!-- for debugging
<copy file="${build.dir}/old_site.xml" toFile="${site.dir}/old_site.xml" overwrite="true"></copy>
-->
<!-- Download old site.xml (with normal version-->
<get src="http://dl.bintray.com/kjlubick/fb-contrib-eclipse-quickfixes/site.xml"
dest="${site.dir}/old_site.xml" verbose="true"/>
<!-- Copy old_site.xml and remove anything starting with the dev prefix --> <!--dev-->
<!-- or </site -->
<copy file="${site.dir}/old_site.xml"
toFile="${site.dir}/site.xml" overwrite="true">
<filterchain>
<linecontains negate="true">
<contains value="<!--dev-->"/>
</linecontains>
<linecontains negate="true">
<contains value="</site>"/>
</linecontains>
</filterchain>
</copy>
<!-- load the dev portions (Bleeding edge category and our new feature) and fill with
Appropriate version details -->
<loadfile srcFile="${build.dir}/plugin_site_dev.xml"
property="dev.release.xml">
<filterchain>
<replacetokens>
<token key="FEATURE_ID" value="${plugin.id}"/>
<token key="FEATURE_VERSION" value="${plugin.version}"/>
</replacetokens>
</filterchain>
</loadfile>
<!-- combine the two above steps to make a new site.xml -->
<concat destfile="${site.dir}/site.xml" append="yes">${dev.release.xml}</concat>
<delete file="${site.dir}/old_site.xml" />
<!-- use zip task, not jar task, since we don't want a manifest -->
<zip destfile="${site.dir}/plugins/dev_${plugin.id}_${plugin.version}.jar">
<fileset dir="${dist.dir}" includes="**"/>
</zip>
<!-- feature.jar -->
<copy file="${build.dir}/plugin_feature.xml" toFile="${site.dir}/feature.xml">
<filterset refid="sitevars"/>
</copy>
<!-- use zip task, not jar task, since we don't want a manifest -->
<zip destfile="${site.dir}/dev-features/${plugin.id}_${plugin.version}.jar" compress="false">
<fileset file="${site.dir}/feature.xml"/>
</zip>
<delete file="${site.dir}/feature.xml"/>
<!-- add dev feature to dev-features and put jar in plugins/ with a dev_ prefix-->
<!-- Deploy script will clear out dev-features folder, delete all dev_ prefix files in plugins
and then upload new plugin/feature/site.xml-->
</target>
<target name="p2-headless-eclipse">
<echo>Using Eclipse p2.publisher.UpdateSitePublisher via java ant task </echo>
<java jar="${build.eclipse.dir}/plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar" fork="true" failonerror="true">
<arg line="-application org.eclipse.equinox.p2.publisher.UpdateSitePublisher" />
<arg line="-metadataRepository file:${basedir}/output-site" />
<arg line="-artifactRepository file:${basedir}/output-site" />
<arg line="-source ${basedir}/${site.dir}" />
<arg line="-compress" />
<arg line="-publishArtifacts" />
</java>
</target>
<target name="set-test-flag">
<property name="include.tests" value="true"/>
</target>
<target name="build-test-plugin" depends="set-test-flag, test-site">
</target>
<target name="test-site" depends="dist">
<echo message="Creating test update sites ${plugin.version}"/>
<filterset id="sitevars">
<filter token="PLUGIN_ID" value="${plugin.id}"/>
<filter token="PLUGIN_VERSION" value="${plugin.version}"/>
<filter token="FEATURE_ID" value="${plugin.id}"/>
<filter token="FEATURE_VERSION" value="${plugin.version}"/>
<filter token="FINDBUGS_VERSION" value="${findbugs.dev.version}"/>
</filterset>
<mkdir dir="${test-site.dir}"/>
<mkdir dir="${test-site.dir}/features"/>
<mkdir dir="${test-site.dir}/plugins"/>
<echo message="zipping up test-site"/>
<!-- plugin.jar: can't rename the .zip file from the 'dist' target because of the prefix -->
<zip destfile="${test-site.dir}/plugins/${plugin.id}_${plugin.version}.jar">
<fileset dir="${dist.dir}" includes="**"/>
</zip>
<!-- feature.jar -->
<copy file="${build.dir}/plugin_feature.xml" toFile="${test-site.dir}/feature.xml">
<filterset refid="sitevars"/>
</copy>
<!-- use zip task, not jar task, since we don't want a manifest -->
<zip destfile="${test-site.dir}/features/${plugin.id}_${plugin.version}.jar" compress="false">
<fileset file="${test-site.dir}/feature.xml"/>
</zip>
<move file="${test-site.dir}/feature.xml" tofile="${test-site.dir}/.feature.xml"/>
<!-- site.xml -->
<echo level="info" message="copying site.xml to ${test-site.dir}"/>
<copy file="${build.dir}/plugin_site_stable.xml" toFile="${test-site.dir}/site.xml">
<filterset refid="sitevars"/>
</copy>
<condition property="findbugs.alreadydownloaded">
<and>
<available file="${test-site.dir}/plugins/edu.umd.cs.findbugs.plugin.eclipse_${findbugs.dev.version}.jar" type="file"/>
<available file="${test-site.dir}/features/edu.umd.cs.findbugs.plugin.eclipse_${findbugs.dev.version}.jar" type="file"/>
</and>
</condition>
<echo level="info" message="Downloading dev versions of findbugs"/>
<get src="${findbugs.dev.plugin.with.plugins.url}"
dest="${test-site.dir}/plugins/edu.umd.cs.findbugs.plugin.eclipse_${findbugs.dev.version}.jar" verbose="true"/>
<get src="${findbugs.dev.feature.url}"
dest="${test-site.dir}/features/edu.umd.cs.findbugs.plugin.eclipse_${findbugs.dev.version}.jar" verbose="true"/>
<echo>Built site for test plugin site</echo>
</target>
<target name="install-test-plugin">
<!--make temp copy of Eclipse or Eclipse-relang (actually in prescript probably)-->
<!-- uninstall old test plugins -->
<delete>
<fileset dir="${test.eclipse.dir}/dropins" includes="**/*"/>
</delete>
<echo>Installing test plugin in dropins</echo>
<!-- install my test plugin -->
<copy todir="${test.eclipse.dir}/dropins">
<fileset dir="${test-site.dir}">
<include name="**/*.jar"/>
<exclude name="plugins/edu*.jar"/>
</fileset>
</copy>
<unzip src="${test-site.dir}/plugins/edu.umd.cs.findbugs.plugin.eclipse_${findbugs.dev.version}.jar"
dest="${test.eclipse.dir}/dropins/plugins/edu.umd.cs.findbugs.plugin.eclipse_${findbugs.dev.version}.jar"/>
</target>
<target name="run-eclipse-with-tests">
<path id="test.class.path">
<pathelement location="${dist.dir}/pde-test.jar" />
<fileset dir="${test.eclipse.dir}/plugins">
<include name="org.junit_4.*/**/junit.jar"/>
<include name="org.hamcrest.core_*.jar"/>
<include name="org.apache.ant_*/**/ant.jar"/>
<include name="org.apache.ant_*/**/ant-junit.jar"/>
<include name="org.eclipse.jdt.core_*.jar"/>
<include name="org.eclipse.jdt.junit_*.jar"/>
<include name="org.eclipse.jdt.junit.core_*.jar"/>
<include name="org.eclipse.equinox.common_*.jar"/>
<include name="org.eclipse.debug.core_*.jar"/>
<include name="org.eclipse.osgi_*.jar"/>
<include name="org.eclipse.core.resources_*.jar"/>
<include name="org.eclipse.core.runtime_*.jar"/>
<include name="org.eclipse.core.jobs_*.jar"/>
<include name="org.eclipse.ui.workbench_*.jar"/>
<include name="org.eclipse.swt_*.jar"/>
<include name="org.eclipse.equinox.preferences_*.jar"/>
<include name="org.eclipse.equinox.launcher_*.jar"/>
</fileset>
</path>
<delete file="pde_test_port.properties"/> <!-- properties file generated by PDETestPortLocator class in pde.test.utils -->
<echo>Starting Test Port Locator</echo>
<java classname="utils.PDETestPortLocator" fork="yes" classpathref="test.class.path"/>
<waitfor maxwait="10" maxwaitunit="second" checkevery="100" checkeveryunit="millisecond">
<available file="pde_test_port.properties"/>
</waitfor>
<property file="pde_test_port.properties"/>
<echo message="Using port ${pde.test.port} for listening to PDE Test run"/>
<parallel>
<daemons>
<antcall target="run-pde-test-listener">
<reference refid="test.class.path" torefid="test.class.path"/>
</antcall>
</daemons>
<sequential>
<sleep seconds="5"/> <!-- Give the listener a few seconds to start up -->
<antcall target="run-pde-tests">
<reference refid="test.class.path" torefid="test.class.path"/>
</antcall>
</sequential>
</parallel>
</target>
<target name="run-pde-test-listener">
<java classname="utils.PDETestResultsCollector" fork="yes" classpathref="test.class.path" failonerror="true">
<arg line="fb-contrib-eclipse-quick-fixes ${pde.test.port}"/>
</java>
</target>
<target name="run-pde-tests">
<echo>Firing up Test Eclipse workspace </echo>
<property name="test.classes.list" value="tests.TestContributedQuickFixes"/>
<mkdir dir="${test.reports.dir}/output/ws"/>
<java dir="${basedir}" classname="org.eclipse.equinox.launcher.Main" fork="yes"
classpathref="test.class.path" failonerror="true">
<arg line="-application org.eclipse.pde.junit.runtime.uitestapplication"/>
<arg line="-data ${test.reports.dir}output/ws"/>
<arg line="-dev bin -clean -port ${pde.test.port}"/>
<arg line="-testApplication org.eclipse.ui.ide.workbench"/>
<arg line="-testpluginname fb-contrib-eclipse-quick-fixes"/>
<arg line="-testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader" />
<arg line="-loaderpluginname org.eclipse.jdt.junit4.runtime" />
<arg line="-classnames ${test.classes.list}"/>
<jvmarg line="${jvm.args.test}"/>
</java>
</target>
<target name="make-stable-p2" depends="stable-site, p2-headless-eclipse">
</target>
<target name="test-headless" depends="build-test-plugin, install-test-plugin, run-eclipse-with-tests">
</target>
</project>