-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpom.xml
More file actions
426 lines (397 loc) · 14.9 KB
/
pom.xml
File metadata and controls
426 lines (397 loc) · 14.9 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015 Lable
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.lable.oss</groupId>
<artifactId>parent</artifactId>
<version>2.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Maven parent for Lable projects</name>
<description>
Common configuration for Lable Maven projects.
This POM configures code-coverage, unit and integration testing, and a number of common Maven plugins.
</description>
<url>https://github.com/LableOrg/maven-parent</url>
<organization>
<name>Lable</name>
<url>https://lable.nl</url>
</organization>
<developers>
<developer>
<id>jdhoek</id>
<name>Jeroen Hoek</name>
<email>jeroen.hoek@lable.nl</email>
<organization>Lable</organization>
<organizationUrl>https://lable.nl</organizationUrl>
</developer>
</developers>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Skip integration tests by default, activated in profiles. -->
<skipITs>true</skipITs>
<!-- Disable the memcached plugin used for some integration tests too. -->
<jmemcached.disable>true</jmemcached.disable>
<!-- Plugin versions. -->
<maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
<maven.failsafe.plugin.version>2.22.2</maven.failsafe.plugin.version>
<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
<maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
<maven.deploy.plugin.version>3.0.0-M1</maven.deploy.plugin.version>
<maven.release.plugin.version>3.0.0-M1</maven.release.plugin.version>
<maven.source.plugin.version>3.2.1</maven.source.plugin.version>
<maven.javadoc.plugin.version>3.2.0</maven.javadoc.plugin.version>
<maven.versions.version>2.8.1</maven.versions.version>
<license.plugin.version>3.0</license.plugin.version>
<jacoco.plugin.version>0.8.5</jacoco.plugin.version>
<java.language.level>11</java.language.level>
<!-- Dependency versions. -->
<junit.version>4.13.1</junit.version>
<hamcrest.version>2.2</hamcrest.version>
<hamcrest.optional>2.0.0</hamcrest.optional>
<mockito.version>3.4.6</mockito.version>
</properties>
<scm>
<connection>scm:git:git@github.com:LableOrg/maven-parent.git</connection>
<developerConnection>scm:git:git@github.com:LableOrg/maven-parent.git</developerConnection>
<url>https://github.com/LableOrg/maven-parent.git</url>
<tag>HEAD</tag>
</scm>
<dependencies>
<!-- Testing dependencies. -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.npathai</groupId>
<artifactId>hamcrest-optional</artifactId>
<version>${hamcrest.optional}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!-- Configure the compiler. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<release>${java.language.level}</release>
<compilerArgs>
<arg>-Xlint</arg>
<arg>-Xdoclint</arg>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven.release.plugin.version}</version>
<configuration>
<!-- Disable the site-deploy target, because we don't deploy the generated site contents anywhere. -->
<goals>deploy</goals>
<!-- Pass the integration test argument. Any project that uses this to activate integration
testing profiles normally disabled due to the time it takes to execute them will have
their integration testing profiles actived. -->
<arguments>-Dit</arguments>
<tagNameFormat>v@{project.version}</tagNameFormat>
<!-- All child modules follow the parent version. -->
<autoVersionSubmodules>true</autoVersionSubmodules>
<!-- A local checkout is a *lot* faster than cloning the complete repository. -->
<localCheckout>true</localCheckout>
<useReleaseProfile>false</useReleaseProfile>
<!-- Enable the release profile (code signing). -->
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
<plugin>
<!-- Deploy packaged artifacts. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven.deploy.plugin.version}</version>
</plugin>
<plugin>
<!-- Build source jars. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
<configuration>
<attach>true</attach>
</configuration>
</plugin>
<plugin>
<!-- Manage dependency versions. -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${maven.versions.version}</version>
<configuration>
<generateBackupPoms>false</generateBackupPoms>
</configuration>
</plugin>
<plugin>
<!-- Any of our projects which upload to Maven Central must declare this explicitly in their own POM. -->
<inherited>false</inherited>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<!-- Unit testing. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<systemPropertyVariables>
<buildDirectory>${project.build.directory}</buildDirectory>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<!-- Integration tests are run by failsafe. -->
<!-- Classes under src/test/java called *IT are included automatically. -->
<!-- Integration tests are run during the verify phase. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven.failsafe.plugin.version}</version>
<configuration>
<systemPropertyVariables>
<buildDirectory>${project.build.directory}</buildDirectory>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Code coverage plugin. -->
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.plugin.version}</version>
<executions>
<execution>
<id>jacoco-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/jacoco-unit.exec</destFile>
</configuration>
</execution>
<execution>
<id>jacoco-prepare-agent-integration</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
</execution>
<execution>
<id>jacoco-report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/jacoco-unit.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-unit</outputDirectory>
</configuration>
</execution>
<execution>
<id>jacoco-check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/jacoco-unit.exec</dataFile>
<rules />
</configuration>
</execution>
<execution>
<!-- Combine the code coverage statistics generated for the unit and the integration tests. -->
<id>jacoco-merge</id>
<goals>
<goal>merge</goal>
</goals>
<phase>verify</phase>
<configuration>
<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
</fileSets>
<destFile>${project.build.directory}/jacoco-both.exec</destFile>
</configuration>
</execution>
<execution>
<id>jacoco-integration</id>
<goals>
<goal>report-integration</goal>
</goals>
</execution>
<execution>
<id>jacoco-reportboth</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/jacoco-both.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-both</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Help with license headers. This will stop the build if required headers are missing.
`mvn license:format` inserts the Apache 2 license headers automatically. -->
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license.plugin.version}</version>
<configuration>
<header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
<properties>
<owner>Lable</owner>
<email>info@lable.nl</email>
</properties>
<mapping>
<!-- Instead of the default JAVADOC_STYLE, because Javadoc comments
are not allowed at the start of file. -->
<java>SLASHSTAR_STYLE</java>
</mapping>
<excludes>
<exclude>**/README.md</exclude>
<exclude>LICENSE</exclude>
<exclude>src/test/resources/**</exclude>
<exclude>src/main/resources/**</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<!-- Release profile. These plugins only need to be run when artifacts are released. -->
<id>release</id>
<properties>
<skipITs>false</skipITs>
<jmemcached.disable>false</jmemcached.disable>
</properties>
<build>
<plugins>
<plugin>
<!-- Sign our artifacts. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven.gpg.plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Generate javadoc and create javadocs jars. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Integration testing profile. -->
<!-- Run integration tests only when this profile is active. -->
<id>it</id>
<activation>
<property>
<name>it</name>
</property>
</activation>
<properties>
<skipITs>false</skipITs>
<jmemcached.disable>false</jmemcached.disable>
</properties>
</profile>
</profiles>
</project>