blob: 4fb6b1670805d86361676fb3a3b8f0d7c8d89e1f [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>
Bruno Sakoto0f6e8272021-09-14 10:53:08 -040037 <version>1.0.1-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>
shivasubedi275c1dc2021-07-07 16:39:34 +010054 <version>2.5.0</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>
81 <groupId>org.springframework.boot</groupId>
82 <artifactId>spring-boot-starter-test</artifactId>
83 <scope>test</scope>
84 <exclusions>
85 <exclusion>
86 <groupId>org.junit.vintage</groupId>
87 <artifactId>junit-vintage-engine</artifactId>
88 </exclusion>
89 </exclusions>
90 </dependency>
91 <dependency>
92 <groupId>org.spockframework</groupId>
93 <artifactId>spock-core</artifactId>
94 <scope>test</scope>
95 </dependency>
96 <dependency>
97 <groupId>org.spockframework</groupId>
98 <artifactId>spock-spring</artifactId>
99 <scope>test</scope>
100 </dependency>
101 <dependency>
102 <groupId>io.swagger</groupId>
103 <artifactId>swagger-annotations</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100104 <version>1.6.2</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100105 </dependency>
shivasubedi55500c32021-06-23 16:31:02 +0100106 <dependency>
107 <groupId>io.springfox</groupId>
108 <artifactId>springfox-boot-starter</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100109 <version>3.0.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100110 </dependency>
111 <dependency>
112 <groupId>org.springframework.boot</groupId>
113 <artifactId>spring-boot-starter-security</artifactId>
114 </dependency>
115 <dependency>
116 <groupId>org.springframework.boot</groupId>
117 <artifactId>spring-boot-starter-actuator</artifactId>
118 </dependency>
puthuparambil.aditya08fe9712021-07-13 11:52:13 +0100119 <dependency>
niamhcore71a61bb2021-07-06 10:32:17 +0100120 <groupId>org.projectlombok</groupId>
121 <artifactId>lombok</artifactId>
122 </dependency>
123 <dependency>
puthuparambil.aditya08fe9712021-07-13 11:52:13 +0100124 <groupId>io.micrometer</groupId>
125 <artifactId>micrometer-registry-prometheus</artifactId>
126 </dependency>
niamhcore3139ece2021-07-30 16:25:16 +0100127 <dependency>
128 <groupId>net.minidev</groupId>
129 <artifactId>json-smart</artifactId>
130 </dependency>
niamhcore6d7e3042021-08-30 09:31:53 +0100131 <dependency>
132 <groupId>com.google.code.gson</groupId>
133 <artifactId>gson</artifactId>
134 </dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100135 </dependencies>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100136 <build>
137 <resources>
138 <resource>
139 <directory>src/main/resources</directory>
140 <filtering>true</filtering>
141 </resource>
142 <resource>
143 <directory>target/generated-sources/license</directory>
144 <includes>
145 <include>third-party-licenses.txt</include>
146 </includes>
147 </resource>
148 <resource>
149 <directory>target/generated-resources/licenses</directory>
150 <includes>
151 <include>*.*</include>
152 </includes>
153 <targetPath>third-party-licenses</targetPath>
154 </resource>
155 </resources>
156 <plugins>
157 <plugin>
158 <groupId>io.swagger.codegen.v3</groupId>
159 <artifactId>swagger-codegen-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100160 <version>3.0.18</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100161 <executions>
162 <execution>
163 <goals>
164 <goal>generate</goal>
165 </goals>
166 <configuration>
167 <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
168 <language>spring</language>
169 <generateSupportingFiles>false</generateSupportingFiles>
tragait7c4a9aa2021-07-19 13:46:37 +0100170 <apiPackage>org.onap.cps.ncmp.dmi.rest.api</apiPackage>
171 <modelPackage>org.onap.cps.ncmp.dmi.model</modelPackage>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100172 <configOptions>
173 <sourceFolder>src/gen/java</sourceFolder>
174 <dateLibrary>java11</dateLibrary>
175 <interfaceOnly>true</interfaceOnly>
176 <useTags>true</useTags>
177 </configOptions>
178 </configuration>
179 </execution>
shivasubedi3d1579c2021-09-13 16:43:20 +0100180 <execution>
181 <id>openapi-yaml-gen</id>
182 <goals>
183 <goal>generate</goal>
184 </goals>
185 <phase>compile</phase>
186 <configuration>
187 <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
188 <language>openapi-yaml</language>
189 </configuration>
190 </execution>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100191 </executions>
192 </plugin>
193 <plugin>
194 <groupId>org.springframework.boot</groupId>
195 <artifactId>spring-boot-maven-plugin</artifactId>
shivasubedi7e340a82021-08-20 12:10:10 +0100196 <version>2.3.3.RELEASE</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100197 <executions>
198 <execution>
199 <goals>
200 <goal>build-info</goal>
201 <goal>repackage</goal>
202 </goals>
203 </execution>
204 </executions>
205 </plugin>
206 <plugin>
207 <groupId>org.codehaus.gmavenplus</groupId>
208 <artifactId>gmavenplus-plugin</artifactId>
209 <executions>
210 <execution>
211 <goals>
212 <goal>compileTests</goal>
213 </goals>
214 </execution>
215 </executions>
216 </plugin>
217 <plugin>
218 <groupId>org.apache.maven.plugins</groupId>
219 <artifactId>maven-surefire-plugin</artifactId>
220 <configuration>
221 <argLine>${surefireArgLine}</argLine>
222 <includes>
223 <include>**/*Spec.java</include>
224 </includes>
225 <excludes>
226 <exclude>**/IT*.java</exclude>
227 </excludes>
228 </configuration>
229 </plugin>
shivasubedi55500c32021-06-23 16:31:02 +0100230 <plugin>
231 <groupId>org.apache.maven.plugins</groupId>
232 <artifactId>maven-checkstyle-plugin</artifactId>
233 <executions>
234 <execution>
Bruno Sakotoff5f74d2021-07-14 11:15:48 -0400235 <id>onap-license</id>
236 <goals>
237 <goal>check</goal>
238 </goals>
239 <phase>process-sources</phase>
240 <configuration>
241 <configLocation>onap-checkstyle/check-license.xml</configLocation>
242 <includeResources>false</includeResources>
243 <includeTestSourceDirectory>true</includeTestSourceDirectory>
244 <includeTestResources>false</includeTestResources>
245 <sourceDirectories>
246 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
247 </sourceDirectories>
248 <consoleOutput>false</consoleOutput>
249 <violationSeverity>warning</violationSeverity>
250 <failOnViolation>true</failOnViolation>
251 </configuration>
252 </execution>
253 <execution>
254 <id>onap-java-style</id>
255 <goals>
256 <goal>check</goal>
257 </goals>
258 <phase>process-sources</phase>
259 <configuration>
260 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
261 <sourceDirectories>
262 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
263 </sourceDirectories>
264 <includeResources>true</includeResources>
265 <includeTestSourceDirectory>true</includeTestSourceDirectory>
266 <includeTestResources>true</includeTestResources>
267 <consoleOutput>false</consoleOutput>
268 <violationSeverity>warning</violationSeverity>
269 <failOnViolation>true</failOnViolation>
270 </configuration>
271 </execution>
272 <execution>
shivasubedi55500c32021-06-23 16:31:02 +0100273 <id>cps-java-style</id>
274 <goals>
275 <goal>check</goal>
276 </goals>
277 <phase>process-sources</phase>
278 <configuration>
279 <configLocation>cps-java-style.xml</configLocation>
280 <sourceDirectories>
281 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
282 </sourceDirectories>
283 <includeResources>true</includeResources>
284 <includeTestSourceDirectory>true</includeTestSourceDirectory>
285 <includeTestResources>true</includeTestResources>
286 <consoleOutput>true</consoleOutput>
287 <violationSeverity>warning</violationSeverity>
288 <failOnViolation>true</failOnViolation>
289 </configuration>
290 </execution>
291 </executions>
292 <dependencies>
293 <dependency>
294 <groupId>${project.groupId}</groupId>
295 <artifactId>checkstyle</artifactId>
296 <version>${cps.version}</version>
297 </dependency>
298 </dependencies>
299 </plugin>
300 <plugin>
301 <groupId>com.github.spotbugs</groupId>
302 <artifactId>spotbugs-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100303 <version>4.1.3</version>
shivasubedi55500c32021-06-23 16:31:02 +0100304 <executions>
305 <execution>
306 <id>analyze-compile</id>
307 <phase>compile</phase>
308 <goals>
309 <goal>check</goal>
310 </goals>
311 </execution>
312 </executions>
313 <dependencies>
314 <dependency>
315 <groupId>${project.groupId}</groupId>
316 <artifactId>spotbugs</artifactId>
317 <version>${cps.version}</version>
318 <scope>compile</scope>
319 </dependency>
320 </dependencies>
321 <configuration>
322 <plugins>
323 <plugin>
324 <groupId>jp.skypencil.findbugs.slf4j</groupId>
325 <artifactId>bug-pattern</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100326 <version>1.5.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100327 </plugin>
328 </plugins>
329 <effort>Max</effort>
330 <threshold>Low</threshold>
331 <failOnError>true</failOnError>
332 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
niamhcore4f431882021-09-21 16:08:29 +0100333 <addSourceDirs>true</addSourceDirs>
shivasubedi55500c32021-06-23 16:31:02 +0100334 <xmlOutput>true</xmlOutput>
335 <xmlOutputDirectory>${basedir}/target/spotbugs</xmlOutputDirectory>
336 </configuration>
337 </plugin>
338 <plugin>
339 <groupId>org.jacoco</groupId>
340 <artifactId>jacoco-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100341 <version>0.8.5</version>
shivasubedi55500c32021-06-23 16:31:02 +0100342 <configuration>
343 <excludes>
tragait7c4a9aa2021-07-19 13:46:37 +0100344 <exclude>org/onap/cps/ncmp/dmi/model/*</exclude>
shivasubedi55500c32021-06-23 16:31:02 +0100345 </excludes>
346 </configuration>
347 <executions>
348 <execution>
349 <id>default-prepare-agent</id>
350 <goals>
351 <goal>prepare-agent</goal>
352 </goals>
353 </execution>
354 <execution>
355 <id>coverage-check</id>
356 <goals>
357 <goal>check</goal>
358 </goals>
359 <configuration>
360 <dataFile>${basedir}/target/code-coverage/jacoco-ut.exec</dataFile>
361 <rules>
362 <rule>
363 <element>BUNDLE</element>
364 <limits>
365 <limit>
366 <counter>INSTRUCTION</counter>
367 <value>COVEREDRATIO</value>
368 <minimum>${jacoco.minimum.coverage}</minimum>
369 </limit>
370 </limits>
371 </rule>
372 </rules>
373 </configuration>
374 </execution>
375 <execution>
376 <id>report</id>
377 <phase>verify</phase>
378 <goals>
379 <goal>report-aggregate</goal>
380 </goals>
381 <configuration>
382 <dataFileIncludes>
383 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
384 </dataFileIncludes>
385 </configuration>
386 </execution>
387 </executions>
388 </plugin>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100389 </plugins>
shivasubedif4b36ef2021-06-23 16:01:10 +0100390 <pluginManagement>
391 <plugins>
392 <plugin>
393 <groupId>com.google.cloud.tools</groupId>
394 <artifactId>jib-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100395 <version>2.8.0</version>
shivasubedif4b36ef2021-06-23 16:01:10 +0100396 <configuration>
397 <container>
398 <mainClass>${app}</mainClass>
399 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
400 </container>
401 <from>
402 <image>${base.image}</image>
403 </from>
404 <to>
405 <tags>
406 <tag>latest</tag>
407 </tags>
408 <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image>
409 </to>
410 </configuration>
411 <executions>
412 <execution>
413 <phase>package</phase>
414 <id>build</id>
415 <goals>
416 <goal>dockerBuild</goal>
417 </goals>
418 </execution>
419 <execution>
420 <phase>deploy</phase>
421 <id>buildAndPush</id>
422 <goals>
423 <goal>build</goal>
424 </goals>
425 </execution>
426 </executions>
427 </plugin>
shivasubedi3d1579c2021-09-13 16:43:20 +0100428 <plugin>
429 <artifactId>maven-resources-plugin</artifactId>
430 <executions>
431 <execution>
432 <id>copy-resources</id>
433 <phase>compile</phase>
434 <goals>
435 <goal>copy-resources</goal>
436 </goals>
437 <configuration>
438 <outputDirectory>${project.basedir}/docs/openapi/</outputDirectory>
439 <resources>
440 <resource>
441 <directory>${project.basedir}/target/generated-sources/swagger/</directory>
442 <includes>
443 <include>openapi.yaml</include>
444 </includes>
445 </resource>
446 </resources>
447 </configuration>
448 </execution>
449 </executions>
450 </plugin>
shivasubedif4b36ef2021-06-23 16:01:10 +0100451 </plugins>
452 </pluginManagement>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100453 </build>
shivasubedif4b36ef2021-06-23 16:01:10 +0100454 <profiles>
455 <profile>
puthuparambil.adityaeddb3dd2021-07-27 15:57:19 +0100456 <id>docker</id>
shivasubedif4b36ef2021-06-23 16:01:10 +0100457 <activation>
458 <activeByDefault>true</activeByDefault>
459 </activation>
460 <properties>
461 <image.name>ncmp-dmi-plugin</image.name>
462 </properties>
463 <build>
464 <plugins>
465 <plugin>
466 <groupId>com.google.cloud.tools</groupId>
467 <artifactId>jib-maven-plugin</artifactId>
468 </plugin>
469 </plugins>
470 </build>
471 </profile>
472 </profiles>
lukegleesonb208aeb2021-07-08 16:48:15 +0100473</project>