blob: 01073189abc0aa5f1a7e28fb07a79634df847f89 [file] [log] [blame]
DylanB95ESTb5a23832021-06-02 19:45:46 +01001<!--
2 ============LICENSE_START=======================================================
3 Copyright (c) 2021 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>
28 <version>3.2.0</version>
29 <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>
DylanB95ESTa013ea12021-10-14 09:36:55 +010037 <version>1.1.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>
Renu Kumari6efb16e2021-09-13 13:41:17 -040043 <cps.version>2.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>
DylanB95ESTb5a23832021-06-02 19:45:46 +010048 </properties>
DylanB95ESTb5a23832021-06-02 19:45:46 +010049 <dependencyManagement>
50 <dependencies>
51 <dependency>
52 <groupId>org.springframework.boot</groupId>
53 <artifactId>spring-boot-dependencies</artifactId>
Bruno Sakotob8c23f72021-10-28 11:28:18 +020054 <version>2.5.5</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +010055 <type>pom</type>
56 <scope>import</scope>
57 </dependency>
58 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +010059 <groupId>org.spockframework</groupId>
shivasubedi275c1dc2021-07-07 16:39:34 +010060 <artifactId>spock-bom</artifactId>
61 <version>2.0-M5-groovy-3.0</version>
62 <type>pom</type>
63 <scope>import</scope>
DylanB95ESTb5a23832021-06-02 19:45:46 +010064 </dependency>
niamhcore98351072021-12-15 11:23:56 +000065 <dependency>
66 <groupId>org.apache.logging.log4j</groupId>
67 <artifactId>log4j-api</artifactId>
68 <version>2.16.0</version>
69 </dependency>
70 <dependency>
71 <groupId>org.apache.logging.log4j</groupId>
72 <artifactId>log4j-to-slf4j</artifactId>
73 <version>2.16.0</version>
74 </dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +010075 </dependencies>
76 </dependencyManagement>
DylanB95ESTb5a23832021-06-02 19:45:46 +010077 <dependencies>
78 <dependency>
79 <groupId>org.springframework.boot</groupId>
80 <artifactId>spring-boot-starter-web</artifactId>
81 </dependency>
82 <dependency>
83 <groupId>org.springframework.boot</groupId>
84 <artifactId>spring-boot-starter-validation</artifactId>
85 </dependency>
86 <dependency>
87 <groupId>org.codehaus.groovy</groupId>
88 <artifactId>groovy</artifactId>
DylanB95ESTb5a23832021-06-02 19:45:46 +010089 </dependency>
90 <dependency>
Renu Kumari306cadd2021-10-22 00:50:29 -040091 <groupId>com.jayway.jsonpath</groupId>
92 <artifactId>json-path</artifactId>
93 </dependency>
94 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +010095 <groupId>org.springframework.boot</groupId>
96 <artifactId>spring-boot-starter-test</artifactId>
97 <scope>test</scope>
98 <exclusions>
99 <exclusion>
100 <groupId>org.junit.vintage</groupId>
101 <artifactId>junit-vintage-engine</artifactId>
102 </exclusion>
103 </exclusions>
104 </dependency>
105 <dependency>
puthuparambil.aditya1d902262021-11-23 14:53:43 +0000106 <groupId>org.springdoc</groupId>
107 <artifactId>springdoc-openapi-ui</artifactId>
108 <version>1.5.9</version>
109 </dependency>
110 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100111 <groupId>org.spockframework</groupId>
112 <artifactId>spock-core</artifactId>
113 <scope>test</scope>
114 </dependency>
115 <dependency>
116 <groupId>org.spockframework</groupId>
117 <artifactId>spock-spring</artifactId>
118 <scope>test</scope>
119 </dependency>
120 <dependency>
Renu Kumari306cadd2021-10-22 00:50:29 -0400121 <groupId>org.springframework.security</groupId>
122 <artifactId>spring-security-test</artifactId>
123 <scope>test</scope>
124 </dependency>
125 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100126 <groupId>io.swagger</groupId>
127 <artifactId>swagger-annotations</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100128 <version>1.6.2</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100129 </dependency>
shivasubedi55500c32021-06-23 16:31:02 +0100130 <dependency>
131 <groupId>io.springfox</groupId>
132 <artifactId>springfox-boot-starter</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100133 <version>3.0.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100134 </dependency>
135 <dependency>
136 <groupId>org.springframework.boot</groupId>
137 <artifactId>spring-boot-starter-security</artifactId>
138 </dependency>
139 <dependency>
140 <groupId>org.springframework.boot</groupId>
141 <artifactId>spring-boot-starter-actuator</artifactId>
142 </dependency>
puthuparambil.aditya08fe9712021-07-13 11:52:13 +0100143 <dependency>
niamhcore71a61bb2021-07-06 10:32:17 +0100144 <groupId>org.projectlombok</groupId>
145 <artifactId>lombok</artifactId>
146 </dependency>
147 <dependency>
puthuparambil.aditya08fe9712021-07-13 11:52:13 +0100148 <groupId>io.micrometer</groupId>
149 <artifactId>micrometer-registry-prometheus</artifactId>
150 </dependency>
niamhcore3139ece2021-07-30 16:25:16 +0100151 <dependency>
152 <groupId>net.minidev</groupId>
153 <artifactId>json-smart</artifactId>
154 </dependency>
niamhcore6d7e3042021-08-30 09:31:53 +0100155 <dependency>
156 <groupId>com.google.code.gson</groupId>
157 <artifactId>gson</artifactId>
158 </dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100159 </dependencies>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100160 <build>
161 <resources>
162 <resource>
163 <directory>src/main/resources</directory>
164 <filtering>true</filtering>
165 </resource>
166 <resource>
167 <directory>target/generated-sources/license</directory>
168 <includes>
169 <include>third-party-licenses.txt</include>
170 </includes>
171 </resource>
172 <resource>
173 <directory>target/generated-resources/licenses</directory>
174 <includes>
175 <include>*.*</include>
176 </includes>
177 <targetPath>third-party-licenses</targetPath>
178 </resource>
179 </resources>
180 <plugins>
181 <plugin>
182 <groupId>io.swagger.codegen.v3</groupId>
183 <artifactId>swagger-codegen-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100184 <version>3.0.18</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100185 <executions>
186 <execution>
187 <goals>
188 <goal>generate</goal>
189 </goals>
190 <configuration>
Renu Kumari3aea57e2021-10-12 13:41:01 -0400191 <inputSpec>${project.basedir}/openapi/openapi.yml</inputSpec>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100192 <language>spring</language>
193 <generateSupportingFiles>false</generateSupportingFiles>
tragait7c4a9aa2021-07-19 13:46:37 +0100194 <apiPackage>org.onap.cps.ncmp.dmi.rest.api</apiPackage>
195 <modelPackage>org.onap.cps.ncmp.dmi.model</modelPackage>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100196 <configOptions>
197 <sourceFolder>src/gen/java</sourceFolder>
198 <dateLibrary>java11</dateLibrary>
199 <interfaceOnly>true</interfaceOnly>
200 <useTags>true</useTags>
201 </configOptions>
202 </configuration>
203 </execution>
shivasubedi3d1579c2021-09-13 16:43:20 +0100204 <execution>
205 <id>openapi-yaml-gen</id>
206 <goals>
207 <goal>generate</goal>
208 </goals>
209 <phase>compile</phase>
210 <configuration>
Renu Kumari3aea57e2021-10-12 13:41:01 -0400211 <inputSpec>${project.basedir}/openapi/openapi.yml</inputSpec>
shivasubedi3d1579c2021-09-13 16:43:20 +0100212 <language>openapi-yaml</language>
213 </configuration>
214 </execution>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100215 </executions>
216 </plugin>
217 <plugin>
puthuparambil.aditya1d902262021-11-23 14:53:43 +0000218 <artifactId>maven-resources-plugin</artifactId>
219 <executions>
220 <execution>
221 <id>copy-resources</id>
222 <phase>compile</phase>
223 <goals>
224 <goal>copy-resources</goal>
225 </goals>
226 <configuration>
227 <outputDirectory>${project.basedir}/target/classes/static/api-docs</outputDirectory>
228 <resources>
229 <resource>
230 <directory>${project.basedir}/target/generated-sources/swagger/</directory>
231 <includes>
232 <include>openapi.yaml</include>
233 </includes>
234 </resource>
235 </resources>
236 </configuration>
237 </execution>
238 </executions>
239 </plugin>
240 <plugin>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100241 <groupId>org.springframework.boot</groupId>
242 <artifactId>spring-boot-maven-plugin</artifactId>
shivasubedi7e340a82021-08-20 12:10:10 +0100243 <version>2.3.3.RELEASE</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100244 <executions>
245 <execution>
246 <goals>
247 <goal>build-info</goal>
248 <goal>repackage</goal>
249 </goals>
250 </execution>
251 </executions>
252 </plugin>
253 <plugin>
254 <groupId>org.codehaus.gmavenplus</groupId>
255 <artifactId>gmavenplus-plugin</artifactId>
256 <executions>
257 <execution>
258 <goals>
259 <goal>compileTests</goal>
260 </goals>
261 </execution>
262 </executions>
263 </plugin>
264 <plugin>
265 <groupId>org.apache.maven.plugins</groupId>
266 <artifactId>maven-surefire-plugin</artifactId>
267 <configuration>
268 <argLine>${surefireArgLine}</argLine>
269 <includes>
270 <include>**/*Spec.java</include>
271 </includes>
272 <excludes>
273 <exclude>**/IT*.java</exclude>
274 </excludes>
275 </configuration>
276 </plugin>
shivasubedi55500c32021-06-23 16:31:02 +0100277 <plugin>
278 <groupId>org.apache.maven.plugins</groupId>
279 <artifactId>maven-checkstyle-plugin</artifactId>
280 <executions>
281 <execution>
Bruno Sakotoff5f74d2021-07-14 11:15:48 -0400282 <id>onap-license</id>
283 <goals>
284 <goal>check</goal>
285 </goals>
286 <phase>process-sources</phase>
287 <configuration>
288 <configLocation>onap-checkstyle/check-license.xml</configLocation>
289 <includeResources>false</includeResources>
290 <includeTestSourceDirectory>true</includeTestSourceDirectory>
291 <includeTestResources>false</includeTestResources>
292 <sourceDirectories>
293 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
294 </sourceDirectories>
295 <consoleOutput>false</consoleOutput>
296 <violationSeverity>warning</violationSeverity>
297 <failOnViolation>true</failOnViolation>
298 </configuration>
299 </execution>
300 <execution>
301 <id>onap-java-style</id>
302 <goals>
303 <goal>check</goal>
304 </goals>
305 <phase>process-sources</phase>
306 <configuration>
307 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
308 <sourceDirectories>
309 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
310 </sourceDirectories>
311 <includeResources>true</includeResources>
312 <includeTestSourceDirectory>true</includeTestSourceDirectory>
313 <includeTestResources>true</includeTestResources>
314 <consoleOutput>false</consoleOutput>
315 <violationSeverity>warning</violationSeverity>
316 <failOnViolation>true</failOnViolation>
317 </configuration>
318 </execution>
319 <execution>
shivasubedi55500c32021-06-23 16:31:02 +0100320 <id>cps-java-style</id>
321 <goals>
322 <goal>check</goal>
323 </goals>
324 <phase>process-sources</phase>
325 <configuration>
326 <configLocation>cps-java-style.xml</configLocation>
327 <sourceDirectories>
328 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
329 </sourceDirectories>
330 <includeResources>true</includeResources>
331 <includeTestSourceDirectory>true</includeTestSourceDirectory>
332 <includeTestResources>true</includeTestResources>
333 <consoleOutput>true</consoleOutput>
334 <violationSeverity>warning</violationSeverity>
335 <failOnViolation>true</failOnViolation>
336 </configuration>
337 </execution>
338 </executions>
339 <dependencies>
340 <dependency>
341 <groupId>${project.groupId}</groupId>
342 <artifactId>checkstyle</artifactId>
343 <version>${cps.version}</version>
344 </dependency>
345 </dependencies>
346 </plugin>
347 <plugin>
348 <groupId>com.github.spotbugs</groupId>
349 <artifactId>spotbugs-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100350 <version>4.1.3</version>
shivasubedi55500c32021-06-23 16:31:02 +0100351 <executions>
352 <execution>
353 <id>analyze-compile</id>
354 <phase>compile</phase>
355 <goals>
356 <goal>check</goal>
357 </goals>
358 </execution>
359 </executions>
360 <dependencies>
361 <dependency>
362 <groupId>${project.groupId}</groupId>
363 <artifactId>spotbugs</artifactId>
364 <version>${cps.version}</version>
365 <scope>compile</scope>
366 </dependency>
367 </dependencies>
368 <configuration>
369 <plugins>
370 <plugin>
371 <groupId>jp.skypencil.findbugs.slf4j</groupId>
372 <artifactId>bug-pattern</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100373 <version>1.5.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100374 </plugin>
375 </plugins>
376 <effort>Max</effort>
377 <threshold>Low</threshold>
378 <failOnError>true</failOnError>
379 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
niamhcore4f431882021-09-21 16:08:29 +0100380 <addSourceDirs>true</addSourceDirs>
shivasubedi55500c32021-06-23 16:31:02 +0100381 <xmlOutput>true</xmlOutput>
382 <xmlOutputDirectory>${basedir}/target/spotbugs</xmlOutputDirectory>
383 </configuration>
384 </plugin>
385 <plugin>
386 <groupId>org.jacoco</groupId>
387 <artifactId>jacoco-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100388 <version>0.8.5</version>
shivasubedi55500c32021-06-23 16:31:02 +0100389 <configuration>
390 <excludes>
tragait7c4a9aa2021-07-19 13:46:37 +0100391 <exclude>org/onap/cps/ncmp/dmi/model/*</exclude>
shivasubedi55500c32021-06-23 16:31:02 +0100392 </excludes>
393 </configuration>
394 <executions>
395 <execution>
396 <id>default-prepare-agent</id>
397 <goals>
398 <goal>prepare-agent</goal>
399 </goals>
400 </execution>
401 <execution>
402 <id>coverage-check</id>
403 <goals>
404 <goal>check</goal>
405 </goals>
406 <configuration>
407 <dataFile>${basedir}/target/code-coverage/jacoco-ut.exec</dataFile>
408 <rules>
409 <rule>
410 <element>BUNDLE</element>
411 <limits>
412 <limit>
413 <counter>INSTRUCTION</counter>
414 <value>COVEREDRATIO</value>
415 <minimum>${jacoco.minimum.coverage}</minimum>
416 </limit>
417 </limits>
418 </rule>
419 </rules>
420 </configuration>
421 </execution>
422 <execution>
423 <id>report</id>
424 <phase>verify</phase>
425 <goals>
426 <goal>report-aggregate</goal>
427 </goals>
428 <configuration>
429 <dataFileIncludes>
430 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
431 </dataFileIncludes>
432 </configuration>
433 </execution>
434 </executions>
435 </plugin>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100436 </plugins>
shivasubedif4b36ef2021-06-23 16:01:10 +0100437 <pluginManagement>
438 <plugins>
439 <plugin>
440 <groupId>com.google.cloud.tools</groupId>
441 <artifactId>jib-maven-plugin</artifactId>
niamhcore2fb3f662021-09-29 15:32:32 +0100442 <version>3.1.4</version>
shivasubedif4b36ef2021-06-23 16:01:10 +0100443 <configuration>
444 <container>
445 <mainClass>${app}</mainClass>
446 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
447 </container>
448 <from>
449 <image>${base.image}</image>
450 </from>
451 <to>
452 <tags>
JosephKeenan371ec2f2021-12-01 09:46:58 +0000453 <tag>${project.version}-latest</tag>
shivasubedif4b36ef2021-06-23 16:01:10 +0100454 </tags>
455 <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image>
456 </to>
457 </configuration>
458 <executions>
459 <execution>
460 <phase>package</phase>
461 <id>build</id>
462 <goals>
463 <goal>dockerBuild</goal>
464 </goals>
465 </execution>
466 <execution>
467 <phase>deploy</phase>
468 <id>buildAndPush</id>
469 <goals>
470 <goal>build</goal>
471 </goals>
472 </execution>
473 </executions>
474 </plugin>
475 </plugins>
476 </pluginManagement>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100477 </build>
shivasubedif4b36ef2021-06-23 16:01:10 +0100478 <profiles>
479 <profile>
puthuparambil.adityaeddb3dd2021-07-27 15:57:19 +0100480 <id>docker</id>
shivasubedif4b36ef2021-06-23 16:01:10 +0100481 <activation>
482 <activeByDefault>true</activeByDefault>
483 </activation>
484 <properties>
485 <image.name>ncmp-dmi-plugin</image.name>
486 </properties>
487 <build>
488 <plugins>
489 <plugin>
490 <groupId>com.google.cloud.tools</groupId>
491 <artifactId>jib-maven-plugin</artifactId>
492 </plugin>
493 </plugins>
494 </build>
495 </profile>
496 </profiles>
lukegleesonb208aeb2021-07-08 16:48:15 +0100497</project>