-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
555 lines (525 loc) · 27.2 KB
/
pom.xml
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
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2018 ubirch GmbH
~
~ 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:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
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>com.ubirch.niomon</groupId>
<artifactId>parent</artifactId>
<version>1.0.5-SNAPSHOT</version>
<packaging>pom</packaging>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<name>parent [${project.version}]</name>
<description>ubirch code project</description>
<url>https://ubirch.com/</url>
<organization>
<name>ubirch GmbH</name>
<url>https://ubirch.com/</url>
</organization>
<developers>
<developer>
<name>Mikołaj Robakowski</name>
<email>[email protected]</email>
<organization>ubirch GmbH</organization>
<organizationUrl>https://ubirch.com/</organizationUrl>
</developer>
<developer>
<name>Carlos Sanchez</name>
<email>[email protected]</email>
<organization>ubirch GmbH</organization>
<organizationUrl>https://ubirch.com/</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/ubirch/niomon-${project.artifactId}.git</connection>
<developerConnection>scm:git:[email protected]:ubirch/niomon-${project.artifactId}.git</developerConnection>
<url>https://github.com/ubirch/niomon-${project.artifactId}</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<timestamp>${maven.build.timestamp}</timestamp>
<build.number>devbuild</build.number>
<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
<!-- ubirch -->
<ubirch-crypto.version>2.1.4</ubirch-crypto.version>
<ubirch-kafka-envelope.version>1.0.5-SNAPSHOT</ubirch-kafka-envelope.version>
<!-- Scala -->
<scala-maven-plugin.version>3.4.2</scala-maven-plugin.version>
<scala.major.version>2.12</scala.major.version>
<scala.minor.version>.8</scala.minor.version>
<scala.version>${scala.major.version}${scala.minor.version}</scala.version>
<!-- akka -->
<akka.http.version>10.1.8</akka.http.version>
<akka.version>2.5.22</akka.version>
<akka-slf4j.version>2.5.22</akka-slf4j.version>
<akka.stream.kafka.version>1.0.1</akka.stream.kafka.version>
<!-- kafka -->
<simple.kafka.client.version>2.1.0</simple.kafka.client.version>
<!-- Logging -->
<slf4j-api.version>1.7.25</slf4j-api.version>
<scala-logging.version>3.9.2</scala-logging.version>
<logback-classic.version>1.2.3</logback-classic.version>
<!-- Testing -->
<junit.jupiter.version>5.3.2</junit.jupiter.version>
<junit.platform.version>1.2.0</junit.platform.version>
<scalatest.version>3.0.5</scalatest.version>
<mockito.scala.version>1.4.6</mockito.scala.version>
<!-- additional libraries -->
<json4s-jackson.version>3.6.3</json4s-jackson.version>
<msgpack4s.version>0.6.0</msgpack4s.version>
<scala-uuid.version>0.3.0</scala-uuid.version>
<config.version>1.3.3</config.version>
<logstash-logback-encoder.version>5.3</logstash-logback-encoder.version>
<skinny-framework.version>3.0.1</skinny-framework.version>
<!-- comma separated names of project libraries - this is used to improve caching in docker images -->
<project-libs>foundation,foundation-mock,common-files,health-check,redis-cache</project-libs>
</properties>
<dependencies>
<!-- region scala, logging etc. -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.scala-logging</groupId>
<artifactId>scala-logging_${scala.major.version}</artifactId>
<version>${scala-logging.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>${config.version}</version>
</dependency>
<!-- endregion -->
<!-- region the underlying logging framework -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-classic.version}</version>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>${logstash-logback-encoder.version}</version>
</dependency>
<!-- endregion -->
<!-- ubirch libraries -->
<dependency>
<groupId>com.ubirch</groupId>
<artifactId>ubirch-kafka-envelope</artifactId>
<version>${ubirch-kafka-envelope.version}</version>
</dependency>
<!-- region akka libs common for all microservices -->
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_${scala.major.version}</artifactId>
<version>${akka.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-stream_${scala.major.version}</artifactId>
<version>${akka.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j_${scala.major.version}</artifactId>
<version>${akka-slf4j.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_${scala.major.version}</artifactId>
<version>${akka.version}</version>
<scope>test</scope>
</dependency>
<!-- endregion -->
<!-- region basic unit testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_${scala.major.version}</artifactId>
<version>${scalatest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.embeddedkafka</groupId>
<artifactId>embedded-kafka_${scala.major.version}</artifactId>
<version>2.1.1</version>
<scope>test</scope>
<exclusions>
<!-- The version of paranamer that embedded-kafka (via avro) uses breaks json4s ;_; -->
<exclusion>
<artifactId>paranamer</artifactId>
<groupId>com.thoughtworks.paranamer</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- endregion -->
<!-- region prometheus -->
<!-- The client -->
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient</artifactId>
<version>0.6.0</version>
</dependency>
<!-- Hotspot JVM metrics-->
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_hotspot</artifactId>
<version>0.6.0</version>
</dependency>
<!-- Exposition HTTPServer-->
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_httpserver</artifactId>
<version>0.6.0</version>
</dependency>
<!-- endregion -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>${maven.deploy.skip}</skip>
</configuration>
<inherited>false</inherited>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<executions>
<execution>
<goals><goal>copy-resources</goal></goals>
<phase>process-resources</phase>
<configuration>
<resources>
<resource>
<directory>.</directory>
<include>pom.xml</include>
</resource>
</resources>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
<inherited>false</inherited>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!-- scala compiler -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<recompileMode>incremental</recompileMode>
<args>
<arg>-deprecation</arg> <!-- Emit warning and location for usages of deprecated APIs. -->
<arg>-encoding</arg> <arg>utf-8</arg> <!-- Specify character encoding used by source files. -->
<arg>-explaintypes</arg> <!-- Explain type errors in more detail. -->
<arg>-feature</arg> <!-- Emit warning and location for usages of features that should be imported explicitly. -->
<arg>-unchecked</arg> <!-- Enable additional warnings where generated code depends on assumptions. -->
<arg>-Xcheckinit</arg> <!-- Wrap field accessors to throw an exception on uninitialized access. -->
<arg>-Xfatal-warnings</arg> <!-- Fail the compilation if there are any warnings. -->
<arg>-Xfuture</arg> <!-- Turn on future language features. -->
<arg>-Xlint:adapted-args</arg> <!-- Warn if an argument list is modified to match the receiver. -->
<arg>-Xlint:by-name-right-associative</arg> <!-- By-name parameter of right associative operator. -->
<arg>-Xlint:constant</arg> <!-- Evaluation of a constant arithmetic expression results in an error. -->
<arg>-Xlint:delayedinit-select</arg> <!-- Selecting member of DelayedInit. -->
<arg>-Xlint:doc-detached</arg> <!-- A Scaladoc comment appears to be detached from its element. -->
<arg>-Xlint:inaccessible</arg> <!-- Warn about inaccessible types in method signatures. -->
<arg>-Xlint:infer-any</arg> <!-- Warn when a type argument is inferred to be `Any`. -->
<arg>-Xlint:missing-interpolator</arg> <!-- A string literal appears to be missing an interpolator id. -->
<arg>-Xlint:nullary-override</arg> <!-- Warn when non-nullary `def f()' overrides nullary `def f'. -->
<arg>-Xlint:nullary-unit</arg> <!-- Warn when nullary methods return Unit. -->
<arg>-Xlint:option-implicit</arg> <!-- Option.apply used implicit view. -->
<arg>-Xlint:package-object-classes</arg> <!-- Class or object defined in package object. -->
<arg>-Xlint:poly-implicit-overload</arg> <!-- Parameterized overloaded implicit methods are not visible as view bounds. -->
<arg>-Xlint:private-shadow</arg> <!-- A private field (or class parameter) shadows a superclass field. -->
<arg>-Xlint:stars-align</arg> <!-- Pattern sequence wildcard must align with sequence component. -->
<arg>-Xlint:type-parameter-shadow</arg> <!-- A local type parameter shadows a type already in scope. -->
<arg>-Xlint:unsound-match</arg> <!-- Pattern match may not be typesafe. -->
<arg>-Yno-adapted-args</arg> <!-- Do not adapt an argument list (either by inserting () or creating a tuple) to match the receiver. -->
<arg>-Ypartial-unification</arg> <!-- Enable partial unification in type constructor inference -->
<arg>-Ywarn-dead-code</arg> <!-- Warn when dead code is identified. -->
<arg>-Ywarn-extra-implicit</arg> <!-- Warn when more than one implicit parameter section is defined. -->
<arg>-Ywarn-inaccessible</arg> <!-- Warn about inaccessible types in method signatures. -->
<arg>-Ywarn-infer-any</arg> <!-- Warn when a type argument is inferred to be `Any`. -->
<arg>-Ywarn-nullary-override</arg> <!-- Warn when non-nullary `def f()' overrides nullary `def f'. -->
<arg>-Ywarn-nullary-unit</arg> <!-- Warn when nullary methods return Unit. -->
<arg>-Ywarn-numeric-widen</arg> <!-- Warn when numerics are widened. -->
<arg>-Ywarn-unused:implicits</arg> <!-- Warn if an implicit parameter is unused. -->
<arg>-Ywarn-unused:imports</arg> <!-- Warn if an import selector is not referenced. -->
<arg>-Ywarn-unused:locals</arg> <!-- Warn if a local definition is unused. -->
<arg>-Ywarn-unused:params</arg> <!-- Warn if a value parameter is unused. -->
<arg>-Ywarn-unused:patvars</arg> <!-- Warn if a variable bound in a pattern is unused. -->
<arg>-Ywarn-unused:privates</arg> <!-- Warn if a private member is unused. -->
<arg>-Ywarn-value-discard</arg> <!-- Warn when non-Unit expression results are unused. -->
</args>
</configuration>
</plugin>
<!-- disable surefire -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<!-- enable scalatest -->
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<junitxml>.</junitxml>
<filereports>WDF TestSuite.txt</filereports>
</configuration>
<executions>
<execution>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- add licenses.txt -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>attach-licenses</id>
<goals>
<goal>add-third-party</goal>
</goals>
<configuration>
<thirdPartyFilename>licenses.txt</thirdPartyFilename>
</configuration>
</execution>
</executions>
</plugin>
<!-- copy all dependencies into the target/lib dir for our docker image -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<!--
Ok, so here we have three different executions: `copy-all-deps` is self-explanatory and is here
only so the things continue to work locally. The two other - `copy-third-party-deps` and
`copy-project-deps` create folders with respectively third- and first-party dependencies.
This is done, so they can be COPYied into a docker image in two steps - first-party dependencies
are often recomplied, and if all the dependencies would be added together that would ruin
docker caching mechanisms.
-->
<execution>
<id>copy-all-deps</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<overWriteReleases>false</overWriteReleases>
<includeScope>runtime</includeScope>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
<execution>
<id>copy-third-party-deps</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<overWriteReleases>false</overWriteReleases>
<includeScope>runtime</includeScope>
<outputDirectory>${project.build.directory}/third-party-lib</outputDirectory>
<excludeArtifactIds>${project-libs}</excludeArtifactIds>
</configuration>
</execution>
<execution>
<id>copy-project-deps</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<overWriteReleases>false</overWriteReleases>
<includeScope>runtime</includeScope>
<outputDirectory>${project.build.directory}/project-lib</outputDirectory>
<includeArtifactIds>${project-libs}</includeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
<!-- create and/or push the created docker image -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.4.4</version>
<executions>
<execution>
<id>default</id>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
<configuration>
<buildDirectory>${project.build.outputDirectory}</buildDirectory>
<repository>ubirch/niomon-${project.artifactId}</repository>
<tag>${build.number}</tag>
<buildArgs>
<VERSION>${project.version}</VERSION>
<BUILD>${build.number}</BUILD>
<SERVICE_NAME>${project.name}</SERVICE_NAME>
<THIRD_PARTY_LIB>target/third-party-lib</THIRD_PARTY_LIB>
<PROJECT_LIB>target/project-lib</PROJECT_LIB>
<JAR_FILE>target/${project.build.finalName}.${project.packaging}</JAR_FILE>
</buildArgs>
</configuration>
<dependencies>
<!-- if compiling with java 10 this is necessary -->
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>javax.activation</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
<!-- for mvn deploy to work, disable the default deploy plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- checkstyle -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>verify-style</id>
<!-- Bind to verify so it runs after package & unit tests, but before install -->
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<configLocation>
https://raw.githubusercontent.com/ubirch/ubirch-codestyle/master/ubirch-checkstyle.xml
</configLocation>
<suppressionsLocation>
https://raw.githubusercontent.com/ubirch/ubirch-codestyle/master/ubirch-checkstyle-suppression.xml
</suppressionsLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<logViolationsToConsole>true</logViolationsToConsole>
<failOnViolation>true</failOnViolation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
<dependencies>
<!-- Override dependencies to use latest version of checkstyle -->
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.45.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
<extensions>
<extension>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-extension</artifactId>
<version>1.4.0</version>
</extension>
</extensions>
</build>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>gitlab-maven</id>
<url>https://gitlab.com/api/v4/projects/37429227/packages/maven</url>
</repository>
</repositories>
</project>