blob: ac00de88fdffae9a5730a444ad76c192841b0922 [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=========================================================
20-->
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>
37 <version>0.0.1-SNAPSHOT</version>
38 <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>
shivasubedi55500c32021-06-23 16:31:02 +010043 <cps.version>1.1.0-SNAPSHOT</cps.version>
shivasubedif4b36ef2021-06-23 16:01:10 +010044 <image.tag>${project.version}-${maven.build.timestamp}</image.tag>
shivasubedi55500c32021-06-23 16:31:02 +010045 <jacoco.minimum.coverage>0.7</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>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100131 </dependencies>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100132 <build>
133 <resources>
134 <resource>
135 <directory>src/main/resources</directory>
136 <filtering>true</filtering>
137 </resource>
138 <resource>
139 <directory>target/generated-sources/license</directory>
140 <includes>
141 <include>third-party-licenses.txt</include>
142 </includes>
143 </resource>
144 <resource>
145 <directory>target/generated-resources/licenses</directory>
146 <includes>
147 <include>*.*</include>
148 </includes>
149 <targetPath>third-party-licenses</targetPath>
150 </resource>
151 </resources>
152 <plugins>
153 <plugin>
154 <groupId>io.swagger.codegen.v3</groupId>
155 <artifactId>swagger-codegen-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100156 <version>3.0.18</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100157 <executions>
158 <execution>
159 <goals>
160 <goal>generate</goal>
161 </goals>
162 <configuration>
163 <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
164 <language>spring</language>
165 <generateSupportingFiles>false</generateSupportingFiles>
tragait7c4a9aa2021-07-19 13:46:37 +0100166 <apiPackage>org.onap.cps.ncmp.dmi.rest.api</apiPackage>
167 <modelPackage>org.onap.cps.ncmp.dmi.model</modelPackage>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100168 <configOptions>
169 <sourceFolder>src/gen/java</sourceFolder>
170 <dateLibrary>java11</dateLibrary>
171 <interfaceOnly>true</interfaceOnly>
172 <useTags>true</useTags>
173 </configOptions>
174 </configuration>
175 </execution>
176 </executions>
177 </plugin>
178 <plugin>
179 <groupId>org.springframework.boot</groupId>
180 <artifactId>spring-boot-maven-plugin</artifactId>
181 <executions>
182 <execution>
183 <goals>
184 <goal>build-info</goal>
185 <goal>repackage</goal>
186 </goals>
187 </execution>
188 </executions>
189 </plugin>
190 <plugin>
191 <groupId>org.codehaus.gmavenplus</groupId>
192 <artifactId>gmavenplus-plugin</artifactId>
193 <executions>
194 <execution>
195 <goals>
196 <goal>compileTests</goal>
197 </goals>
198 </execution>
199 </executions>
200 </plugin>
201 <plugin>
202 <groupId>org.apache.maven.plugins</groupId>
203 <artifactId>maven-surefire-plugin</artifactId>
204 <configuration>
205 <argLine>${surefireArgLine}</argLine>
206 <includes>
207 <include>**/*Spec.java</include>
208 </includes>
209 <excludes>
210 <exclude>**/IT*.java</exclude>
211 </excludes>
212 </configuration>
213 </plugin>
shivasubedi55500c32021-06-23 16:31:02 +0100214 <plugin>
215 <groupId>org.apache.maven.plugins</groupId>
216 <artifactId>maven-checkstyle-plugin</artifactId>
217 <executions>
218 <execution>
Bruno Sakotoff5f74d2021-07-14 11:15:48 -0400219 <id>onap-license</id>
220 <goals>
221 <goal>check</goal>
222 </goals>
223 <phase>process-sources</phase>
224 <configuration>
225 <configLocation>onap-checkstyle/check-license.xml</configLocation>
226 <includeResources>false</includeResources>
227 <includeTestSourceDirectory>true</includeTestSourceDirectory>
228 <includeTestResources>false</includeTestResources>
229 <sourceDirectories>
230 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
231 </sourceDirectories>
232 <consoleOutput>false</consoleOutput>
233 <violationSeverity>warning</violationSeverity>
234 <failOnViolation>true</failOnViolation>
235 </configuration>
236 </execution>
237 <execution>
238 <id>onap-java-style</id>
239 <goals>
240 <goal>check</goal>
241 </goals>
242 <phase>process-sources</phase>
243 <configuration>
244 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
245 <sourceDirectories>
246 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
247 </sourceDirectories>
248 <includeResources>true</includeResources>
249 <includeTestSourceDirectory>true</includeTestSourceDirectory>
250 <includeTestResources>true</includeTestResources>
251 <consoleOutput>false</consoleOutput>
252 <violationSeverity>warning</violationSeverity>
253 <failOnViolation>true</failOnViolation>
254 </configuration>
255 </execution>
256 <execution>
shivasubedi55500c32021-06-23 16:31:02 +0100257 <id>cps-java-style</id>
258 <goals>
259 <goal>check</goal>
260 </goals>
261 <phase>process-sources</phase>
262 <configuration>
263 <configLocation>cps-java-style.xml</configLocation>
264 <sourceDirectories>
265 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
266 </sourceDirectories>
267 <includeResources>true</includeResources>
268 <includeTestSourceDirectory>true</includeTestSourceDirectory>
269 <includeTestResources>true</includeTestResources>
270 <consoleOutput>true</consoleOutput>
271 <violationSeverity>warning</violationSeverity>
272 <failOnViolation>true</failOnViolation>
273 </configuration>
274 </execution>
275 </executions>
276 <dependencies>
277 <dependency>
278 <groupId>${project.groupId}</groupId>
279 <artifactId>checkstyle</artifactId>
280 <version>${cps.version}</version>
281 </dependency>
282 </dependencies>
283 </plugin>
284 <plugin>
285 <groupId>com.github.spotbugs</groupId>
286 <artifactId>spotbugs-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100287 <version>4.1.3</version>
shivasubedi55500c32021-06-23 16:31:02 +0100288 <executions>
289 <execution>
290 <id>analyze-compile</id>
291 <phase>compile</phase>
292 <goals>
293 <goal>check</goal>
294 </goals>
295 </execution>
296 </executions>
297 <dependencies>
298 <dependency>
299 <groupId>${project.groupId}</groupId>
300 <artifactId>spotbugs</artifactId>
301 <version>${cps.version}</version>
302 <scope>compile</scope>
303 </dependency>
304 </dependencies>
305 <configuration>
306 <plugins>
307 <plugin>
308 <groupId>jp.skypencil.findbugs.slf4j</groupId>
309 <artifactId>bug-pattern</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100310 <version>1.5.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100311 </plugin>
312 </plugins>
313 <effort>Max</effort>
314 <threshold>Low</threshold>
315 <failOnError>true</failOnError>
316 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
317 <xmlOutput>true</xmlOutput>
318 <xmlOutputDirectory>${basedir}/target/spotbugs</xmlOutputDirectory>
319 </configuration>
320 </plugin>
321 <plugin>
322 <groupId>org.jacoco</groupId>
323 <artifactId>jacoco-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100324 <version>0.8.5</version>
shivasubedi55500c32021-06-23 16:31:02 +0100325 <configuration>
326 <excludes>
tragait7c4a9aa2021-07-19 13:46:37 +0100327 <exclude>org/onap/cps/ncmp/dmi/model/*</exclude>
328 <exclude>org/onap/cps/ncmp/dmi/config/*</exclude>
shivasubedi55500c32021-06-23 16:31:02 +0100329 </excludes>
330 </configuration>
331 <executions>
332 <execution>
333 <id>default-prepare-agent</id>
334 <goals>
335 <goal>prepare-agent</goal>
336 </goals>
337 </execution>
338 <execution>
339 <id>coverage-check</id>
340 <goals>
341 <goal>check</goal>
342 </goals>
343 <configuration>
344 <dataFile>${basedir}/target/code-coverage/jacoco-ut.exec</dataFile>
345 <rules>
346 <rule>
347 <element>BUNDLE</element>
348 <limits>
349 <limit>
350 <counter>INSTRUCTION</counter>
351 <value>COVEREDRATIO</value>
352 <minimum>${jacoco.minimum.coverage}</minimum>
353 </limit>
354 </limits>
355 </rule>
356 </rules>
357 </configuration>
358 </execution>
359 <execution>
360 <id>report</id>
361 <phase>verify</phase>
362 <goals>
363 <goal>report-aggregate</goal>
364 </goals>
365 <configuration>
366 <dataFileIncludes>
367 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
368 </dataFileIncludes>
369 </configuration>
370 </execution>
371 </executions>
372 </plugin>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100373 </plugins>
shivasubedif4b36ef2021-06-23 16:01:10 +0100374 <pluginManagement>
375 <plugins>
376 <plugin>
377 <groupId>com.google.cloud.tools</groupId>
378 <artifactId>jib-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100379 <version>2.8.0</version>
shivasubedif4b36ef2021-06-23 16:01:10 +0100380 <configuration>
381 <container>
382 <mainClass>${app}</mainClass>
383 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
384 </container>
385 <from>
386 <image>${base.image}</image>
387 </from>
388 <to>
389 <tags>
390 <tag>latest</tag>
391 </tags>
392 <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image>
393 </to>
394 </configuration>
395 <executions>
396 <execution>
397 <phase>package</phase>
398 <id>build</id>
399 <goals>
400 <goal>dockerBuild</goal>
401 </goals>
402 </execution>
403 <execution>
404 <phase>deploy</phase>
405 <id>buildAndPush</id>
406 <goals>
407 <goal>build</goal>
408 </goals>
409 </execution>
410 </executions>
411 </plugin>
412 </plugins>
413 </pluginManagement>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100414 </build>
shivasubedif4b36ef2021-06-23 16:01:10 +0100415 <profiles>
416 <profile>
puthuparambil.adityaeddb3dd2021-07-27 15:57:19 +0100417 <id>docker</id>
shivasubedif4b36ef2021-06-23 16:01:10 +0100418 <activation>
419 <activeByDefault>true</activeByDefault>
420 </activation>
421 <properties>
422 <image.name>ncmp-dmi-plugin</image.name>
423 </properties>
424 <build>
425 <plugins>
426 <plugin>
427 <groupId>com.google.cloud.tools</groupId>
428 <artifactId>jib-maven-plugin</artifactId>
429 </plugin>
430 </plugins>
431 </build>
432 </profile>
433 </profiles>
lukegleesonb208aeb2021-07-08 16:48:15 +0100434</project>