Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0120f7385eabb484629c0e95857a5199f0ded8d9 (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
<?xml version="1.0" encoding="UTF-8"?>
<project
  name="delta pack build"
  default="assembler"
  basedir=".">
  <!--
    This script is a starting point for creating a traditional
    "delta pack" for anyone who does not what to use p2 directly.
    
    Note: the resulting delta pack has not been tested. 
    
    Please comment in bug 470913 with imrovements that can be made.
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=470913
  -->


  <target
    name="init"
    unless="buildInitialized">
    <property
      name="projectDir"
      value="${basedir}" />
    <property
      name="buildId"
      value="I201503032000" />
    <property
      name="resultsDir"
      value="${projectDir}/results" />
    <property
      name="buildlogs"
      value="${resultsDir}/buildlogs" />
    <property
      name="checksum"
      value="${resultsDir}/checksum" />
    <delete
      verbose="true"
      dir="${buildlogs}" />
    <mkdir dir="${buildlogs}" />

    <record
      name="${buildlogs}/deltaPack-${buildId}-log.txt"
      action="start" />

    <property
      name="buildRepo"
      value="http://download.eclipse.org/eclipse/updates/4.5/" />
    <property
      name="projectDir"
      value="${basedir}" />
    <property
      name="buildId"
      value="I201503032000" />
    <property
      name="archivePrefix"
      value="eclipse" />

    <property
      name="archiveRoot"
      value="${archivePrefix}-${buildId}" />
    <property
      name="archiveName"
      value="${archiveRoot}-delta-pack.zip" />

    <property
      name="featureTempRoot"
      value="${projectDir}/rcp.deltapack" />
    <property
      name="featureTempDir"
      value="featureTemp" />
    <property
      name="featureTemp"
      value="${featureTempRoot}/${featureTempDir}" />
    <property
      name="featureTemp2"
      value="${featureTempRoot}/featureTemp2" />
    <delete
      verbose="true"
      dir="${featureTemp}" />
    <mkdir dir="${featureTemp}" />
    <delete
      verbose="true"
      dir="${featureTemp2}" />
    <mkdir dir="${featureTemp2}" />

    <property
      name="archivePathAndName"
      value="${resultsDir}/${archiveName}" />

    <property
      name="buildInitialized"
      value="true" />

  </target>

  <target
    name="build"
    depends="init">
    <echo message="DEBUG: echoproperties at beginning of deltapack (after init)" />
    <echoproperties />

    <!--need to change slicing options to only include platform specific bits -->
    <p2.mirror
      source="${buildRepo}"
      log="${buildlogs}/deltapackmirrorlog.txt"
      verbose="true"
      ignoreerrors="true">
      <destination
        kind="metadata"
        location="file://${featureTemp}"
        name="RCP Delta Pack Repo"
        format="${buildRepo}" />
      <destination
        kind="artifact"
        location="file://${featureTemp}"
        name="RCP Delta Pack Repo"
        format="${buildRepo}" />
      <iu
        id="org.eclipse.equinox.executable.feature.group"
        version="" />
      <iu
        id="org.eclipse.rcp.configuration.feature.group"
        version="" />
      <iu
        id="org.eclipse.platform.feature.group"
        version="" />
      <iu
        id="org.eclipse.platform.source.feature.group"
        version="" />
      <iu
        id="org.eclipse.rcp.feature.group"
        version="" />
      <iu
        id="org.eclipse.rcp.source.feature.group"
        version="" />
      <iu
        id="org.eclipse.jdt.feature.group"
        version="" />
      <iu
        id="org.eclipse.jdt.source.feature.group"
        version="" />
      <iu
        id="org.eclipse.e4.rcp.feature.group"
        version="" />
      <iu
        id="org.eclipse.e4.rcp.source.feature.group"
        version="" />
      <slicingOptions
        includeOptional="false"
        includeNonGreedy="false"
        followStrict="true"
        followOnlyFilteredRequirements="true" />
    </p2.mirror>
    <p2.remove.iu>
      <repository location="file://${featureTemp}" />
      <iu id="org.eclipse.jdt.feature.jar" />
      <iu id="org.eclipse.jdt.source.feature.jar" />
      <iu id="org.eclipse.platform.feature.jar" />
      <iu id="org.eclipse.platform.source.feature.jar" />
      <iu id="org.eclipse.rcp.feature.jar" />
      <iu id="org.eclipse.rcp.source.feature.jar" />
      <iu id="org.eclipse.e4.rcp.feature.jar" />
      <iu id="org.eclipse.e4.rcp.source.feature.jar" />
    </p2.remove.iu>
    <p2.repo2runnable
      destination="${featureTemp2}/eclipse"
      failonerror="true">
      <source
        dir="${featureTempRoot}"
        includes="${featureTempDir}" />
    </p2.repo2runnable>
    <delete verbose="true">
      <fileset
        dir="${featureTemp2}/eclipse"
        includes="*.jar" />
      <fileset
        dir="${featureTemp2}/eclipse"
        includes="*.xml" />
    </delete>

  </target>

  <target
    name="assembler"
    depends="init, build">
    <delete
      verbose="true"
      file="${archivePathAndName}"
      failonerror="false" />
    <exec
      executable="zip"
      dir="${featureTemp2}">
      <arg line="${archivePathAndName} -r ." />
    </exec>

    <delete
      verbose="true"
      dir="${checksum}" />
    <mkdir dir="${checksum}" />
    <checksum
      file="${archivePathAndName}"
      algorithm="sha256"
      todir="${checksum}"
      pattern="{0} *{1}" />

    <!--
      If desired, this would be a good place to remove ${featureTempRoot}
      since no longer needed ... but, but might assist with debugging?
    -->

    <record
      name="${buildlogs}/deltaPack-${buildId}-log.txt"
      action="stop" />

  </target>
</project>

Back to the top