File: pdebuild.xml

package info (click to toggle)
eclipse 3.8.1-10
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 338,840 kB
  • ctags: 472,808
  • sloc: java: 2,762,042; ansic: 136,783; xml: 105,676; cpp: 35,759; jsp: 4,420; sh: 3,288; perl: 1,687; makefile: 232; python: 67; php: 24
file content (433 lines) | stat: -rw-r--r-- 16,570 bytes parent folder | download | duplicates (3)
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
<project name="Pdebuild bootstrap" default="cleanBuild" basedir=".">
	<property file="pdebuild.properties" />
	<property name="sdkSource" value="build/eclipse-${label}-src" />
	<target name="cleanBuild" depends="clean,removeGeneratedBuildXMLs" />
	<macrodef name="generateBuildScripts">
		<attribute name="buildDirs" />
		<attribute name="rootDir" />
		<sequential>
			<pathconvert pathsep=", " property="plugins">
				<filelist refid="@{buildDirs}" />
				<mapper>
					<chainedmapper>
						<flattenmapper />
						<globmapper from="*" to="plugin@*" />
					</chainedmapper>
				</mapper>
			</pathconvert>
			<eclipse.buildScript elements="${plugins}"
			                     builddirectory="@{rootDir}" />
		</sequential>
	</macrodef>


	<!-- Order in this filelist is critical for building !!! -->
	<property name="depsDirsProperty"
		value="org.eclipse.osgi
		       org.eclipse.equinox.common
		       org.eclipse.core.jobs
		       org.eclipse.equinox.registry
		       org.eclipse.equinox.preferences
		       org.eclipse.core.runtime.compatibility.auth
		       org.eclipse.core.contenttype
		       org.eclipse.osgi.services
		       org.eclipse.equinox.app
		       org.eclipse.core.runtime
		       org.eclipse.core.variables
		       org.eclipse.ant.core
		       org.eclipse.equinox.p2.core
		       org.eclipse.equinox.p2.metadata
		       org.eclipse.equinox.frameworkadmin
		       org.eclipse.equinox.frameworkadmin.equinox
		       org.eclipse.equinox.p2.jarprocessor
		       org.eclipse.equinox.security
		       org.eclipse.core.net
		       org.eclipse.equinox.concurrent
		       org.eclipse.ecf.ssl
		       org.eclipse.ecf.identity
		       org.eclipse.ecf
		       org.eclipse.ecf.filetransfer
		       org.eclipse.ecf.provider.filetransfer
		       org.eclipse.ecf.provider.filetransfer.ssl
		       org.eclipse.ecf.provider.filetransfer.httpclient
		       org.eclipse.ecf.provider.filetransfer.httpclient.ssl
		       org.eclipse.equinox.p2.repository
		       org.eclipse.equinox.p2.artifact.repository
		       org.eclipse.equinox.p2.metadata.repository
		       org.eclipse.equinox.simpleconfigurator
		       org.eclipse.equinox.simpleconfigurator.manipulator
		       org.eclipse.equinox.p2.publisher
		       org.eclipse.update.configurator
		       org.eclipse.core.runtime.compatibility
		       org.eclipse.equinox.p2.engine
		       org.eclipse.equinox.p2.director
		       org.eclipse.equinox.p2.publisher.eclipse
		       org.eclipse.equinox.p2.repository.tools
		       org.eclipse.equinox.p2.updatesite
		       org.eclipse.pde.build
		       org.eclipse.equinox.launcher
		       org.eclipse.equinox.p2.console
		       org.eclipse.equinox.p2.director.app
		       org.eclipse.update.core
		       org.eclipse.equinox.p2.garbagecollector
		       org.eclipse.core.expressions
		       org.eclipse.equinox.http.servlet
		       org.eclipse.equinox.p2.touchpoint.eclipse
		       org.eclipse.equinox.p2.touchpoint.natives" />
	<filelist id="depsDirs" dir="${sdkSource}/plugins" files="${depsDirsProperty}"/>
	
	<property name="helpDirsProperty"
		value="org.eclipse.equinox.http.jetty_3.0.0
		       org.eclipse.help
		       org.eclipse.help.base" />
	<filelist id="helpDirs" dir="${sdkSource}/plugins" files="${helpDirsProperty}"/>
	
	<property name="depsDirs2Property"
		value="org.eclipse.core.filesystem
		       org.eclipse.core.resources
		       org.eclipse.core.commands
		       org.eclipse.jface
		       org.eclipse.text
		       org.eclipse.jface.text
		       org.eclipse.team.core
		       org.eclipse.core.filebuffers
		       org.eclipse.debug.core
		       org.eclipse.jdt.core
		       org.eclipse.jdt.debug
		       org.eclipse.jdt.launching
		       org.eclipse.pde.core
		       org.eclipse.pde.api.tools
		       org.eclipse.equinox.event
		       org.eclipse.equinox.util
		       org.eclipse.equinox.ds"/>
	<filelist id="depsDirs2" dir="${sdkSource}/plugins" files="${depsDirs2Property}"/>
	
	<fileset dir="${sdkSource}/plugins" id="orbitDeps">
		<include name="org.junit_*/" />
		<include name="com.ibm.icu_*" />
		<include name="org.apache.ant_*/**" />
		<include name="org.eclipse.swt*"/>
		<include name="org.eclipse.jetty*_3.*" />
		<include name="org.apache.lucene*" />
		<include name="org.apache.commons*" />
		<include name="org.sat4j*" />
		<include name="org.hamcrest.core*" />
		<include name="javax.servlet*" />
		<include name="javax.el*" />
		<include name="org.objectweb.asm*" />
	</fileset>
	<path id="pdebuildClasspath">
		<pathelement location="${sdkSource}/plugins/org.eclipse.pde.build/lib/pdebuild-ant.jar" />
		<pathelement location="${sdkSource}/plugins/org.eclipse.pde.build/pdebuild.jar" />
		<pathelement path="${sdkSource}/plugins/org.eclipse.equinox.common/@dot" />
		<pathelement path="${sdkSource}/plugins/org.eclipse.core.runtime/@dot" />
		<pathelement location="${sdkSource}/plugins/org.eclipse.osgi/osgi/osgi.core.jar" />
		<pathelement path="${sdkSource}/plugins/org.eclipse.osgi/@dot" />
		<pathelement path="${sdkSource}/plugins/org.eclipse.equinox.launcher/@dot" />
		<pathelement path="${sdkSource}/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/@dot" />
		<pathelement path="${sdkSource}/plugins/org.eclipse.equinox.p2.updatesite/@dot" />
	</path>
	<fileset id="depsZips" dir="${sdkSource}/plugins" includes="**/*_*.zip" />

	<target name="generateScripts" >
		<generateBuildScripts builddirs="depsDirs" rootdir="${sdkSource}" />
		<eclipse.buildScript elements="plugin@org.eclipse.equinox.http.jetty"
		                     significantVersionDigits="3.0.0"
		                     builddirectory="${sdkSource}" />
		<eclipse.buildScript elements="plugin@org.eclipse.help.base"
		                     builddirectory="${sdkSource}" />
		<eclipse.buildScript elements="plugin@org.eclipse.help"
		                     builddirectory="${sdkSource}" />
		<mkdir dir="generatedScripts" />
		<pathconvert pathsep=" " property="generatedBuildXmls">
			<filelist refid="depsDirs" />
			<filelist refid="helpDirs" />
			<mapper>
				<chainedmapper>
					<flattenmapper />
					<globmapper from="*" to="*/build.xml" />
				</chainedmapper>
			</mapper>
		</pathconvert>
		<copy todir="generatedScripts/plugins">
			<fileset dir="${sdkSource}/plugins/"
			         includes="${generatedBuildXmls}" />
		</copy>

		<tar destfile="debian/eclipse-build-generatedScripts.tar.bz2"
		     compression="bzip2"
		     basedir="generatedScripts"
		     includes="**/*" />
	</target>
	<target name="generateScripts2">
		<generateBuildScripts builddirs="depsDirs2" rootdir="../${sdkSource}" />
	</target>

	<!-- Java 7 changed the jsr14 javac target so bootstrap to 1.5 -->
	<target name="jsr14To15ForBootstrap">
		<!-- Set up a fileset for depsDirs build.xml files -->
		<pathconvert pathsep="/**/*," refid="depsDirs" property="depsDirsFiles">
		    <filtermapper>
		        <replacestring from="${sdkSource}/plugins" to="" />
		    </filtermapper>
		</pathconvert>
		<fileset dir="${sdkSource}/plugins" id="depsDirsBuildXMLs" includes="${depsDirsFiles}/**/*">
			<include name="**/build.xml" />
		</fileset>

		<!-- Set up a fileset for helpDirs build.xml files -->
		<pathconvert pathsep="/**/*," refid="helpDirs" property="helpDirsFiles">
		    <filtermapper>
		        <replacestring from="${sdkSource}/plugins" to="" />
		    </filtermapper>
		</pathconvert>
		<fileset dir="${sdkSource}/plugins" id="helpDirsBuildXMLs" includes="${helpDirsFiles}/**/*">
			<include name="**/build.xml" />
		</fileset>

		<!-- Set up a fileset for depsDirs2 build.xml files -->
		<pathconvert pathsep="/**/*," refid="depsDirs2" property="depsDirs2Files">
		    <filtermapper>
		        <replacestring from="${sdkSource}/plugins" to="" />
		    </filtermapper>
		</pathconvert>
		<fileset dir="${sdkSource}/plugins" id="depsDirs2BuildXMLs" includes="${depsDirs2Files}/**/*">
			<include name="**/build.xml" />
		</fileset>

		<replace token="name=&quot;bundleJavacTarget&quot; value=&quot;jsr14&quot;"
			value="name=&quot;bundleJavacTarget&quot; value=&quot;1.5&quot;"
			summary="true">
			<fileset refid="depsDirsBuildXMLs"/>
			<fileset refid="helpDirsBuildXMLs"/>
			<fileset refid="depsDirs2BuildXMLs"/>
		</replace>
	</target>
	<target name="bootstrap" depends="jsr14To15ForBootstrap">
		<echo message="bootclasspath=${CDC-1.1/Foundation-1.1}" />
		<subant>
			<property name="buildId" value="${buildId}" />
			<property name="buildArch" value="${buildArch}" />
			<property file="pdebuild.properties" />
			<filelist refid="depsDirs" />
		</subant>
		<subant>
			<property name="buildId" value="${buildId}" />
			<property name="buildArch" value="${buildArch}" />
			<property file="pdebuild.properties" />
			<filelist refid="helpDirs" />
		</subant>
	</target>
	<target name="bootstrap-clean">
		<subant target="clean">
			<filelist refid="depsDirs" />
		</subant>
		<subant target="clean">
			<filelist refid="helpDirs" />
		</subant>
	</target>
	<target name="bootstrap2" depends="zipPlugins">
		<antcall target="collectBootstrapPlugins" />
		<java classname="org.eclipse.equinox.launcher.Main"
		      fork="true"
		      dir="bootstrap"
		      failonerror="true">
			<classpath>
				<pathelement path="bootstrap/plugins/org.eclipse.equinox.launcher.jar" />
			</classpath>
			<arg line="-configuration configuration " />
			<arg line="-application org.eclipse.ant.core.antRunner " />
			<arg line="-buildfile ../pdebuild.xml generateScripts2" />
			<arg line="-DbuildArch=${buildArch} " />
			<arg line="-DbuildId=${buildId} " />
			<arg line="-debug -consolelog" />
		</java>
		<taskdef name="eclipse.versionReplacer"
		         classname="org.eclipse.pde.internal.build.tasks.GenericVersionReplacer"
		         classpathref="pdebuildClasspath" />
		<subant inheritall="true">
			<filelist refid="depsDirs2" />
		</subant>
	</target>
	<target name="cleanBuilded">
		<subant target="clean">
			<filelist refid="depsDirs2" />
		</subant>
	</target>
	<target name="zipPlugins" depends="bootstrap">
		<taskdef name="eclipse.versionReplacer"
		         classname="org.eclipse.pde.internal.build.tasks.GenericVersionReplacer"
		         classpathref="pdebuildClasspath" />
		<subant target="zip.plugin">
			<filelist refid="depsDirs" />
		</subant>
		<subant target="zip.plugin">
			<filelist refid="helpDirs" />
		</subant>
	</target>
	<target name="zipPlugins2" depends="bootstrap2">
		<taskdef name="eclipse.versionReplacer"
		         classname="org.eclipse.pde.internal.build.tasks.GenericVersionReplacer"
		         classpathref="pdebuildClasspath" />
		<subant target="zip.plugin">
			<filelist refid="depsDirs2" />
		</subant>
		<antcall target="collectBootstrapPlugins" />
	</target>

	<target name="removeGeneratedBuildXMLs" depends="zipPlugins2">
		<fileset id="buildXMLsToKeep" dir="${sdkSource}/plugins"
			excludes="**/org.eclipse.swt.gtk.*/*,
			**/org.eclipse.update.core.linux/**/*,
			**/org.eclipse.pde.build/scripts/*,
			**/org.eclipse.jdt.core/scripts/*,
			**/org.eclipse.update.core.linux/src/*,
			**/org.eclipse.jdt.doc.isv/*,
			**/org.eclipse.swt/*,
			**/org.eclipse.jdt.doc.user/*"
		/>

		<delete>
			<intersect>
				<fileset refid="depsDirsBuildXMLs"/>
				<fileset refid="helpDirsBuildXMLs"/>
				<fileset refid="depsDirs2BuildXMLs"/>
				<fileset refid="buildXMLsToKeep" />
			</intersect>
		</delete>
	</target>

	<target name="collectBootstrapPlugins">
		<mkdir dir="bootstrap/plugins" />
		<copy todir="bootstrap/plugins" flatten="true">
			<fileset refid="depsZips" />
		</copy>
		<unzip dest="bootstrap/plugins">
			<fileset dir="bootstrap/plugins">
				<include name="**/*.zip" />
			</fileset>
		</unzip>
		<delete>
			<fileset dir="bootstrap/plugins">
				<include name="**/*.zip" />
			</fileset>
		</delete>
		<copy todir="bootstrap/plugins" flatten="false">
			<fileset refid="orbitDeps" />
		</copy>
		<!-- symlink o.e.osgi to o.e.osgi_<VERSION> -->
		<dirset dir="bootstrap/plugins"
		        includes="org.eclipse.osgi_*"
		        id="osgitest" />

		<property name="osgiplugin" refid="osgitest" />
		<echo message="${osgiplugin}" />

		<symlink link="bootstrap/plugins/org.eclipse.osgi"
		         resource="${osgiplugin}"
		         overwrite="true" />
		<!-- symlink o.e.equinox.launcher to o.e.equinox.launcher_<VERSION> -->
		<dirset dir="bootstrap/plugins"
		        includes="org.eclipse.equinox.launcher_*"
		        id="launcher" />

		<property name="launcherplugin" refid="launcher" />
		<echo message="${launcherplugin}" />

		<symlink link="bootstrap/plugins/org.eclipse.equinox.launcher"
		         resource="${launcherplugin}"
		         overwrite="true" />
		<!-- symlink o.e.update.configurator to o.e.update.configurator_<VERSION> -->
		<dirset dir="bootstrap/plugins"
		        includes="org.eclipse.update.configurator_*"
		        id="updatetest" />

		<property name="updateconfiguratorplugin" refid="updatetest" />
		<echo message="${updateconfiguratorplugin}" />

		<symlink link="bootstrap/plugins/org.eclipse.update.configurator"
		         resource="${updateconfiguratorplugin}"
		         overwrite="true" />
		<!-- symlink o.e.e.common to o.e.e.common_<VERSION> -->
		<dirset dir="bootstrap/plugins"
		        includes="org.eclipse.equinox.common_*"
		        id="equinoxcommontest" />

		<property name="equinoxcommonplugin" refid="equinoxcommontest" />
		<echo message="${equinoxcommonplugin}" />

		<symlink link="bootstrap/plugins/org.eclipse.equinox.common"
		         resource="${equinoxcommonplugin}"
		         overwrite="true" />

		<!-- symlink o.e.p.build to o.e.p.build_<VERSION> -->
		<dirset dir="bootstrap/plugins"
		        includes="org.eclipse.pde.build_*"
		        id="pdebuildtest" />

		<property name="pdebuildplugin" refid="pdebuildtest" />
		<echo message="${pdebuildplugin}" />

		<symlink link="bootstrap/plugins/org.eclipse.pde.build"
		         resource="${pdebuildplugin}"
		         overwrite="true" />

		<!-- jar up base equinox bundles -->
		<jar destfile="bootstrap/plugins/org.eclipse.equinox.launcher.jar"
		     basedir="bootstrap/plugins/org.eclipse.equinox.launcher"
		     includes="**"
		     manifest="bootstrap/plugins/org.eclipse.equinox.launcher/META-INF/MANIFEST.MF">
		</jar>
		<jar destfile="bootstrap/plugins/org.eclipse.equinox.common.jar"
		     basedir="bootstrap/plugins/org.eclipse.equinox.common"
		     includes="**"
		     manifest="bootstrap/plugins/org.eclipse.equinox.common/META-INF/MANIFEST.MF">
		</jar>
		<jar destfile="bootstrap/plugins/org.eclipse.osgi.jar"
		     basedir="bootstrap/plugins/org.eclipse.osgi"
		     includes="**"
		     manifest="bootstrap/plugins/org.eclipse.osgi/META-INF/MANIFEST.MF">
		</jar>
		<jar destfile="bootstrap/plugins/org.eclipse.update.configurator.jar"
		     basedir="bootstrap/plugins/org.eclipse.update.configurator"
		     includes="**"
		     manifest="bootstrap/plugins/org.eclipse.update.configurator/META-INF/MANIFEST.MF">
		</jar>
		<!-- directory of o.e.osgi seems to get picked up before jar; remove it -->
		<symlink action="delete" link="bootstrap/plugins/org.eclipse.osgi" />
		<symlink action="delete"
		         link="bootstrap/plugins/org.eclipse.equinox.common" />
		<symlink action="delete"
		         link="bootstrap/plugins/org.eclipse.update.configurator" />
		<symlink action="delete"
		         link="bootstrap/plugins/org.eclipse.equinox.launcher" />
		<!--<delete file="bootstrap/plugins/${equinoxcommonplugin}"/>-->
		<delete dir="bootstrap/plugins/${equinoxcommonplugin}" />
		<delete dir="bootstrap/plugins/${launcherplugin}" />
		<delete dir="bootstrap/plugins/${updateconfiguratorplugin}" />
		<delete dir="bootstrap/plugins/${osgiplugin}" />
		<!-- also remove symlink -->
		<delete verbose="true" followsymlinks="true">
			<fileset dir="bootstrap/plugins">
				<include name="org.eclipse.osgi" />
			</fileset>
		</delete>
		<!-- osgi can only be found if _ is in name -->
		<symlink action="delete"
		         link="bootstrap/plugins/org.eclipse.osgi_${label}.jar"
		         failonerror="false" />
		<symlink link="bootstrap/plugins/org.eclipse.osgi_${label}.jar"
		         resource="org.eclipse.osgi.jar"
		         overwrite="true" />
	</target>

	<target name="clean">
		<delete dir="bootstrap/plugins" />
		<delete dir="bootstrap/configuration/org.eclipse.core.runtime" />
		<delete dir="bootstrap/configuration/org.eclipse.equinox.app" />
		<delete dir="bootstrap/configuration/org.eclipse.osgi" />
		<delete dir="bootstrap/configuration/org.eclipse.update" />
		<delete dir="bootstrap/workspace" />
		<delete dir="bootstrap/p2" />
	</target>
</project>