@@ -37,6 +37,10 @@ Portions Copyright (c) 2017-2018, Chris Fraire <
[email protected] >.
37
37
38
38
<name >OpenGrok Indexer</name >
39
39
40
+ <properties >
41
+ <version >${project.version}</version >
42
+ </properties >
43
+
40
44
<dependencies >
41
45
<dependency >
42
46
<groupId >org.apache.bcel</groupId >
@@ -152,9 +156,78 @@ Portions Copyright (c) 2017-2018, Chris Fraire <
[email protected] >.
152
156
</dependencies >
153
157
154
158
<build >
155
-
156
159
<plugins >
157
-
160
+ <plugin >
161
+ <groupId >pl.project13.maven</groupId >
162
+ <artifactId >git-commit-id-plugin</artifactId >
163
+ <version >2.2.4</version >
164
+ <configuration >
165
+ <includeOnlyProperties >
166
+ <includeOnlyProperty >^git.commit.id$</includeOnlyProperty >
167
+ </includeOnlyProperties >
168
+ </configuration >
169
+ <executions >
170
+ <execution >
171
+ <id >get-the-git-infos</id >
172
+ <goals >
173
+ <goal >revision</goal >
174
+ </goals >
175
+ <phase >initialize</phase >
176
+ </execution >
177
+ <execution >
178
+ <id >validate-the-git-infos</id >
179
+ <goals >
180
+ <goal >validateRevision</goal >
181
+ </goals >
182
+ <phase >package</phase >
183
+ </execution >
184
+ </executions >
185
+ </plugin >
186
+ <plugin >
187
+ <groupId >org.codehaus.mojo</groupId >
188
+ <artifactId >properties-maven-plugin</artifactId >
189
+ <version >1.0.0</version >
190
+ <executions >
191
+ <execution >
192
+ <id >generate-info-properties</id >
193
+ <phase >generate-resources</phase >
194
+ <goals >
195
+ <goal >write-project-properties</goal >
196
+ </goals >
197
+ <configuration >
198
+ <outputFile >
199
+ ${project.build.outputDirectory} /org/opengrok/indexer/info.properties
200
+ </outputFile >
201
+ </configuration >
202
+ </execution >
203
+ </executions >
204
+ </plugin >
205
+ <plugin >
206
+ <groupId >com.google.code.maven-replacer-plugin</groupId >
207
+ <artifactId >replacer</artifactId >
208
+ <version >1.5.3</version >
209
+ <executions >
210
+ <execution >
211
+ <id >perform-git-substitutions</id >
212
+ <goals >
213
+ <goal >replace</goal >
214
+ </goals >
215
+ <phase >process-resources</phase >
216
+ <configuration >
217
+ <filesToInclude >
218
+ ${project.build.outputDirectory} /org/opengrok/indexer/info.properties
219
+ </filesToInclude >
220
+ <replacements >
221
+ <replacement >
222
+ <token >git.commit.id</token >
223
+ <value >changeset</value >
224
+ </replacement >
225
+ </replacements >
226
+ <quiet >false</quiet >
227
+ </configuration >
228
+ </execution >
229
+ </executions >
230
+ </plugin >
158
231
<plugin >
159
232
<groupId >org.apache.maven.plugins</groupId >
160
233
<artifactId >maven-jar-plugin</artifactId >
@@ -210,6 +283,7 @@ Portions Copyright (c) 2017-2018, Chris Fraire <
[email protected] >.
210
283
<version >1.5.3</version >
211
284
<executions >
212
285
<execution >
286
+ <id >replace-in-jflex-sources</id >
213
287
<phase >generate-sources</phase >
214
288
<goals >
215
289
<goal >replace</goal >
@@ -243,7 +317,6 @@ Portions Copyright (c) 2017-2018, Chris Fraire <
[email protected] >.
243
317
<token >[ \t]*/\* not supposed to occur according to specification of java\.io\.Reader \*/\s+if \(numRead == 0.*?\}[ \t]*\r?\n</token >
244
318
<value ></value >
245
319
</replacement >
246
-
247
320
</replacements >
248
321
<regexFlags >
249
322
<regexFlag >DOTALL</regexFlag >
@@ -270,19 +343,6 @@ Portions Copyright (c) 2017-2018, Chris Fraire <
[email protected] >.
270
343
<goal >run</goal >
271
344
</goals >
272
345
</execution >
273
- <execution >
274
- <id >update-build-info</id >
275
- <phase >generate-resources</phase >
276
- <configuration >
277
- <target >
278
- <property name =" version" value =" ${project.version}" />
279
- <ant target =" -update-build-info" />
280
- </target >
281
- </configuration >
282
- <goals >
283
- <goal >run</goal >
284
- </goals >
285
- </execution >
286
346
<execution >
287
347
<id >build-config-files</id >
288
348
<phase >process-test-classes</phase >
0 commit comments