blob: 1e9fb5d831baaea241d678a5745c216c4c2a0b8c (
plain) (
blame)
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
|
<project name="Build specific targets and properties" default="noDefault">
<!-- ===================================================================== -->
<!-- Run a given ${target} on all elements being built -->
<!-- Add on <ant> task for each top level element being built. -->
<!-- ===================================================================== -->
<available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml" />
<property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml" />
<loadproperties srcfile="${builder}/update_repo.properties" />
<property name="transformedRepoLocation" value="${targetDir}/${targetDownloadId}" />
<property name="repoBaseLocation" value="${targetDir}/${targetDownloadId}-p2" />
<property name="updateSite" value="${targetDir}/updates/0.12-I-builds" />
<property name="repoBaseline" value="${updateSite}" />
<import file="${allElementsFile}" />
<target name="allElements">
<antcall target="allElementsDelegator" />
</target>
<!-- ===================================================================== -->
<!-- ===================================================================== -->
<target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
</target>
<target name="checkLocalBase">
<available file="${base}" property="skipBase" />
</target>
<!-- ===================================================================== -->
<!-- Check out map files from correct repository -->
<!-- Replace values for mapsCheckoutTag as desired. -->
<!-- ===================================================================== -->
<target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
<mkdir dir="${buildDirectory}/maps" />
<copy todir="${buildDirectory}/maps">
<fileset dir="${builder}/../../.." />
</copy>
</target>
<target name="checkLocalMaps">
<available property="skipMaps" file="${buildDirectory}/maps" />
</target>
<target name="tagMapFiles" if="tagMaps">
<!--cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" /-->
</target>
<!-- ===================================================================== -->
<target name="clean" unless="noclean">
<antcall target="allElements">
<param name="target" value="cleanElement" />
</antcall>
</target>
<target name="gatherLogs">
<mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
<antcall target="allElements">
<param name="target" value="gatherLogs" />
</antcall>
<unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
<fileset dir="${buildDirectory}/features">
<include name="**/*.log.zip" />
</fileset>
</unzip>
<copy todir="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true" failonerror="false">
<fileset dir="${buildDirectory}/features/org.eclipse.e4.resources.feature/feature.temp.folder" />
</copy>
<copy todir="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true" failonerror="false">
<fileset dir="${buildDirectory}/features/org.eclipse.e4.master/feature.temp.folder" />
</copy>
<copy todir="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true" failonerror="false">
<fileset dir="${buildDirectory}/features/org.eclipse.e4.sdk.runtime.feature/feature.temp.folder" />
</copy>
<copy todir="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true" failonerror="false">
<fileset dir="${buildDirectory}/features/org.eclipse.e4.sdk.source.feature/feature.temp.folder" />
</copy>
</target>
<!-- ===================================================================== -->
<!-- Steps to do before setup -->
<!-- ===================================================================== -->
<target name="preSetup">
</target>
<target name="initLocations" >
<available property="repoURLFile" value="${buildDirectory}/eclipseRepoURL.properties" file="${buildDirectory}/eclipseRepoURL.properties" />
<antcall target="initRepoURLFile" />
<property name="repoURLFile" value="${buildDirectory}/eclipseRepoURL.properties" />
<property file="${repoURLFile}"/>
</target>
<target name="initRepoURLFile" unless="repoURLFile" >
<!-- figure out what the most recent eclipse IBuild is -->
<get src="${eclipseRepoURL}/compositeContent.jar" dest="${buildDirectory}/eclipseRepo.jar" />
<loadproperties>
<zipentry zipfile="${buildDirectory}/eclipseRepo.jar" name="compositeContent.xml" />
<filterchain>
<replaceregex pattern=".*location\s*=\s*'(.+)'.*" replace="eclipseBuildId=\1" flags="s" />
</filterchain>
</loadproperties>
<!-- store it for others -->
<echo message="eclipseRepoURL-latest=${eclipseRepoURL}/${eclipseBuildId}${line.separator}" file="${buildDirectory}/eclipseRepoURL.properties" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do after setup but before starting the build proper -->
<!-- ===================================================================== -->
<target name="postSetup" depends="initLocations">
<antcall target="getBaseComponents" />
<echo message="Mirror from ${eclipseRepoURL-latest} to ${repoBaseLocation}/eclipseSDK" />
<p2.mirror destination="file:${repoBaseLocation}/eclipseSDK" ignoreerrors="true">
<source location="${eclipseRepoURL-latest}" />
<slicingOptions includeOptional="false" includeNonGreedy="false" latestVersionOnly="true"/>
<iu id="org.eclipse.sdk.ide" />
<iu id="org.eclipse.equinox.concurrent" />
<!--<iu id="org.eclipse.equinox.core.sdk.feature.group" /> -->
</p2.mirror>
<echo message="Mirror from ${orbitRepoURL} to ${repoBaseLocation}/orbit" />
<p2.mirror destination="file:${repoBaseLocation}/orbit" ignoreerrors="true">
<source location="${orbitRepoURL}" />
<slicingOptions includeOptional="false" includeNonGreedy="false" />
<iu id="org.apache.commons.beanutils" />
<iu id="org.apache.commons.lang" />
<iu id="org.junit" version="0.0.0" />
<iu id="org.junit.source" version="0.0.0" />
<iu id="org.easymock" />
<iu id="org.jmock" />
<iu id="org.mockito" />
<iu id="javax.el" />
</p2.mirror>
<echo message="Mirror from ${emfRepoURL} to ${repoBaseLocation}/emf" />
<p2.mirror destination="file:${repoBaseLocation}/emf" ignoreerrors="true">
<source location="${emfRepoURL}" />
<slicingOptions includeOptional="false" includeNonGreedy="false" latestVersionOnly="true" />
<iu id="org.eclipse.emf.sdk.feature.group" />
<iu id="org.eclipse.xsd.edit.feature.group" />
</p2.mirror>
<echo message="Mirror from ${gefRepoURL} to ${repoBaseLocation}/gef" />
<p2.mirror destination="file:${repoBaseLocation}/gef" ignoreerrors="true">
<source location="${gefRepoURL}" />
<slicingOptions includeOptional="false" includeNonGreedy="false" />
<iu id="org.eclipse.gef.feature.group" />
</p2.mirror>
<echo message="Mirror from ${wtpRepoURL} to ${repoBaseLocation}/wtp" />
<p2.mirror destination="file:${repoBaseLocation}/wtp" ignoreerrors="true">
<source location="${wtpRepoURL}" />
<slicingOptions includeOptional="false" includeNonGreedy="false" />
<iu id="org.eclipse.wst.xml_ui.feature.feature.group" />
<iu id="org.eclipse.wst.web_core.feature.feature.group" />
</p2.mirror>
<echo message="Mirror from ${xtextRepoURL} to ${repoBaseLocation}/xtext" />
<p2.mirror destination="file:${repoBaseLocation}/xtext" ignoreerrors="true">
<source location="${xtextRepoURL}" />
<slicingOptions includeOptional="false" includeNonGreedy="false" latestVersionOnly="true" />
<iu id="org.eclipse.xtext.sdk.feature.group" />
</p2.mirror>
<echo message="Mirror from ${swtbotRepoURL} to ${repoBaseLocation}/swtbot" />
<p2.mirror destination="file:${repoBaseLocation}/swtbot" ignoreerrors="true">
<source location="${swtbotRepoURL}" />
<slicingOptions includeOptional="false" includeNonGreedy="false" latestVersionOnly="true" />
<iu id="org.eclipse.swtbot.eclipse.core" />
<iu id="org.eclipse.swtbot.eclipse.finder" />
<iu id="org.eclipse.swtbot.junit4_x" />
<iu id="org.eclipse.swtbot.swt.finder" />
</p2.mirror>
<p2.remove.iu>
<repository location="file:${repoBaseLocation}/xtext" />
<iu id="osgi.enterprise" />
<iu id="org.eclipse.wb.core.lib" />
</p2.remove.iu>
<!--<p2.remove.iu>
<repository location="file:${targetDir}/${targetDownloadId}-p2" />
<iu id="org.eclipse.rap.jface" />
<iu id="org.eclipse.rap.rwt" />
<iu id="org.eclipse.rap.ui.forms" />
</p2.remove.iu>-->
<p2.repo2runnable destination="${transformedRepoLocation}" failOnError="false">
<source dir="${repoBaseLocation}" includes="*" excludes="${repoBaseLocation.excludes}"/>
</p2.repo2runnable>
</target>
<!-- ===================================================================== -->
<!-- Steps to do before fetching the build elements -->
<!-- ===================================================================== -->
<target name="preFetch">
<echo message="Filtering map files..." />
<!-- run against base repo instead of the transformed repo, so we don't worry about checking directories -->
<fileset dir="${repoBaseLocation}/eclipseSDK/plugins" includes="*" id="filter.plugins" />
<property name="mapFile" value="${buildDirectory}/directory.txt" />
<script language="javascript"> <![CDATA[
importClass(java.io.FileInputStream);
importClass(java.io.FileOutputStream);
importClass(java.util.Properties);
importClass(java.lang.System);
var mapFile = project.getProperty("mapFile");
var map = new Properties();
map.load(new FileInputStream(mapFile));
var fs = project.getReference("filter.plugins");
var files = fs.getDirectoryScanner(project).getIncludedFiles();
for(i = 0; i < files.length; i++) { //14
var name = files[i].match(/([^_]*((_64)|(_32))?[^_]*)_.*/)[1];
if (map.containsKey("plugin@" + name)) {
System.out.println("Removed plugin@" + name);
map.remove("plugin@" + name);
} else if (map.containsKey("fragment@" + name)) {
System.out.println("Removed fragment@" + name);
map.remove("fragment@" + name);
}
}
var out = new FileOutputStream(mapFile);
map.store(out, "Filtered");
out.close();
]]></script>
</target>
<!-- ===================================================================== -->
<!-- Steps to do after fetching the build elements -->
<!-- ===================================================================== -->
<target name="postFetch">
</target>
<!-- ===================================================================== -->
<!-- Steps to do before generating the build scripts. -->
<!-- ===================================================================== -->
<target name="preGenerate">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after generating the build scripts. -->
<!-- ===================================================================== -->
<target name="postGenerate">
<antcall target="clean" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do before running the build.xmls for the elements being built. -->
<!-- ===================================================================== -->
<target name="preProcess">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after running the build.xmls for the elements being built. -->
<!-- ===================================================================== -->
<target name="postProcess">
</target>
<!-- ===================================================================== -->
<!-- Steps to do before running assemble. -->
<!-- ===================================================================== -->
<target name="preAssemble">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after running assemble. -->
<!-- ===================================================================== -->
<target name="postAssemble">
</target>
<!-- ===================================================================== -->
<!-- Steps to do before running package. -->
<!-- ===================================================================== -->
<target name="prePackage">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after running package. -->
<!-- ===================================================================== -->
<target name="postPackage">
</target>
<target name="unzipContentJar" if="contentJar">
<unzip src="${p2.repo}/content.jar" dest="${p2.repo}" />
<delete file="${p2.repo}/content.jar" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do after the build is done. -->
<!-- ===================================================================== -->
<target name="postBuild" depends="initLocations">
<antcall target="gatherLogs" />
<eclipse.convert input="${buildDirectory}/${buildLabel}/compilelogs" />
<available file="${p2.repo}/content.jar" property="contentJar" />
<antcall target="unzipContentJar" />
<xslt style="${builder}/patch-ver.xsl" in="${p2.repo}/content.xml" out="${p2.repo}/out_content.xml">
<outputproperty name="method" value="xml" />
</xslt>
<move file="${p2.repo}/out_content.xml" tofile="${p2.repo}/content.xml" />
<!--sign the build -->
<ant antfile="${builder}/sign.xml" dir="${basedir}" target="createSigningArchive" >
<property name="includesFile" value="${buildDirectory}/built.list" />
</ant>
<ant antfile="${builder}/sign.xml" dir="${basedir}" target="signMasterFeature" />
<!--unzip signed build into repository for mirroring and packaging-->
<unzip dest="${p2.repo}" src="${buildDirectory}/${buildLabel}/eclipse-master-${buildId}.zip" />
<!--pack master feature and update repository with new checksums for signed bundles -->
<p2.process.artifacts repositoryPath="file://${p2.repo}" />
<delete file="${p2.repo}/pack.properties" />
<filter token="BUILD_ID" value="${buildLabel}" />
<copy filtering="true" file="${builder}/templates/artifacts.xml" tofile="${buildDirectory}/formatRepo/artifacts.xml" />
<p2.mirror source="file:${p2.repo}" log="${buildDirectory}/${buildLabel}/mirrorLog.txt" ignoreErrors="true">
<destination compressed="true" name="${p2.repo.name}" location="file:${updateSite}/${buildLabel}" append="true" kind="metadata" />
<destination compressed="true" name="${p2.repo.name}" location="file:${updateSite}/${buildLabel}" append="true" format="file:${buildDirectory}/formatRepo" kind="artifact"/>
<comparator comparator="org.eclipse.equinox.p2.repository.tools.jar.comparator" comparatorLog="${buildDirectory}/${buildLabel}/comparatorlog.txt">
<repository location="${repoBaseline}" />
</comparator>
</p2.mirror>
<p2.composite.artifact.repository.add location="file://${updateSite}" child="${buildLabel}" />
<p2.composite.metadata.repository.add location="file://${updateSite}" child="${buildLabel}" />
<!--p2.composite.repository location="file:${updateSite}" >
<add location="${buildLabel}" />
</p2.composite.repository-->
<tstamp>
<format property="repmaindate" pattern="yyyy MMMM dd HH:mm" locale="en" />
</tstamp>
<copy file="${builder}/../../templates/dl-icon-update-zip.gif" tofile="${buildDirectory}/${buildLabel}/dl-icon-update-zip.gif" />
<copy file="${builder}/../../templates/FAIL.gif" tofile="${buildDirectory}/${buildLabel}/FAIL.gif" />
<copy file="${builder}/../../templates/new.gif" tofile="${buildDirectory}/${buildLabel}/new.gif" />
<copy file="${builder}/../../templates/OK.gif" tofile="${buildDirectory}/${buildLabel}/OK.gif" />
<copy file="${builder}/../../templates/build.download.php" tofile="${buildDirectory}/${buildLabel}/download.php" />
<copy file="${buildDirectory}/directory.txt" todir="${buildDirectory}/${buildLabel}" />
<zip destfile="${buildDirectory}/${buildLabel}/eclipse-e4-repo-incubation-${buildLabel}.zip" basedir="${p2.repo}"></zip>
<length file="${buildDirectory}/${buildLabel}/eclipse-e4-repo-incubation-${buildLabel}.zip" property="repobuildsize" />
<property name="buildlogs" value="${buildDirectory}/${buildLabel}" />
<property name="p2.root" value="${buildDirectory}/${buildId}/p2temp" />
<mkdir dir="${p2.root}" />
<property name="p2.output.base" value="${p2.root}/equinox.p2.build" />
<mkdir dir="${p2.output.base}" />
<property name="directorlog" value="${buildlogs}/director.txt" />
<delete file="${buildDirectory}/version.properties" />
<antcall target="run.version.query">
<param name="list.repo" value="file:${p2.sdk.install.linux.gtk.x86_64}/eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile" />
<param name="list.iu" value="org.eclipse.e4.workbench.sdk,org.eclipse.emf,org.eclipse.gef,org.eclipse.sdk,org.eclipse.wst.jsdt.ui,org.eclipse.xsd,org.eclipse.wst.xml_ui.feature.feature.group" />
</antcall>
<property file="${buildDirectory}/version.properties" />
<!-- generate the build index, guess the component version numbers -->
<filter token="repbuildid" value="${buildLabel}" />
<filter token="repmaindate" value="${repmaindate}" />
<filter token="repbuilddate" value="${buildLabel}" />
<filter token="repobuildsize" value="${repobuildsize}" />
<filter token="timestamp" value="${timestamp}" />
<filter token="buildType" value="${buildType}" />
<filter token="buildId" value="${buildId}" />
<filter token="buildLabel" value="${buildLabel}" />
<filter token="eclipseIbuild" value="${org.eclipse.sdk}" />
<filter token="emfBuildId" value="${org.eclipse.emf}" />
<filter token="gefBuildId" value="${org.eclipse.gef}" />
<filter token="eclipseBuildURL" value="${eclipseRepoURL-latest}" />
<filter token="emfBuildURL" value="${emfBuildURL}" />
<filter token="gefBuildURL" value="${gefBuildURL}" />
<filter token="wtpBuildURL" value="${wtpBuildURL}" />
<filter token="wtpBuildId" value="${wtpBuildId}" />
<copy filtering="true" file="${builder}/../../templates/build.index.html" tofile="${buildDirectory}/${buildLabel}/index.html" />
<copy filtering="true" file="${builder}/tests/build.label.properties" tofile="${buildDirectory}/label.properties" />
<echo message="e4.targetDir=${repoBaseLocation}${line.separator}" file="${buildDirectory}/label.properties" append="true" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do to test the build results -->
<!-- ===================================================================== -->
<target name="test">
</target>
<!-- ===================================================================== -->
<!-- Steps to do to publish the build results -->
<!-- ===================================================================== -->
<target name="publish">
</target>
<!-- ===================================================================== -->
<!-- Default target -->
<!-- ===================================================================== -->
<target name="noDefault">
<echo message="You must specify a target when invoking this file" />
</target>
<target name="run.version.query">
<delete dir="${base.builder}/configuration/.settings" includeemptydirs="true" failonerror="false" />
<exec executable="${java15-home}/bin/java" failonerror="false" dir="${base.builder}" timeout="900000" output="${buildDirectory}/version.properties" error="/dev/null">
<arg line="-jar ${base.builder.launcher}" />
<arg line="-application org.eclipse.equinox.p2.director" />
<arg line="-nosplash" />
<arg line="-repository ${list.repo}" />
<arg line="-list ${list.iu}" />
</exec>
</target>
</project>
|