blob: 552d30fa05390b110c2fbe974da3a75d13beded0 [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>
96 <groupId>org.spockframework</groupId>
97 <artifactId>spock-core</artifactId>
98 <scope>test</scope>
99 </dependency>
100 <dependency>
101 <groupId>org.spockframework</groupId>
102 <artifactId>spock-spring</artifactId>
103 <scope>test</scope>
104 </dependency>
105 <dependency>
Renu Kumari306cadd2021-10-22 00:50:29 -0400106 <groupId>org.springframework.security</groupId>
107 <artifactId>spring-security-test</artifactId>
108 <scope>test</scope>
109 </dependency>
110 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100111 <groupId>io.swagger</groupId>
112 <artifactId>swagger-annotations</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100113 <version>1.6.2</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100114 </dependency>
shivasubedi55500c32021-06-23 16:31:02 +0100115 <dependency>
116 <groupId>io.springfox</groupId>
117 <artifactId>springfox-boot-starter</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100118 <version>3.0.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100119 </dependency>
120 <dependency>
121 <groupId>org.springframework.boot</groupId>
122 <artifactId>spring-boot-starter-security</artifactId>
123 </dependency>
124 <dependency>
125 <groupId>org.springframework.boot</groupId>
126 <artifactId>spring-boot-starter-actuator</artifactId>
127 </dependency>
puthuparambil.aditya08fe9712021-07-13 11:52:13 +0100128 <dependency>
niamhcore71a61bb2021-07-06 10:32:17 +0100129 <groupId>org.projectlombok</groupId>
130 <artifactId>lombok</artifactId>
131 </dependency>
132 <dependency>
puthuparambil.aditya08fe9712021-07-13 11:52:13 +0100133 <groupId>io.micrometer</groupId>
134 <artifactId>micrometer-registry-prometheus</artifactId>
135 </dependency>
niamhcore3139ece2021-07-30 16:25:16 +0100136 <dependency>
137 <groupId>net.minidev</groupId>
138 <artifactId>json-smart</artifactId>
139 </dependency>
niamhcore6d7e3042021-08-30 09:31:53 +0100140 <dependency>
141 <groupId>com.google.code.gson</groupId>
142 <artifactId>gson</artifactId>
143 </dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100144 </dependencies>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100145 <build>
146 <resources>
147 <resource>
148 <directory>src/main/resources</directory>
149 <filtering>true</filtering>
150 </resource>
151 <resource>
152 <directory>target/generated-sources/license</directory>
153 <includes>
154 <include>third-party-licenses.txt</include>
155 </includes>
156 </resource>
157 <resource>
158 <directory>target/generated-resources/licenses</directory>
159 <includes>
160 <include>*.*</include>
161 </includes>
162 <targetPath>third-party-licenses</targetPath>
163 </resource>
164 </resources>
165 <plugins>
166 <plugin>
167 <groupId>io.swagger.codegen.v3</groupId>
168 <artifactId>swagger-codegen-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100169 <version>3.0.18</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100170 <executions>
171 <execution>
172 <goals>
173 <goal>generate</goal>
174 </goals>
175 <configuration>
Renu Kumari3aea57e2021-10-12 13:41:01 -0400176 <inputSpec>${project.basedir}/openapi/openapi.yml</inputSpec>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100177 <language>spring</language>
178 <generateSupportingFiles>false</generateSupportingFiles>
tragait7c4a9aa2021-07-19 13:46:37 +0100179 <apiPackage>org.onap.cps.ncmp.dmi.rest.api</apiPackage>
180 <modelPackage>org.onap.cps.ncmp.dmi.model</modelPackage>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100181 <configOptions>
182 <sourceFolder>src/gen/java</sourceFolder>
183 <dateLibrary>java11</dateLibrary>
184 <interfaceOnly>true</interfaceOnly>
185 <useTags>true</useTags>
186 </configOptions>
187 </configuration>
188 </execution>
shivasubedi3d1579c2021-09-13 16:43:20 +0100189 <execution>
190 <id>openapi-yaml-gen</id>
191 <goals>
192 <goal>generate</goal>
193 </goals>
194 <phase>compile</phase>
195 <configuration>
Renu Kumari3aea57e2021-10-12 13:41:01 -0400196 <inputSpec>${project.basedir}/openapi/openapi.yml</inputSpec>
shivasubedi3d1579c2021-09-13 16:43:20 +0100197 <language>openapi-yaml</language>
198 </configuration>
199 </execution>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100200 </executions>
201 </plugin>
202 <plugin>
203 <groupId>org.springframework.boot</groupId>
204 <artifactId>spring-boot-maven-plugin</artifactId>
shivasubedi7e340a82021-08-20 12:10:10 +0100205 <version>2.3.3.RELEASE</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100206 <executions>
207 <execution>
208 <goals>
209 <goal>build-info</goal>
210 <goal>repackage</goal>
211 </goals>
212 </execution>
213 </executions>
214 </plugin>
215 <plugin>
216 <groupId>org.codehaus.gmavenplus</groupId>
217 <artifactId>gmavenplus-plugin</artifactId>
218 <executions>
219 <execution>
220 <goals>
221 <goal>compileTests</goal>
222 </goals>
223 </execution>
224 </executions>
225 </plugin>
226 <plugin>
227 <groupId>org.apache.maven.plugins</groupId>
228 <artifactId>maven-surefire-plugin</artifactId>
229 <configuration>
230 <argLine>${surefireArgLine}</argLine>
231 <includes>
232 <include>**/*Spec.java</include>
233 </includes>
234 <excludes>
235 <exclude>**/IT*.java</exclude>
236 </excludes>
237 </configuration>
238 </plugin>
shivasubedi55500c32021-06-23 16:31:02 +0100239 <plugin>
240 <groupId>org.apache.maven.plugins</groupId>
241 <artifactId>maven-checkstyle-plugin</artifactId>
242 <executions>
243 <execution>
Bruno Sakotoff5f74d2021-07-14 11:15:48 -0400244 <id>onap-license</id>
245 <goals>
246 <goal>check</goal>
247 </goals>
248 <phase>process-sources</phase>
249 <configuration>
250 <configLocation>onap-checkstyle/check-license.xml</configLocation>
251 <includeResources>false</includeResources>
252 <includeTestSourceDirectory>true</includeTestSourceDirectory>
253 <includeTestResources>false</includeTestResources>
254 <sourceDirectories>
255 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
256 </sourceDirectories>
257 <consoleOutput>false</consoleOutput>
258 <violationSeverity>warning</violationSeverity>
259 <failOnViolation>true</failOnViolation>
260 </configuration>
261 </execution>
262 <execution>
263 <id>onap-java-style</id>
264 <goals>
265 <goal>check</goal>
266 </goals>
267 <phase>process-sources</phase>
268 <configuration>
269 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
270 <sourceDirectories>
271 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
272 </sourceDirectories>
273 <includeResources>true</includeResources>
274 <includeTestSourceDirectory>true</includeTestSourceDirectory>
275 <includeTestResources>true</includeTestResources>
276 <consoleOutput>false</consoleOutput>
277 <violationSeverity>warning</violationSeverity>
278 <failOnViolation>true</failOnViolation>
279 </configuration>
280 </execution>
281 <execution>
shivasubedi55500c32021-06-23 16:31:02 +0100282 <id>cps-java-style</id>
283 <goals>
284 <goal>check</goal>
285 </goals>
286 <phase>process-sources</phase>
287 <configuration>
288 <configLocation>cps-java-style.xml</configLocation>
289 <sourceDirectories>
290 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
291 </sourceDirectories>
292 <includeResources>true</includeResources>
293 <includeTestSourceDirectory>true</includeTestSourceDirectory>
294 <includeTestResources>true</includeTestResources>
295 <consoleOutput>true</consoleOutput>
296 <violationSeverity>warning</violationSeverity>
297 <failOnViolation>true</failOnViolation>
298 </configuration>
299 </execution>
300 </executions>
301 <dependencies>
302 <dependency>
303 <groupId>${project.groupId}</groupId>
304 <artifactId>checkstyle</artifactId>
305 <version>${cps.version}</version>
306 </dependency>
307 </dependencies>
308 </plugin>
309 <plugin>
310 <groupId>com.github.spotbugs</groupId>
311 <artifactId>spotbugs-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100312 <version>4.1.3</version>
shivasubedi55500c32021-06-23 16:31:02 +0100313 <executions>
314 <execution>
315 <id>analyze-compile</id>
316 <phase>compile</phase>
317 <goals>
318 <goal>check</goal>
319 </goals>
320 </execution>
321 </executions>
322 <dependencies>
323 <dependency>
324 <groupId>${project.groupId}</groupId>
325 <artifactId>spotbugs</artifactId>
326 <version>${cps.version}</version>
327 <scope>compile</scope>
328 </dependency>
329 </dependencies>
330 <configuration>
331 <plugins>
332 <plugin>
333 <groupId>jp.skypencil.findbugs.slf4j</groupId>
334 <artifactId>bug-pattern</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100335 <version>1.5.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100336 </plugin>
337 </plugins>
338 <effort>Max</effort>
339 <threshold>Low</threshold>
340 <failOnError>true</failOnError>
341 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
niamhcore4f431882021-09-21 16:08:29 +0100342 <addSourceDirs>true</addSourceDirs>
shivasubedi55500c32021-06-23 16:31:02 +0100343 <xmlOutput>true</xmlOutput>
344 <xmlOutputDirectory>${basedir}/target/spotbugs</xmlOutputDirectory>
345 </configuration>
346 </plugin>
347 <plugin>
348 <groupId>org.jacoco</groupId>
349 <artifactId>jacoco-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100350 <version>0.8.5</version>
shivasubedi55500c32021-06-23 16:31:02 +0100351 <configuration>
352 <excludes>
tragait7c4a9aa2021-07-19 13:46:37 +0100353 <exclude>org/onap/cps/ncmp/dmi/model/*</exclude>
shivasubedi55500c32021-06-23 16:31:02 +0100354 </excludes>
355 </configuration>
356 <executions>
357 <execution>
358 <id>default-prepare-agent</id>
359 <goals>
360 <goal>prepare-agent</goal>
361 </goals>
362 </execution>
363 <execution>
364 <id>coverage-check</id>
365 <goals>
366 <goal>check</goal>
367 </goals>
368 <configuration>
369 <dataFile>${basedir}/target/code-coverage/jacoco-ut.exec</dataFile>
370 <rules>
371 <rule>
372 <element>BUNDLE</element>
373 <limits>
374 <limit>
375 <counter>INSTRUCTION</counter>
376 <value>COVEREDRATIO</value>
377 <minimum>${jacoco.minimum.coverage}</minimum>
378 </limit>
379 </limits>
380 </rule>
381 </rules>
382 </configuration>
383 </execution>
384 <execution>
385 <id>report</id>
386 <phase>verify</phase>
387 <goals>
388 <goal>report-aggregate</goal>
389 </goals>
390 <configuration>
391 <dataFileIncludes>
392 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
393 </dataFileIncludes>
394 </configuration>
395 </execution>
396 </executions>
397 </plugin>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100398 </plugins>
shivasubedif4b36ef2021-06-23 16:01:10 +0100399 <pluginManagement>
400 <plugins>
401 <plugin>
402 <groupId>com.google.cloud.tools</groupId>
403 <artifactId>jib-maven-plugin</artifactId>
niamhcore2fb3f662021-09-29 15:32:32 +0100404 <version>3.1.4</version>
shivasubedif4b36ef2021-06-23 16:01:10 +0100405 <configuration>
406 <container>
407 <mainClass>${app}</mainClass>
408 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
409 </container>
410 <from>
411 <image>${base.image}</image>
412 </from>
413 <to>
414 <tags>
415 <tag>latest</tag>
416 </tags>
417 <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image>
418 </to>
419 </configuration>
420 <executions>
421 <execution>
422 <phase>package</phase>
423 <id>build</id>
424 <goals>
425 <goal>dockerBuild</goal>
426 </goals>
427 </execution>
428 <execution>
429 <phase>deploy</phase>
430 <id>buildAndPush</id>
431 <goals>
432 <goal>build</goal>
433 </goals>
434 </execution>
435 </executions>
436 </plugin>
437 </plugins>
438 </pluginManagement>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100439 </build>
shivasubedif4b36ef2021-06-23 16:01:10 +0100440 <profiles>
441 <profile>
puthuparambil.adityaeddb3dd2021-07-27 15:57:19 +0100442 <id>docker</id>
shivasubedif4b36ef2021-06-23 16:01:10 +0100443 <activation>
444 <activeByDefault>true</activeByDefault>
445 </activation>
446 <properties>
447 <image.name>ncmp-dmi-plugin</image.name>
448 </properties>
449 <build>
450 <plugins>
451 <plugin>
452 <groupId>com.google.cloud.tools</groupId>
453 <artifactId>jib-maven-plugin</artifactId>
454 </plugin>
455 </plugins>
456 </build>
457 </profile>
458 </profiles>
lukegleesonb208aeb2021-07-08 16:48:15 +0100459</project>