blob: 7b2c54c1f27cd409600997fb2356d6611fd48f9b [file] [log] [blame]
egernug5e4eb8c2024-06-21 12:53:06 +01001<?xml version="1.0" encoding="UTF-8"?>
2<project xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5 <modelVersion>4.0.0</modelVersion>
6 <parent>
7 <groupId>org.onap.cps</groupId>
8 <artifactId>ncmp-dmi-plugin</artifactId>
9 <version>1.6.0-SNAPSHOT</version>
10 </parent>
11
12 <artifactId>dmi-service</artifactId>
13
14 <properties>
15 <app>org.onap.cps.ncmp.dmi.Application</app>
16 <base.image>${docker.pull.registry}/onap/integration-java17:12.0.0</base.image>
mpriyank204c4e92024-09-06 10:44:47 +010017 <cps.version>3.5.2</cps.version>
egernug5e4eb8c2024-06-21 12:53:06 +010018 <image.tag>${project.version}-${maven.build.timestamp}</image.tag>
19 <jacoco.minimum.coverage>0.98</jacoco.minimum.coverage>
20 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
21 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22 </properties>
23 <dependencyManagement>
24 <dependencies>
25 <dependency>
26 <groupId>org.springframework.boot</groupId>
27 <artifactId>spring-boot-dependencies</artifactId>
28 <version>3.1.2</version>
29 <type>pom</type>
30 <scope>import</scope>
31 </dependency>
32 <dependency>
33 <groupId>org.springframework.cloud</groupId>
34 <artifactId>spring-cloud-dependencies</artifactId>
35 <version>2022.0.3</version>
36 <type>pom</type>
37 <scope>import</scope>
38 </dependency>
39 <dependency>
mpriyank77fd0882024-09-05 15:10:58 +010040 <groupId>org.springframework.kafka</groupId>
41 <artifactId>spring-kafka</artifactId>
42 <version>3.2.1</version>
43 </dependency>
44 <dependency>
egernug5e4eb8c2024-06-21 12:53:06 +010045 <groupId>com.google.code.gson</groupId>
46 <artifactId>gson</artifactId>
47 <version>2.8.9</version>
48 </dependency>
49 <dependency>
50 <groupId>io.swagger.core.v3</groupId>
51 <artifactId>swagger-annotations</artifactId>
leventecsanyiaa4d6e22024-07-18 13:45:35 +020052 <version>2.2.22</version>
egernug5e4eb8c2024-06-21 12:53:06 +010053 </dependency>
54 <dependency>
55 <groupId>io.cloudevents</groupId>
56 <artifactId>cloudevents-json-jackson</artifactId>
57 <version>2.5.0</version>
58 </dependency>
59 <dependency>
60 <groupId>io.cloudevents</groupId>
61 <artifactId>cloudevents-kafka</artifactId>
62 <version>2.5.0</version>
63 </dependency>
64 <dependency>
65 <groupId>io.cloudevents</groupId>
66 <artifactId>cloudevents-spring</artifactId>
67 <version>2.5.0</version>
68 </dependency>
69 <dependency>
70 <groupId>net.logstash.logback</groupId>
71 <artifactId>logstash-logback-encoder</artifactId>
72 <version>7.0.1</version>
73 </dependency>
74 <dependency>
75 <groupId>net.minidev</groupId>
76 <artifactId>json-smart</artifactId>
77 <version>2.5.0</version>
78 </dependency>
79 <dependency>
80 <groupId>org.apache.httpcomponents</groupId>
81 <artifactId>httpclient</artifactId>
82 <version>4.5.13</version>
83 </dependency>
84 <dependency>
85 <groupId>org.codehaus.groovy</groupId>
86 <artifactId>groovy</artifactId>
87 <version>3.0.18</version>
88 </dependency>
89 <dependency>
90 <groupId>org.spockframework</groupId>
91 <artifactId>spock-core</artifactId>
92 <version>2.4-M1-groovy-3.0</version>
93 </dependency>
94 <dependency>
95 <groupId>org.spockframework</groupId>
96 <artifactId>spock-spring</artifactId>
97 <version>2.4-M1-groovy-3.0</version>
98 </dependency>
99 <dependency>
100 <groupId>org.springdoc</groupId>
101 <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
102 <version>2.0.2</version>
103 </dependency>
104 <dependency>
105 <groupId>org.testcontainers</groupId>
106 <artifactId>testcontainers-bom</artifactId>
107 <version>1.18.3</version>
108 <type>pom</type>
109 <scope>import</scope>
110 </dependency>
111 <dependency>
112 <groupId>org.codehaus.janino</groupId>
113 <artifactId>janino</artifactId>
114 <version>3.1.10</version>
115 </dependency>
116 <dependency>
117 <groupId>org.projectlombok</groupId>
118 <artifactId>lombok</artifactId>
119 <version>1.18.24</version>
120 </dependency>
121 <dependency>
122 <groupId>org.onap.cps</groupId>
123 <artifactId>cps-ncmp-events</artifactId>
124 <version>${cps.version}</version>
125 </dependency>
126 <dependency>
127 <groupId>org.apache.httpcomponents.client5</groupId>
128 <artifactId>httpclient5</artifactId>
129 <version>5.2.1</version>
130 </dependency>
mpriyank77fd0882024-09-05 15:10:58 +0100131 <dependency>
132 <groupId>com.jayway.jsonpath</groupId>
133 <artifactId>json-path</artifactId>
134 <version>2.9.0</version>
135 </dependency>
136 <dependency>
137 <groupId>org.springframework.kafka</groupId>
138 <artifactId>spring-kafka-test</artifactId>
139 <version>3.2.1</version>
140 </dependency>
egernug5e4eb8c2024-06-21 12:53:06 +0100141 </dependencies>
142 </dependencyManagement>
143 <dependencies>
144 <dependency>
145 <groupId>org.springframework.boot</groupId>
146 <artifactId>spring-boot-starter-web</artifactId>
147 </dependency>
148 <dependency>
149 <groupId>org.springframework.boot</groupId>
150 <artifactId>spring-boot-starter-validation</artifactId>
151 </dependency>
152 <dependency>
153 <groupId>org.springdoc</groupId>
154 <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
155 </dependency>
156 <dependency>
157 <groupId>org.springframework.boot</groupId>
158 <artifactId>spring-boot-starter-security</artifactId>
159 </dependency>
160 <dependency>
161 <groupId>org.springframework.boot</groupId>
162 <artifactId>spring-boot-starter-actuator</artifactId>
163 </dependency>
164 <dependency>
165 <groupId>org.springframework.kafka</groupId>
166 <artifactId>spring-kafka</artifactId>
167 </dependency>
168 <dependency>
169 <groupId>com.google.code.gson</groupId>
170 <artifactId>gson</artifactId>
171 </dependency>
172 <dependency>
173 <groupId>com.jayway.jsonpath</groupId>
174 <artifactId>json-path</artifactId>
175 </dependency>
176 <dependency>
177 <groupId>io.micrometer</groupId>
178 <artifactId>micrometer-registry-prometheus</artifactId>
179 </dependency>
180 <dependency>
181 <groupId>io.swagger.core.v3</groupId>
182 <artifactId>swagger-annotations</artifactId>
183 </dependency>
184 <dependency>
185 <groupId>io.cloudevents</groupId>
186 <artifactId>cloudevents-json-jackson</artifactId>
187 </dependency>
188 <dependency>
189 <groupId>io.cloudevents</groupId>
190 <artifactId>cloudevents-kafka</artifactId>
191 </dependency>
192 <dependency>
193 <groupId>io.cloudevents</groupId>
194 <artifactId>cloudevents-spring</artifactId>
195 </dependency>
196 <dependency>
197 <groupId>net.logstash.logback</groupId>
198 <artifactId>logstash-logback-encoder</artifactId>
199 </dependency>
200 <dependency>
201 <groupId>net.minidev</groupId>
202 <artifactId>json-smart</artifactId>
203 </dependency>
204 <dependency>
205 <groupId>org.apache.httpcomponents</groupId>
206 <artifactId>httpclient</artifactId>
207 </dependency>
208
209 <dependency>
210 <groupId>org.codehaus.groovy</groupId>
211 <artifactId>groovy</artifactId>
212 </dependency>
213 <dependency>
214 <groupId>org.codehaus.janino</groupId>
215 <artifactId>janino</artifactId>
216 </dependency>
217 <dependency>
218 <groupId>org.eclipse.jetty</groupId>
219 <artifactId>jetty-server</artifactId>
220 </dependency>
221 <dependency>
222 <groupId>org.eclipse.jetty</groupId>
223 <artifactId>jetty-http</artifactId>
224 </dependency>
225 <dependency>
226 <groupId>org.onap.cps</groupId>
227 <artifactId>cps-ncmp-events</artifactId>
228 </dependency>
229 <dependency>
230 <groupId>org.projectlombok</groupId>
231 <artifactId>lombok</artifactId>
232 </dependency>
233 <dependency>
234 <groupId>org.apache.httpcomponents.client5</groupId>
235 <artifactId>httpclient5</artifactId>
236 </dependency>
237 <!-- T E S T - D E P E N D E N C I E S -->
238 <dependency>
239 <groupId>org.spockframework</groupId>
240 <artifactId>spock-core</artifactId>
241 <scope>test</scope>
242 </dependency>
243 <dependency>
244 <groupId>org.spockframework</groupId>
245 <artifactId>spock-spring</artifactId>
246 <scope>test</scope>
247 </dependency>
248 <dependency>
249 <groupId>org.springframework.boot</groupId>
250 <artifactId>spring-boot-starter-test</artifactId>
251 <scope>test</scope>
252 <exclusions>
253 <exclusion>
254 <groupId>org.junit.vintage</groupId>
255 <artifactId>junit-vintage-engine</artifactId>
256 </exclusion>
257 </exclusions>
258 </dependency>
259 <dependency>
260 <groupId>org.springframework.kafka</groupId>
261 <artifactId>spring-kafka-test</artifactId>
262 <scope>test</scope>
263 </dependency>
264 <dependency>
265 <groupId>org.springframework.security</groupId>
266 <artifactId>spring-security-test</artifactId>
267 <scope>test</scope>
268 </dependency>
269 <dependency>
270 <groupId>org.testcontainers</groupId>
271 <artifactId>spock</artifactId>
272 <scope>test</scope>
273 </dependency>
274 <dependency>
275 <groupId>org.testcontainers</groupId>
276 <artifactId>kafka</artifactId>
277 <scope>test</scope>
278 </dependency>
279 </dependencies>
280 <build>
281 <resources>
282 <resource>
283 <directory>src/main/resources</directory>
284 <filtering>true</filtering>
285 </resource>
286 <resource>
287 <directory>target/generated-sources/license</directory>
288 <includes>
289 <include>third-party-licenses.txt</include>
290 </includes>
291 </resource>
292 <resource>
293 <directory>target/generated-resources/licenses</directory>
294 <includes>
295 <include>*.*</include>
296 </includes>
297 <targetPath>third-party-licenses</targetPath>
298 </resource>
299 </resources>
300 <plugins>
301 <plugin>
302 <groupId>org.openapitools</groupId>
303 <artifactId>openapi-generator-maven-plugin</artifactId>
304 <version>6.6.0</version>
305 <executions>
306 <execution>
307 <id>dmi-code-gen</id>
308 <goals>
309 <goal>generate</goal>
310 </goals>
311 <configuration>
egernug0900a1e2024-09-09 12:05:52 +0100312 <inputSpec>${project.basedir}/../docs/api/swagger/openapi.yaml</inputSpec>
egernug5e4eb8c2024-06-21 12:53:06 +0100313 <generatorName>spring</generatorName>
314 <generateSupportingFiles>false</generateSupportingFiles>
315 <invokerPackage>org.onap.cps.ncmp.dmi.rest.controller</invokerPackage>
316 <apiPackage>org.onap.cps.ncmp.dmi.rest.api</apiPackage>
317 <modelPackage>org.onap.cps.ncmp.dmi.model</modelPackage>
318 <generateAliasAsModel>true</generateAliasAsModel>
319 <configOptions>
320 <sourceFolder>src/gen/java</sourceFolder>
321 <dateLibrary>java11</dateLibrary>
322 <interfaceOnly>true</interfaceOnly>
323 <useTags>true</useTags>
324 <useSpringBoot3>true</useSpringBoot3>
325 <openApiNullable>false</openApiNullable>
326 <skipDefaultInterface>true</skipDefaultInterface>
327 </configOptions>
328 </configuration>
329 </execution>
330 <execution>
331 <id>dmi-datajob-code-gen</id>
332 <goals>
333 <goal>generate</goal>
334 </goals>
335 <configuration>
egernug0900a1e2024-09-09 12:05:52 +0100336 <inputSpec>${project.basedir}/../docs/api/swagger/openapi-datajob.yaml</inputSpec>
egernug5e4eb8c2024-06-21 12:53:06 +0100337 <generatorName>spring</generatorName>
338 <generateSupportingFiles>false</generateSupportingFiles>
339 <invokerPackage>org.onap.cps.ncmp.dmi.datajobs.rest.controller</invokerPackage>
340 <apiPackage>org.onap.cps.ncmp.dmi.datajobs.rest.api</apiPackage>
341 <modelPackage>org.onap.cps.ncmp.dmi.datajobs.model</modelPackage>
342 <generateAliasAsModel>true</generateAliasAsModel>
343 <configOptions>
344 <sourceFolder>src/gen/java</sourceFolder>
345 <dateLibrary>java11</dateLibrary>
346 <interfaceOnly>true</interfaceOnly>
347 <useTags>true</useTags>
348 <useSpringBoot3>true</useSpringBoot3>
349 <openApiNullable>false</openApiNullable>
350 <skipDefaultInterface>true</skipDefaultInterface>
351 </configOptions>
352 </configuration>
353 </execution>
354 <execution>
355 <id>openapi-yaml-gen</id>
356 <goals>
357 <goal>generate</goal>
358 </goals>
359 <phase>compile</phase>
360 <configuration>
egernug0900a1e2024-09-09 12:05:52 +0100361 <inputSpec>${project.basedir}/../docs/api/swagger/openapi.yaml</inputSpec>
egernug5e4eb8c2024-06-21 12:53:06 +0100362 <generatorName>openapi-yaml</generatorName>
363 <configOptions>
364 <outputFile>openapi/openapi.yaml</outputFile>
365 </configOptions>
366 </configuration>
367 </execution>
368 <execution>
369 <id>openapi-datajob-yaml-gen</id>
370 <goals>
371 <goal>generate</goal>
372 </goals>
373 <phase>compile</phase>
374 <configuration>
egernug0900a1e2024-09-09 12:05:52 +0100375 <inputSpec>${project.basedir}/../docs/api/swagger/openapi-datajob.yaml</inputSpec>
egernug5e4eb8c2024-06-21 12:53:06 +0100376 <generatorName>openapi-yaml</generatorName>
377 <configOptions>
378 <outputFile>openapi/openapi-datajob.yaml</outputFile>
379 </configOptions>
380 </configuration>
381 </execution>
382 </executions>
383 </plugin>
384 <plugin>
egernug5e4eb8c2024-06-21 12:53:06 +0100385 <groupId>org.springframework.boot</groupId>
386 <artifactId>spring-boot-maven-plugin</artifactId>
387 <version>3.1.2</version>
388 <executions>
389 <execution>
390 <goals>
391 <goal>build-info</goal>
392 <goal>repackage</goal>
393 </goals>
394 </execution>
395 </executions>
396 </plugin>
397 <plugin>
398 <groupId>org.codehaus.gmavenplus</groupId>
399 <artifactId>gmavenplus-plugin</artifactId>
400 <executions>
401 <execution>
402 <goals>
403 <goal>compileTests</goal>
404 </goals>
405 </execution>
406 </executions>
407 </plugin>
408 <plugin>
409 <groupId>org.apache.maven.plugins</groupId>
410 <artifactId>maven-surefire-plugin</artifactId>
411 <configuration>
412 <argLine>${surefireArgLine}</argLine>
413 <includes>
414 <include>**/*Spec.java</include>
415 </includes>
416 <excludes>
417 <exclude>**/IT*.java</exclude>
418 </excludes>
419 <environmentVariables>
420 <!--
421 Disable privileged container usage to cleanup the test containers;
422 these are removed automatically on jvm termination;
423 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
424 -->
425 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
426 </environmentVariables>
427 </configuration>
428 </plugin>
429 <plugin>
430 <groupId>org.apache.maven.plugins</groupId>
431 <artifactId>maven-checkstyle-plugin</artifactId>
432 <executions>
433 <execution>
434 <id>onap-license</id>
435 <goals>
436 <goal>check</goal>
437 </goals>
438 <phase>process-sources</phase>
439 <configuration>
440 <configLocation>onap-checkstyle/check-license.xml</configLocation>
441 <includeResources>false</includeResources>
442 <includeTestSourceDirectory>true</includeTestSourceDirectory>
443 <includeTestResources>false</includeTestResources>
444 <sourceDirectories>
445 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
446 </sourceDirectories>
447 <consoleOutput>false</consoleOutput>
448 <violationSeverity>warning</violationSeverity>
449 <failOnViolation>true</failOnViolation>
450 </configuration>
451 </execution>
452 <execution>
453 <id>onap-java-style</id>
454 <goals>
455 <goal>check</goal>
456 </goals>
457 <phase>process-sources</phase>
458 <configuration>
459 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
460 <sourceDirectories>
461 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
462 </sourceDirectories>
463 <includeResources>true</includeResources>
464 <includeTestSourceDirectory>true</includeTestSourceDirectory>
465 <includeTestResources>true</includeTestResources>
466 <consoleOutput>false</consoleOutput>
467 <violationSeverity>warning</violationSeverity>
468 <failOnViolation>true</failOnViolation>
469 </configuration>
470 </execution>
471 <execution>
472 <id>cps-java-style</id>
473 <goals>
474 <goal>check</goal>
475 </goals>
476 <phase>process-sources</phase>
477 <configuration>
478 <configLocation>cps-java-style.xml</configLocation>
479 <sourceDirectories>
480 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
481 </sourceDirectories>
482 <includeResources>true</includeResources>
483 <includeTestSourceDirectory>true</includeTestSourceDirectory>
484 <includeTestResources>true</includeTestResources>
485 <consoleOutput>true</consoleOutput>
486 <violationSeverity>warning</violationSeverity>
487 <failOnViolation>true</failOnViolation>
488 </configuration>
489 </execution>
490 </executions>
491 <dependencies>
492 <dependency>
493 <groupId>${project.groupId}</groupId>
494 <artifactId>checkstyle</artifactId>
495 <version>${cps.version}</version>
496 </dependency>
497 </dependencies>
498 </plugin>
499 <plugin>
500 <groupId>com.github.spotbugs</groupId>
501 <artifactId>spotbugs-maven-plugin</artifactId>
502 <version>4.4.2</version>
503 <executions>
504 <execution>
505 <id>analyze-compile</id>
506 <phase>compile</phase>
507 <goals>
508 <goal>check</goal>
509 </goals>
510 </execution>
511 </executions>
512 <dependencies>
513 <dependency>
514 <groupId>${project.groupId}</groupId>
515 <artifactId>spotbugs</artifactId>
516 <version>${cps.version}</version>
517 <scope>compile</scope>
518 </dependency>
519 </dependencies>
520 <configuration>
521 <plugins>
522 <plugin>
523 <groupId>jp.skypencil.findbugs.slf4j</groupId>
524 <artifactId>bug-pattern</artifactId>
525 <version>1.5.0</version>
526 </plugin>
527 </plugins>
528 <effort>Max</effort>
529 <threshold>Low</threshold>
530 <failOnError>true</failOnError>
531 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
532 <addSourceDirs>true</addSourceDirs>
533 <xmlOutput>true</xmlOutput>
534 <xmlOutputDirectory>${basedir}/target/spotbugs</xmlOutputDirectory>
535 </configuration>
536 </plugin>
537 <plugin>
538 <groupId>org.jacoco</groupId>
539 <artifactId>jacoco-maven-plugin</artifactId>
540 <version>0.8.10</version>
541 <configuration>
542 <excludes>
543 <exclude>org/onap/cps/ncmp/dmi/model/*</exclude>
544 <exclude>org/onap/cps/ncmp/dmi/datajobs/model/*</exclude>
545 </excludes>
546 </configuration>
547 <executions>
548 <execution>
549 <id>default-prepare-agent</id>
550 <goals>
551 <goal>prepare-agent</goal>
552 </goals>
553 </execution>
554 <execution>
555 <id>coverage-check</id>
556 <goals>
557 <goal>check</goal>
558 </goals>
559 <configuration>
560 <dataFile>${basedir}/target/code-coverage/jacoco-ut.exec</dataFile>
561 <rules>
562 <rule>
563 <element>BUNDLE</element>
564 <limits>
565 <limit>
566 <counter>INSTRUCTION</counter>
567 <value>COVEREDRATIO</value>
568 <minimum>${jacoco.minimum.coverage}</minimum>
569 </limit>
570 </limits>
571 </rule>
572 </rules>
573 </configuration>
574 </execution>
575 <execution>
576 <id>report</id>
577 <phase>verify</phase>
578 <goals>
579 <goal>report-aggregate</goal>
580 </goals>
581 <configuration>
582 <dataFileIncludes>
583 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
584 </dataFileIncludes>
585 </configuration>
586 </execution>
587 </executions>
588 </plugin>
589 </plugins>
590 <pluginManagement>
591 <plugins>
592 <plugin>
593 <groupId>com.google.cloud.tools</groupId>
594 <artifactId>jib-maven-plugin</artifactId>
595 <version>3.3.2</version>
596 <configuration>
597 <container>
598 <mainClass>${app}</mainClass>
599 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
600 </container>
601 <from>
602 <image>${base.image}</image>
603 </from>
604 <to>
605 <tags>
606 <tag>latest</tag>
607 <tag>${project.version}-latest</tag>
608 </tags>
609 <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image>
610 </to>
611 </configuration>
612 <executions>
613 <execution>
614 <phase>package</phase>
615 <id>build</id>
616 <goals>
617 <goal>dockerBuild</goal>
618 </goals>
619 </execution>
620 <execution>
621 <phase>deploy</phase>
622 <id>buildAndPush</id>
623 <goals>
624 <goal>build</goal>
625 </goals>
626 </execution>
627 </executions>
628 </plugin>
629 </plugins>
630 </pluginManagement>
631 </build>
632 <profiles>
633 <profile>
634 <id>docker</id>
635 <activation>
636 <activeByDefault>true</activeByDefault>
637 </activation>
638 <properties>
639 <image.name>ncmp-dmi-plugin</image.name>
640 </properties>
641 <build>
642 <plugins>
643 <plugin>
644 <groupId>com.google.cloud.tools</groupId>
645 <artifactId>jib-maven-plugin</artifactId>
646 </plugin>
647 </plugins>
648 </build>
649 </profile>
650 </profiles>
651
652</project>