blob: cc74f4c814a54fec1d88077884ffd2064a060814 [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>
65 </dependencies>
66 </dependencyManagement>
DylanB95ESTb5a23832021-06-02 19:45:46 +010067 <dependencies>
68 <dependency>
69 <groupId>org.springframework.boot</groupId>
70 <artifactId>spring-boot-starter-web</artifactId>
71 </dependency>
72 <dependency>
73 <groupId>org.springframework.boot</groupId>
74 <artifactId>spring-boot-starter-validation</artifactId>
75 </dependency>
76 <dependency>
77 <groupId>org.codehaus.groovy</groupId>
78 <artifactId>groovy</artifactId>
DylanB95ESTb5a23832021-06-02 19:45:46 +010079 </dependency>
80 <dependency>
Renu Kumari306cadd2021-10-22 00:50:29 -040081 <groupId>com.jayway.jsonpath</groupId>
82 <artifactId>json-path</artifactId>
83 </dependency>
84 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +010085 <groupId>org.springframework.boot</groupId>
86 <artifactId>spring-boot-starter-test</artifactId>
87 <scope>test</scope>
88 <exclusions>
89 <exclusion>
90 <groupId>org.junit.vintage</groupId>
91 <artifactId>junit-vintage-engine</artifactId>
92 </exclusion>
93 </exclusions>
94 </dependency>
95 <dependency>
puthuparambil.aditya1d902262021-11-23 14:53:43 +000096 <groupId>org.springdoc</groupId>
97 <artifactId>springdoc-openapi-ui</artifactId>
98 <version>1.5.9</version>
99 </dependency>
100 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100101 <groupId>org.spockframework</groupId>
102 <artifactId>spock-core</artifactId>
103 <scope>test</scope>
104 </dependency>
105 <dependency>
106 <groupId>org.spockframework</groupId>
107 <artifactId>spock-spring</artifactId>
108 <scope>test</scope>
109 </dependency>
110 <dependency>
Renu Kumari306cadd2021-10-22 00:50:29 -0400111 <groupId>org.springframework.security</groupId>
112 <artifactId>spring-security-test</artifactId>
113 <scope>test</scope>
114 </dependency>
115 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100116 <groupId>io.swagger</groupId>
117 <artifactId>swagger-annotations</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100118 <version>1.6.2</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100119 </dependency>
shivasubedi55500c32021-06-23 16:31:02 +0100120 <dependency>
121 <groupId>io.springfox</groupId>
122 <artifactId>springfox-boot-starter</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100123 <version>3.0.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100124 </dependency>
125 <dependency>
126 <groupId>org.springframework.boot</groupId>
127 <artifactId>spring-boot-starter-security</artifactId>
128 </dependency>
129 <dependency>
130 <groupId>org.springframework.boot</groupId>
131 <artifactId>spring-boot-starter-actuator</artifactId>
132 </dependency>
puthuparambil.aditya08fe9712021-07-13 11:52:13 +0100133 <dependency>
niamhcore71a61bb2021-07-06 10:32:17 +0100134 <groupId>org.projectlombok</groupId>
135 <artifactId>lombok</artifactId>
136 </dependency>
137 <dependency>
puthuparambil.aditya08fe9712021-07-13 11:52:13 +0100138 <groupId>io.micrometer</groupId>
139 <artifactId>micrometer-registry-prometheus</artifactId>
140 </dependency>
niamhcore3139ece2021-07-30 16:25:16 +0100141 <dependency>
142 <groupId>net.minidev</groupId>
143 <artifactId>json-smart</artifactId>
144 </dependency>
niamhcore6d7e3042021-08-30 09:31:53 +0100145 <dependency>
146 <groupId>com.google.code.gson</groupId>
147 <artifactId>gson</artifactId>
148 </dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100149 </dependencies>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100150 <build>
151 <resources>
152 <resource>
153 <directory>src/main/resources</directory>
154 <filtering>true</filtering>
155 </resource>
156 <resource>
157 <directory>target/generated-sources/license</directory>
158 <includes>
159 <include>third-party-licenses.txt</include>
160 </includes>
161 </resource>
162 <resource>
163 <directory>target/generated-resources/licenses</directory>
164 <includes>
165 <include>*.*</include>
166 </includes>
167 <targetPath>third-party-licenses</targetPath>
168 </resource>
169 </resources>
170 <plugins>
171 <plugin>
172 <groupId>io.swagger.codegen.v3</groupId>
173 <artifactId>swagger-codegen-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100174 <version>3.0.18</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100175 <executions>
176 <execution>
177 <goals>
178 <goal>generate</goal>
179 </goals>
180 <configuration>
Renu Kumari3aea57e2021-10-12 13:41:01 -0400181 <inputSpec>${project.basedir}/openapi/openapi.yml</inputSpec>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100182 <language>spring</language>
183 <generateSupportingFiles>false</generateSupportingFiles>
tragait7c4a9aa2021-07-19 13:46:37 +0100184 <apiPackage>org.onap.cps.ncmp.dmi.rest.api</apiPackage>
185 <modelPackage>org.onap.cps.ncmp.dmi.model</modelPackage>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100186 <configOptions>
187 <sourceFolder>src/gen/java</sourceFolder>
188 <dateLibrary>java11</dateLibrary>
189 <interfaceOnly>true</interfaceOnly>
190 <useTags>true</useTags>
191 </configOptions>
192 </configuration>
193 </execution>
shivasubedi3d1579c2021-09-13 16:43:20 +0100194 <execution>
195 <id>openapi-yaml-gen</id>
196 <goals>
197 <goal>generate</goal>
198 </goals>
199 <phase>compile</phase>
200 <configuration>
Renu Kumari3aea57e2021-10-12 13:41:01 -0400201 <inputSpec>${project.basedir}/openapi/openapi.yml</inputSpec>
shivasubedi3d1579c2021-09-13 16:43:20 +0100202 <language>openapi-yaml</language>
203 </configuration>
204 </execution>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100205 </executions>
206 </plugin>
207 <plugin>
puthuparambil.aditya1d902262021-11-23 14:53:43 +0000208 <artifactId>maven-resources-plugin</artifactId>
209 <executions>
210 <execution>
211 <id>copy-resources</id>
212 <phase>compile</phase>
213 <goals>
214 <goal>copy-resources</goal>
215 </goals>
216 <configuration>
217 <outputDirectory>${project.basedir}/target/classes/static/api-docs</outputDirectory>
218 <resources>
219 <resource>
220 <directory>${project.basedir}/target/generated-sources/swagger/</directory>
221 <includes>
222 <include>openapi.yaml</include>
223 </includes>
224 </resource>
225 </resources>
226 </configuration>
227 </execution>
228 </executions>
229 </plugin>
230 <plugin>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100231 <groupId>org.springframework.boot</groupId>
232 <artifactId>spring-boot-maven-plugin</artifactId>
shivasubedi7e340a82021-08-20 12:10:10 +0100233 <version>2.3.3.RELEASE</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100234 <executions>
235 <execution>
236 <goals>
237 <goal>build-info</goal>
238 <goal>repackage</goal>
239 </goals>
240 </execution>
241 </executions>
242 </plugin>
243 <plugin>
244 <groupId>org.codehaus.gmavenplus</groupId>
245 <artifactId>gmavenplus-plugin</artifactId>
246 <executions>
247 <execution>
248 <goals>
249 <goal>compileTests</goal>
250 </goals>
251 </execution>
252 </executions>
253 </plugin>
254 <plugin>
255 <groupId>org.apache.maven.plugins</groupId>
256 <artifactId>maven-surefire-plugin</artifactId>
257 <configuration>
258 <argLine>${surefireArgLine}</argLine>
259 <includes>
260 <include>**/*Spec.java</include>
261 </includes>
262 <excludes>
263 <exclude>**/IT*.java</exclude>
264 </excludes>
265 </configuration>
266 </plugin>
shivasubedi55500c32021-06-23 16:31:02 +0100267 <plugin>
268 <groupId>org.apache.maven.plugins</groupId>
269 <artifactId>maven-checkstyle-plugin</artifactId>
270 <executions>
271 <execution>
Bruno Sakotoff5f74d2021-07-14 11:15:48 -0400272 <id>onap-license</id>
273 <goals>
274 <goal>check</goal>
275 </goals>
276 <phase>process-sources</phase>
277 <configuration>
278 <configLocation>onap-checkstyle/check-license.xml</configLocation>
279 <includeResources>false</includeResources>
280 <includeTestSourceDirectory>true</includeTestSourceDirectory>
281 <includeTestResources>false</includeTestResources>
282 <sourceDirectories>
283 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
284 </sourceDirectories>
285 <consoleOutput>false</consoleOutput>
286 <violationSeverity>warning</violationSeverity>
287 <failOnViolation>true</failOnViolation>
288 </configuration>
289 </execution>
290 <execution>
291 <id>onap-java-style</id>
292 <goals>
293 <goal>check</goal>
294 </goals>
295 <phase>process-sources</phase>
296 <configuration>
297 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
298 <sourceDirectories>
299 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
300 </sourceDirectories>
301 <includeResources>true</includeResources>
302 <includeTestSourceDirectory>true</includeTestSourceDirectory>
303 <includeTestResources>true</includeTestResources>
304 <consoleOutput>false</consoleOutput>
305 <violationSeverity>warning</violationSeverity>
306 <failOnViolation>true</failOnViolation>
307 </configuration>
308 </execution>
309 <execution>
shivasubedi55500c32021-06-23 16:31:02 +0100310 <id>cps-java-style</id>
311 <goals>
312 <goal>check</goal>
313 </goals>
314 <phase>process-sources</phase>
315 <configuration>
316 <configLocation>cps-java-style.xml</configLocation>
317 <sourceDirectories>
318 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
319 </sourceDirectories>
320 <includeResources>true</includeResources>
321 <includeTestSourceDirectory>true</includeTestSourceDirectory>
322 <includeTestResources>true</includeTestResources>
323 <consoleOutput>true</consoleOutput>
324 <violationSeverity>warning</violationSeverity>
325 <failOnViolation>true</failOnViolation>
326 </configuration>
327 </execution>
328 </executions>
329 <dependencies>
330 <dependency>
331 <groupId>${project.groupId}</groupId>
332 <artifactId>checkstyle</artifactId>
333 <version>${cps.version}</version>
334 </dependency>
335 </dependencies>
336 </plugin>
337 <plugin>
338 <groupId>com.github.spotbugs</groupId>
339 <artifactId>spotbugs-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100340 <version>4.1.3</version>
shivasubedi55500c32021-06-23 16:31:02 +0100341 <executions>
342 <execution>
343 <id>analyze-compile</id>
344 <phase>compile</phase>
345 <goals>
346 <goal>check</goal>
347 </goals>
348 </execution>
349 </executions>
350 <dependencies>
351 <dependency>
352 <groupId>${project.groupId}</groupId>
353 <artifactId>spotbugs</artifactId>
354 <version>${cps.version}</version>
355 <scope>compile</scope>
356 </dependency>
357 </dependencies>
358 <configuration>
359 <plugins>
360 <plugin>
361 <groupId>jp.skypencil.findbugs.slf4j</groupId>
362 <artifactId>bug-pattern</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100363 <version>1.5.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100364 </plugin>
365 </plugins>
366 <effort>Max</effort>
367 <threshold>Low</threshold>
368 <failOnError>true</failOnError>
369 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
niamhcore4f431882021-09-21 16:08:29 +0100370 <addSourceDirs>true</addSourceDirs>
shivasubedi55500c32021-06-23 16:31:02 +0100371 <xmlOutput>true</xmlOutput>
372 <xmlOutputDirectory>${basedir}/target/spotbugs</xmlOutputDirectory>
373 </configuration>
374 </plugin>
375 <plugin>
376 <groupId>org.jacoco</groupId>
377 <artifactId>jacoco-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100378 <version>0.8.5</version>
shivasubedi55500c32021-06-23 16:31:02 +0100379 <configuration>
380 <excludes>
tragait7c4a9aa2021-07-19 13:46:37 +0100381 <exclude>org/onap/cps/ncmp/dmi/model/*</exclude>
shivasubedi55500c32021-06-23 16:31:02 +0100382 </excludes>
383 </configuration>
384 <executions>
385 <execution>
386 <id>default-prepare-agent</id>
387 <goals>
388 <goal>prepare-agent</goal>
389 </goals>
390 </execution>
391 <execution>
392 <id>coverage-check</id>
393 <goals>
394 <goal>check</goal>
395 </goals>
396 <configuration>
397 <dataFile>${basedir}/target/code-coverage/jacoco-ut.exec</dataFile>
398 <rules>
399 <rule>
400 <element>BUNDLE</element>
401 <limits>
402 <limit>
403 <counter>INSTRUCTION</counter>
404 <value>COVEREDRATIO</value>
405 <minimum>${jacoco.minimum.coverage}</minimum>
406 </limit>
407 </limits>
408 </rule>
409 </rules>
410 </configuration>
411 </execution>
412 <execution>
413 <id>report</id>
414 <phase>verify</phase>
415 <goals>
416 <goal>report-aggregate</goal>
417 </goals>
418 <configuration>
419 <dataFileIncludes>
420 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
421 </dataFileIncludes>
422 </configuration>
423 </execution>
424 </executions>
425 </plugin>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100426 </plugins>
shivasubedif4b36ef2021-06-23 16:01:10 +0100427 <pluginManagement>
428 <plugins>
429 <plugin>
430 <groupId>com.google.cloud.tools</groupId>
431 <artifactId>jib-maven-plugin</artifactId>
niamhcore2fb3f662021-09-29 15:32:32 +0100432 <version>3.1.4</version>
shivasubedif4b36ef2021-06-23 16:01:10 +0100433 <configuration>
434 <container>
435 <mainClass>${app}</mainClass>
436 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
437 </container>
438 <from>
439 <image>${base.image}</image>
440 </from>
441 <to>
442 <tags>
443 <tag>latest</tag>
444 </tags>
445 <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image>
446 </to>
447 </configuration>
448 <executions>
449 <execution>
450 <phase>package</phase>
451 <id>build</id>
452 <goals>
453 <goal>dockerBuild</goal>
454 </goals>
455 </execution>
456 <execution>
457 <phase>deploy</phase>
458 <id>buildAndPush</id>
459 <goals>
460 <goal>build</goal>
461 </goals>
462 </execution>
463 </executions>
464 </plugin>
465 </plugins>
466 </pluginManagement>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100467 </build>
shivasubedif4b36ef2021-06-23 16:01:10 +0100468 <profiles>
469 <profile>
puthuparambil.adityaeddb3dd2021-07-27 15:57:19 +0100470 <id>docker</id>
shivasubedif4b36ef2021-06-23 16:01:10 +0100471 <activation>
472 <activeByDefault>true</activeByDefault>
473 </activation>
474 <properties>
475 <image.name>ncmp-dmi-plugin</image.name>
476 </properties>
477 <build>
478 <plugins>
479 <plugin>
480 <groupId>com.google.cloud.tools</groupId>
481 <artifactId>jib-maven-plugin</artifactId>
482 </plugin>
483 </plugins>
484 </build>
485 </profile>
486 </profiles>
lukegleesonb208aeb2021-07-08 16:48:15 +0100487</project>