blob: 616a8822753e591140d1a0e175b37006d31e1d38 [file] [log] [blame]
DylanB95ESTb5a23832021-06-02 19:45:46 +01001<!--
2 ============LICENSE_START=======================================================
ToineSiebelink54d10a72022-04-05 13:54:32 +01003 Copyright (c) 2021-2022 Nordix Foundation.
puthuparambil.aditya08fe9712021-07-13 11:52:13 +01004 Modifications Copyright (C) 2021 Bell Canada.
DylanB95ESTb5a23832021-06-02 19:45:46 +01005 ================================================================================
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
lukegleesonb208aeb2021-07-08 16:48:15 +01009
DylanB95ESTb5a23832021-06-02 19:45:46 +010010 http://www.apache.org/licenses/LICENSE-2.0
lukegleesonb208aeb2021-07-08 16:48:15 +010011
DylanB95ESTb5a23832021-06-02 19:45:46 +010012 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
lukegleesonb208aeb2021-07-08 16:48:15 +010017
18 SPDX-License-Identifier: Apache-2.0
DylanB95ESTb5a23832021-06-02 19:45:46 +010019 ============LICENSE_END=========================================================
ToineSiebelink4cbd60b2021-09-30 16:53:42 +010020-->
DylanB95ESTb5a23832021-06-02 19:45:46 +010021<project xmlns="http://maven.apache.org/POM/4.0.0"
puthuparambil.aditya08fe9712021-07-13 11:52:13 +010022 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
DylanB95ESTb5a23832021-06-02 19:45:46 +010024 <modelVersion>4.0.0</modelVersion>
DylanB95ESTb5a23832021-06-02 19:45:46 +010025 <parent>
26 <groupId>org.onap.oparent</groupId>
27 <artifactId>oparent</artifactId>
ToineSiebelink54d10a72022-04-05 13:54:32 +010028 <version>3.3.0</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +010029 <relativePath/>
30 </parent>
DylanB95ESTb5a23832021-06-02 19:45:46 +010031 <organization>
32 <name>ONAP - CPS</name>
33 <url>http://www.onap.org/</url>
34 </organization>
DylanB95ESTb5a23832021-06-02 19:45:46 +010035 <groupId>org.onap.cps</groupId>
36 <artifactId>ncmp-dmi-plugin</artifactId>
mpriyank145a1432022-03-23 17:14:33 +053037 <version>1.2.0-SNAPSHOT</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +010038 <name>ncmp-dmi-plugin</name>
39 <description>DMI Plugin Service</description>
DylanB95ESTb5a23832021-06-02 19:45:46 +010040 <properties>
niamhcore71a61bb2021-07-06 10:32:17 +010041 <app>org.onap.cps.ncmp.dmi.Application</app>
shivasubedif4b36ef2021-06-23 16:01:10 +010042 <base.image>${docker.pull.registry}/onap/integration-java11:8.0.0</base.image>
Bruno Sakotob5ec86e2022-03-16 23:20:05 -040043 <cps.version>3.0.0</cps.version>
shivasubedif4b36ef2021-06-23 16:01:10 +010044 <image.tag>${project.version}-${maven.build.timestamp}</image.tag>
ToineSiebelink4cbd60b2021-09-30 16:53:42 +010045 <jacoco.minimum.coverage>0.98</jacoco.minimum.coverage>
shivasubedif4b36ef2021-06-23 16:01:10 +010046 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
DylanB95ESTb5a23832021-06-02 19:45:46 +010047 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
tragaitdffff5d2022-01-10 12:16:25 +000048 <httpclient.version>4.4.1</httpclient.version>
DylanB95ESTb5a23832021-06-02 19:45:46 +010049 </properties>
DylanB95ESTb5a23832021-06-02 19:45:46 +010050 <dependencyManagement>
51 <dependencies>
52 <dependency>
53 <groupId>org.springframework.boot</groupId>
54 <artifactId>spring-boot-dependencies</artifactId>
JosephKeenanbe383b42022-03-23 15:12:53 +000055 <version>2.6.4</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +010056 <type>pom</type>
57 <scope>import</scope>
58 </dependency>
59 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +010060 <groupId>org.spockframework</groupId>
shivasubedi275c1dc2021-07-07 16:39:34 +010061 <artifactId>spock-bom</artifactId>
62 <version>2.0-M5-groovy-3.0</version>
63 <type>pom</type>
64 <scope>import</scope>
DylanB95ESTb5a23832021-06-02 19:45:46 +010065 </dependency>
niamhcore98351072021-12-15 11:23:56 +000066 <dependency>
ToineSiebelink6b354302022-03-02 12:26:02 +000067 <groupId>com.google.code.gson</groupId>
68 <artifactId>gson</artifactId>
69 <version>2.8.9</version>
70 </dependency>
JosephKeenanbe383b42022-03-23 15:12:53 +000071 <dependency>
72 <groupId>org.springframework.cloud</groupId>
73 <artifactId>spring-cloud-dependencies</artifactId>
74 <version>2021.0.1</version>
75 <type>pom</type>
76 <scope>import</scope>
77 </dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +010078 </dependencies>
79 </dependencyManagement>
DylanB95ESTb5a23832021-06-02 19:45:46 +010080 <dependencies>
81 <dependency>
82 <groupId>org.springframework.boot</groupId>
83 <artifactId>spring-boot-starter-web</artifactId>
84 </dependency>
85 <dependency>
86 <groupId>org.springframework.boot</groupId>
87 <artifactId>spring-boot-starter-validation</artifactId>
88 </dependency>
89 <dependency>
90 <groupId>org.codehaus.groovy</groupId>
91 <artifactId>groovy</artifactId>
DylanB95ESTb5a23832021-06-02 19:45:46 +010092 </dependency>
93 <dependency>
Renu Kumari306cadd2021-10-22 00:50:29 -040094 <groupId>com.jayway.jsonpath</groupId>
95 <artifactId>json-path</artifactId>
96 </dependency>
97 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +010098 <groupId>org.springframework.boot</groupId>
99 <artifactId>spring-boot-starter-test</artifactId>
100 <scope>test</scope>
101 <exclusions>
102 <exclusion>
103 <groupId>org.junit.vintage</groupId>
104 <artifactId>junit-vintage-engine</artifactId>
105 </exclusion>
106 </exclusions>
107 </dependency>
108 <dependency>
puthuparambil.aditya1d902262021-11-23 14:53:43 +0000109 <groupId>org.springdoc</groupId>
110 <artifactId>springdoc-openapi-ui</artifactId>
111 <version>1.5.9</version>
112 </dependency>
113 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100114 <groupId>org.spockframework</groupId>
115 <artifactId>spock-core</artifactId>
116 <scope>test</scope>
117 </dependency>
118 <dependency>
119 <groupId>org.spockframework</groupId>
120 <artifactId>spock-spring</artifactId>
121 <scope>test</scope>
122 </dependency>
123 <dependency>
Renu Kumari306cadd2021-10-22 00:50:29 -0400124 <groupId>org.springframework.security</groupId>
125 <artifactId>spring-security-test</artifactId>
126 <scope>test</scope>
127 </dependency>
128 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100129 <groupId>io.swagger</groupId>
130 <artifactId>swagger-annotations</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100131 <version>1.6.2</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100132 </dependency>
shivasubedi55500c32021-06-23 16:31:02 +0100133 <dependency>
134 <groupId>io.springfox</groupId>
135 <artifactId>springfox-boot-starter</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100136 <version>3.0.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100137 </dependency>
138 <dependency>
139 <groupId>org.springframework.boot</groupId>
140 <artifactId>spring-boot-starter-security</artifactId>
141 </dependency>
142 <dependency>
143 <groupId>org.springframework.boot</groupId>
144 <artifactId>spring-boot-starter-actuator</artifactId>
145 </dependency>
puthuparambil.aditya08fe9712021-07-13 11:52:13 +0100146 <dependency>
niamhcore71a61bb2021-07-06 10:32:17 +0100147 <groupId>org.projectlombok</groupId>
148 <artifactId>lombok</artifactId>
149 </dependency>
150 <dependency>
puthuparambil.aditya08fe9712021-07-13 11:52:13 +0100151 <groupId>io.micrometer</groupId>
152 <artifactId>micrometer-registry-prometheus</artifactId>
153 </dependency>
niamhcore3139ece2021-07-30 16:25:16 +0100154 <dependency>
155 <groupId>net.minidev</groupId>
156 <artifactId>json-smart</artifactId>
157 </dependency>
niamhcore6d7e3042021-08-30 09:31:53 +0100158 <dependency>
159 <groupId>com.google.code.gson</groupId>
160 <artifactId>gson</artifactId>
161 </dependency>
tragaitdffff5d2022-01-10 12:16:25 +0000162 <dependency>
163 <groupId>org.apache.httpcomponents</groupId>
164 <artifactId>httpclient</artifactId>
165 <version>${httpclient.version}</version>
166 </dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100167 </dependencies>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100168 <build>
169 <resources>
170 <resource>
171 <directory>src/main/resources</directory>
172 <filtering>true</filtering>
173 </resource>
174 <resource>
175 <directory>target/generated-sources/license</directory>
176 <includes>
177 <include>third-party-licenses.txt</include>
178 </includes>
179 </resource>
180 <resource>
181 <directory>target/generated-resources/licenses</directory>
182 <includes>
183 <include>*.*</include>
184 </includes>
185 <targetPath>third-party-licenses</targetPath>
186 </resource>
187 </resources>
188 <plugins>
189 <plugin>
190 <groupId>io.swagger.codegen.v3</groupId>
191 <artifactId>swagger-codegen-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100192 <version>3.0.18</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100193 <executions>
194 <execution>
195 <goals>
196 <goal>generate</goal>
197 </goals>
198 <configuration>
Renu Kumari3aea57e2021-10-12 13:41:01 -0400199 <inputSpec>${project.basedir}/openapi/openapi.yml</inputSpec>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100200 <language>spring</language>
201 <generateSupportingFiles>false</generateSupportingFiles>
tragait7c4a9aa2021-07-19 13:46:37 +0100202 <apiPackage>org.onap.cps.ncmp.dmi.rest.api</apiPackage>
203 <modelPackage>org.onap.cps.ncmp.dmi.model</modelPackage>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100204 <configOptions>
205 <sourceFolder>src/gen/java</sourceFolder>
206 <dateLibrary>java11</dateLibrary>
207 <interfaceOnly>true</interfaceOnly>
208 <useTags>true</useTags>
209 </configOptions>
210 </configuration>
211 </execution>
shivasubedi3d1579c2021-09-13 16:43:20 +0100212 <execution>
213 <id>openapi-yaml-gen</id>
214 <goals>
215 <goal>generate</goal>
216 </goals>
217 <phase>compile</phase>
218 <configuration>
Renu Kumari3aea57e2021-10-12 13:41:01 -0400219 <inputSpec>${project.basedir}/openapi/openapi.yml</inputSpec>
shivasubedi3d1579c2021-09-13 16:43:20 +0100220 <language>openapi-yaml</language>
221 </configuration>
222 </execution>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100223 </executions>
224 </plugin>
225 <plugin>
puthuparambil.aditya1d902262021-11-23 14:53:43 +0000226 <artifactId>maven-resources-plugin</artifactId>
227 <executions>
228 <execution>
229 <id>copy-resources</id>
230 <phase>compile</phase>
231 <goals>
232 <goal>copy-resources</goal>
233 </goals>
234 <configuration>
235 <outputDirectory>${project.basedir}/target/classes/static/api-docs</outputDirectory>
236 <resources>
237 <resource>
238 <directory>${project.basedir}/target/generated-sources/swagger/</directory>
239 <includes>
240 <include>openapi.yaml</include>
241 </includes>
242 </resource>
243 </resources>
244 </configuration>
245 </execution>
246 </executions>
247 </plugin>
248 <plugin>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100249 <groupId>org.springframework.boot</groupId>
250 <artifactId>spring-boot-maven-plugin</artifactId>
JosephKeenanbe383b42022-03-23 15:12:53 +0000251 <version>2.6.4</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100252 <executions>
253 <execution>
254 <goals>
255 <goal>build-info</goal>
256 <goal>repackage</goal>
257 </goals>
258 </execution>
259 </executions>
260 </plugin>
261 <plugin>
262 <groupId>org.codehaus.gmavenplus</groupId>
263 <artifactId>gmavenplus-plugin</artifactId>
264 <executions>
265 <execution>
266 <goals>
267 <goal>compileTests</goal>
268 </goals>
269 </execution>
270 </executions>
271 </plugin>
272 <plugin>
273 <groupId>org.apache.maven.plugins</groupId>
274 <artifactId>maven-surefire-plugin</artifactId>
275 <configuration>
276 <argLine>${surefireArgLine}</argLine>
277 <includes>
278 <include>**/*Spec.java</include>
279 </includes>
280 <excludes>
281 <exclude>**/IT*.java</exclude>
282 </excludes>
283 </configuration>
284 </plugin>
shivasubedi55500c32021-06-23 16:31:02 +0100285 <plugin>
286 <groupId>org.apache.maven.plugins</groupId>
287 <artifactId>maven-checkstyle-plugin</artifactId>
288 <executions>
289 <execution>
Bruno Sakotoff5f74d2021-07-14 11:15:48 -0400290 <id>onap-license</id>
291 <goals>
292 <goal>check</goal>
293 </goals>
294 <phase>process-sources</phase>
295 <configuration>
296 <configLocation>onap-checkstyle/check-license.xml</configLocation>
297 <includeResources>false</includeResources>
298 <includeTestSourceDirectory>true</includeTestSourceDirectory>
299 <includeTestResources>false</includeTestResources>
300 <sourceDirectories>
301 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
302 </sourceDirectories>
303 <consoleOutput>false</consoleOutput>
304 <violationSeverity>warning</violationSeverity>
305 <failOnViolation>true</failOnViolation>
306 </configuration>
307 </execution>
308 <execution>
309 <id>onap-java-style</id>
310 <goals>
311 <goal>check</goal>
312 </goals>
313 <phase>process-sources</phase>
314 <configuration>
315 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
316 <sourceDirectories>
317 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
318 </sourceDirectories>
319 <includeResources>true</includeResources>
320 <includeTestSourceDirectory>true</includeTestSourceDirectory>
321 <includeTestResources>true</includeTestResources>
322 <consoleOutput>false</consoleOutput>
323 <violationSeverity>warning</violationSeverity>
324 <failOnViolation>true</failOnViolation>
325 </configuration>
326 </execution>
327 <execution>
shivasubedi55500c32021-06-23 16:31:02 +0100328 <id>cps-java-style</id>
329 <goals>
330 <goal>check</goal>
331 </goals>
332 <phase>process-sources</phase>
333 <configuration>
334 <configLocation>cps-java-style.xml</configLocation>
335 <sourceDirectories>
336 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
337 </sourceDirectories>
338 <includeResources>true</includeResources>
339 <includeTestSourceDirectory>true</includeTestSourceDirectory>
340 <includeTestResources>true</includeTestResources>
341 <consoleOutput>true</consoleOutput>
342 <violationSeverity>warning</violationSeverity>
343 <failOnViolation>true</failOnViolation>
344 </configuration>
345 </execution>
346 </executions>
347 <dependencies>
348 <dependency>
349 <groupId>${project.groupId}</groupId>
350 <artifactId>checkstyle</artifactId>
351 <version>${cps.version}</version>
352 </dependency>
353 </dependencies>
354 </plugin>
355 <plugin>
356 <groupId>com.github.spotbugs</groupId>
357 <artifactId>spotbugs-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100358 <version>4.1.3</version>
shivasubedi55500c32021-06-23 16:31:02 +0100359 <executions>
360 <execution>
361 <id>analyze-compile</id>
362 <phase>compile</phase>
363 <goals>
364 <goal>check</goal>
365 </goals>
366 </execution>
367 </executions>
368 <dependencies>
369 <dependency>
370 <groupId>${project.groupId}</groupId>
371 <artifactId>spotbugs</artifactId>
372 <version>${cps.version}</version>
373 <scope>compile</scope>
374 </dependency>
375 </dependencies>
376 <configuration>
377 <plugins>
378 <plugin>
379 <groupId>jp.skypencil.findbugs.slf4j</groupId>
380 <artifactId>bug-pattern</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100381 <version>1.5.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100382 </plugin>
383 </plugins>
384 <effort>Max</effort>
385 <threshold>Low</threshold>
386 <failOnError>true</failOnError>
387 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
niamhcore4f431882021-09-21 16:08:29 +0100388 <addSourceDirs>true</addSourceDirs>
shivasubedi55500c32021-06-23 16:31:02 +0100389 <xmlOutput>true</xmlOutput>
390 <xmlOutputDirectory>${basedir}/target/spotbugs</xmlOutputDirectory>
391 </configuration>
392 </plugin>
393 <plugin>
394 <groupId>org.jacoco</groupId>
395 <artifactId>jacoco-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100396 <version>0.8.5</version>
shivasubedi55500c32021-06-23 16:31:02 +0100397 <configuration>
398 <excludes>
tragait7c4a9aa2021-07-19 13:46:37 +0100399 <exclude>org/onap/cps/ncmp/dmi/model/*</exclude>
shivasubedi55500c32021-06-23 16:31:02 +0100400 </excludes>
401 </configuration>
402 <executions>
403 <execution>
404 <id>default-prepare-agent</id>
405 <goals>
406 <goal>prepare-agent</goal>
407 </goals>
408 </execution>
409 <execution>
410 <id>coverage-check</id>
411 <goals>
412 <goal>check</goal>
413 </goals>
414 <configuration>
415 <dataFile>${basedir}/target/code-coverage/jacoco-ut.exec</dataFile>
416 <rules>
417 <rule>
418 <element>BUNDLE</element>
419 <limits>
420 <limit>
421 <counter>INSTRUCTION</counter>
422 <value>COVEREDRATIO</value>
423 <minimum>${jacoco.minimum.coverage}</minimum>
424 </limit>
425 </limits>
426 </rule>
427 </rules>
428 </configuration>
429 </execution>
430 <execution>
431 <id>report</id>
432 <phase>verify</phase>
433 <goals>
434 <goal>report-aggregate</goal>
435 </goals>
436 <configuration>
437 <dataFileIncludes>
438 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
439 </dataFileIncludes>
440 </configuration>
441 </execution>
442 </executions>
443 </plugin>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100444 </plugins>
shivasubedif4b36ef2021-06-23 16:01:10 +0100445 <pluginManagement>
446 <plugins>
447 <plugin>
448 <groupId>com.google.cloud.tools</groupId>
449 <artifactId>jib-maven-plugin</artifactId>
niamhcore2fb3f662021-09-29 15:32:32 +0100450 <version>3.1.4</version>
shivasubedif4b36ef2021-06-23 16:01:10 +0100451 <configuration>
452 <container>
453 <mainClass>${app}</mainClass>
454 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
455 </container>
456 <from>
457 <image>${base.image}</image>
458 </from>
459 <to>
460 <tags>
JosephKeenan371ec2f2021-12-01 09:46:58 +0000461 <tag>${project.version}-latest</tag>
shivasubedif4b36ef2021-06-23 16:01:10 +0100462 </tags>
463 <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image>
464 </to>
465 </configuration>
466 <executions>
467 <execution>
468 <phase>package</phase>
469 <id>build</id>
470 <goals>
471 <goal>dockerBuild</goal>
472 </goals>
473 </execution>
474 <execution>
475 <phase>deploy</phase>
476 <id>buildAndPush</id>
477 <goals>
478 <goal>build</goal>
479 </goals>
480 </execution>
481 </executions>
482 </plugin>
483 </plugins>
484 </pluginManagement>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100485 </build>
shivasubedif4b36ef2021-06-23 16:01:10 +0100486 <profiles>
487 <profile>
puthuparambil.adityaeddb3dd2021-07-27 15:57:19 +0100488 <id>docker</id>
shivasubedif4b36ef2021-06-23 16:01:10 +0100489 <activation>
490 <activeByDefault>true</activeByDefault>
491 </activation>
492 <properties>
493 <image.name>ncmp-dmi-plugin</image.name>
494 </properties>
495 <build>
496 <plugins>
497 <plugin>
498 <groupId>com.google.cloud.tools</groupId>
499 <artifactId>jib-maven-plugin</artifactId>
500 </plugin>
501 </plugins>
502 </build>
503 </profile>
504 </profiles>
lukegleesonb208aeb2021-07-08 16:48:15 +0100505</project>