blob: a2eb0b341b9900c42742afe493ec3224750c644e [file] [log] [blame]
DylanB95ESTb5a23832021-06-02 19:45:46 +01001<!--
2 ============LICENSE_START=======================================================
3 Copyright (c) 2021 Nordix Foundation.
4 ================================================================================
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
DylanB95ESTb5a23832021-06-02 19:45:46 +01008 http://www.apache.org/licenses/LICENSE-2.0
DylanB95ESTb5a23832021-06-02 19:45:46 +01009 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ============LICENSE_END=========================================================
15-->
DylanB95ESTb5a23832021-06-02 19:45:46 +010016<project xmlns="http://maven.apache.org/POM/4.0.0"
17 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
19 <modelVersion>4.0.0</modelVersion>
DylanB95ESTb5a23832021-06-02 19:45:46 +010020 <parent>
21 <groupId>org.onap.oparent</groupId>
22 <artifactId>oparent</artifactId>
23 <version>3.2.0</version>
24 <relativePath/>
25 </parent>
DylanB95ESTb5a23832021-06-02 19:45:46 +010026 <organization>
27 <name>ONAP - CPS</name>
28 <url>http://www.onap.org/</url>
29 </organization>
DylanB95ESTb5a23832021-06-02 19:45:46 +010030 <groupId>org.onap.cps</groupId>
31 <artifactId>ncmp-dmi-plugin</artifactId>
32 <version>0.0.1-SNAPSHOT</version>
33 <name>ncmp-dmi-plugin</name>
34 <description>DMI Plugin Service</description>
DylanB95ESTb5a23832021-06-02 19:45:46 +010035 <properties>
36 <app>org.onap.cps.ncmp.Application</app>
shivasubedif4b36ef2021-06-23 16:01:10 +010037 <base.image>${docker.pull.registry}/onap/integration-java11:8.0.0</base.image>
shivasubedi55500c32021-06-23 16:31:02 +010038 <cps.version>1.1.0-SNAPSHOT</cps.version>
shivasubedif4b36ef2021-06-23 16:01:10 +010039 <image.tag>${project.version}-${maven.build.timestamp}</image.tag>
shivasubedi55500c32021-06-23 16:31:02 +010040 <jacoco.minimum.coverage>0.7</jacoco.minimum.coverage>
shivasubedif4b36ef2021-06-23 16:01:10 +010041 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
DylanB95ESTb5a23832021-06-02 19:45:46 +010042 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
DylanB95ESTb5a23832021-06-02 19:45:46 +010043 </properties>
DylanB95ESTb5a23832021-06-02 19:45:46 +010044 <dependencyManagement>
45 <dependencies>
46 <dependency>
47 <groupId>org.springframework.boot</groupId>
48 <artifactId>spring-boot-dependencies</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +010049 <version>2.5.0</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +010050 <type>pom</type>
51 <scope>import</scope>
52 </dependency>
53 <dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +010054 <groupId>org.spockframework</groupId>
shivasubedi275c1dc2021-07-07 16:39:34 +010055 <artifactId>spock-bom</artifactId>
56 <version>2.0-M5-groovy-3.0</version>
57 <type>pom</type>
58 <scope>import</scope>
DylanB95ESTb5a23832021-06-02 19:45:46 +010059 </dependency>
60 </dependencies>
61 </dependencyManagement>
DylanB95ESTb5a23832021-06-02 19:45:46 +010062 <dependencies>
63 <dependency>
64 <groupId>org.springframework.boot</groupId>
65 <artifactId>spring-boot-starter-web</artifactId>
66 </dependency>
67 <dependency>
68 <groupId>org.springframework.boot</groupId>
69 <artifactId>spring-boot-starter-validation</artifactId>
70 </dependency>
71 <dependency>
72 <groupId>org.codehaus.groovy</groupId>
73 <artifactId>groovy</artifactId>
DylanB95ESTb5a23832021-06-02 19:45:46 +010074 </dependency>
75 <dependency>
76 <groupId>org.springframework.boot</groupId>
77 <artifactId>spring-boot-starter-test</artifactId>
78 <scope>test</scope>
79 <exclusions>
80 <exclusion>
81 <groupId>org.junit.vintage</groupId>
82 <artifactId>junit-vintage-engine</artifactId>
83 </exclusion>
84 </exclusions>
85 </dependency>
86 <dependency>
87 <groupId>org.spockframework</groupId>
88 <artifactId>spock-core</artifactId>
89 <scope>test</scope>
90 </dependency>
91 <dependency>
92 <groupId>org.spockframework</groupId>
93 <artifactId>spock-spring</artifactId>
94 <scope>test</scope>
95 </dependency>
96 <dependency>
97 <groupId>io.swagger</groupId>
98 <artifactId>swagger-annotations</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +010099 <version>1.6.2</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100100 </dependency>
shivasubedi55500c32021-06-23 16:31:02 +0100101 <dependency>
102 <groupId>io.springfox</groupId>
103 <artifactId>springfox-boot-starter</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100104 <version>3.0.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100105 </dependency>
106 <dependency>
107 <groupId>org.springframework.boot</groupId>
108 <artifactId>spring-boot-starter-security</artifactId>
109 </dependency>
110 <dependency>
111 <groupId>org.springframework.boot</groupId>
112 <artifactId>spring-boot-starter-actuator</artifactId>
113 </dependency>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100114 </dependencies>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100115 <build>
116 <resources>
117 <resource>
118 <directory>src/main/resources</directory>
119 <filtering>true</filtering>
120 </resource>
121 <resource>
122 <directory>target/generated-sources/license</directory>
123 <includes>
124 <include>third-party-licenses.txt</include>
125 </includes>
126 </resource>
127 <resource>
128 <directory>target/generated-resources/licenses</directory>
129 <includes>
130 <include>*.*</include>
131 </includes>
132 <targetPath>third-party-licenses</targetPath>
133 </resource>
134 </resources>
135 <plugins>
136 <plugin>
137 <groupId>io.swagger.codegen.v3</groupId>
138 <artifactId>swagger-codegen-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100139 <version>3.0.18</version>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100140 <executions>
141 <execution>
142 <goals>
143 <goal>generate</goal>
144 </goals>
145 <configuration>
146 <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
147 <language>spring</language>
148 <generateSupportingFiles>false</generateSupportingFiles>
149 <apiPackage>org.onap.cps.ncmp.rest.api</apiPackage>
150 <modelPackage>org.onap.cps.ncmp.rest.model</modelPackage>
151 <configOptions>
152 <sourceFolder>src/gen/java</sourceFolder>
153 <dateLibrary>java11</dateLibrary>
154 <interfaceOnly>true</interfaceOnly>
155 <useTags>true</useTags>
156 </configOptions>
157 </configuration>
158 </execution>
159 </executions>
160 </plugin>
161 <plugin>
162 <groupId>org.springframework.boot</groupId>
163 <artifactId>spring-boot-maven-plugin</artifactId>
164 <executions>
165 <execution>
166 <goals>
167 <goal>build-info</goal>
168 <goal>repackage</goal>
169 </goals>
170 </execution>
171 </executions>
172 </plugin>
173 <plugin>
174 <groupId>org.codehaus.gmavenplus</groupId>
175 <artifactId>gmavenplus-plugin</artifactId>
176 <executions>
177 <execution>
178 <goals>
179 <goal>compileTests</goal>
180 </goals>
181 </execution>
182 </executions>
183 </plugin>
184 <plugin>
185 <groupId>org.apache.maven.plugins</groupId>
186 <artifactId>maven-surefire-plugin</artifactId>
187 <configuration>
188 <argLine>${surefireArgLine}</argLine>
189 <includes>
190 <include>**/*Spec.java</include>
191 </includes>
192 <excludes>
193 <exclude>**/IT*.java</exclude>
194 </excludes>
195 </configuration>
196 </plugin>
shivasubedi55500c32021-06-23 16:31:02 +0100197 <plugin>
198 <groupId>org.apache.maven.plugins</groupId>
199 <artifactId>maven-checkstyle-plugin</artifactId>
200 <executions>
201 <execution>
202 <id>cps-java-style</id>
203 <goals>
204 <goal>check</goal>
205 </goals>
206 <phase>process-sources</phase>
207 <configuration>
208 <configLocation>cps-java-style.xml</configLocation>
209 <sourceDirectories>
210 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
211 </sourceDirectories>
212 <includeResources>true</includeResources>
213 <includeTestSourceDirectory>true</includeTestSourceDirectory>
214 <includeTestResources>true</includeTestResources>
215 <consoleOutput>true</consoleOutput>
216 <violationSeverity>warning</violationSeverity>
217 <failOnViolation>true</failOnViolation>
218 </configuration>
219 </execution>
220 </executions>
221 <dependencies>
222 <dependency>
223 <groupId>${project.groupId}</groupId>
224 <artifactId>checkstyle</artifactId>
225 <version>${cps.version}</version>
226 </dependency>
227 </dependencies>
228 </plugin>
229 <plugin>
230 <groupId>com.github.spotbugs</groupId>
231 <artifactId>spotbugs-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100232 <version>4.1.3</version>
shivasubedi55500c32021-06-23 16:31:02 +0100233 <executions>
234 <execution>
235 <id>analyze-compile</id>
236 <phase>compile</phase>
237 <goals>
238 <goal>check</goal>
239 </goals>
240 </execution>
241 </executions>
242 <dependencies>
243 <dependency>
244 <groupId>${project.groupId}</groupId>
245 <artifactId>spotbugs</artifactId>
246 <version>${cps.version}</version>
247 <scope>compile</scope>
248 </dependency>
249 </dependencies>
250 <configuration>
251 <plugins>
252 <plugin>
253 <groupId>jp.skypencil.findbugs.slf4j</groupId>
254 <artifactId>bug-pattern</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100255 <version>1.5.0</version>
shivasubedi55500c32021-06-23 16:31:02 +0100256 </plugin>
257 </plugins>
258 <effort>Max</effort>
259 <threshold>Low</threshold>
260 <failOnError>true</failOnError>
261 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
262 <xmlOutput>true</xmlOutput>
263 <xmlOutputDirectory>${basedir}/target/spotbugs</xmlOutputDirectory>
264 </configuration>
265 </plugin>
266 <plugin>
267 <groupId>org.jacoco</groupId>
268 <artifactId>jacoco-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100269 <version>0.8.5</version>
shivasubedi55500c32021-06-23 16:31:02 +0100270 <configuration>
271 <excludes>
272 <exclude>org/onap/cps/ncmp/rest/model/*</exclude>
273 </excludes>
274 </configuration>
275 <executions>
276 <execution>
277 <id>default-prepare-agent</id>
278 <goals>
279 <goal>prepare-agent</goal>
280 </goals>
281 </execution>
282 <execution>
283 <id>coverage-check</id>
284 <goals>
285 <goal>check</goal>
286 </goals>
287 <configuration>
288 <dataFile>${basedir}/target/code-coverage/jacoco-ut.exec</dataFile>
289 <rules>
290 <rule>
291 <element>BUNDLE</element>
292 <limits>
293 <limit>
294 <counter>INSTRUCTION</counter>
295 <value>COVEREDRATIO</value>
296 <minimum>${jacoco.minimum.coverage}</minimum>
297 </limit>
298 </limits>
299 </rule>
300 </rules>
301 </configuration>
302 </execution>
303 <execution>
304 <id>report</id>
305 <phase>verify</phase>
306 <goals>
307 <goal>report-aggregate</goal>
308 </goals>
309 <configuration>
310 <dataFileIncludes>
311 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
312 </dataFileIncludes>
313 </configuration>
314 </execution>
315 </executions>
316 </plugin>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100317 </plugins>
shivasubedif4b36ef2021-06-23 16:01:10 +0100318 <pluginManagement>
319 <plugins>
320 <plugin>
321 <groupId>com.google.cloud.tools</groupId>
322 <artifactId>jib-maven-plugin</artifactId>
shivasubedi275c1dc2021-07-07 16:39:34 +0100323 <version>2.8.0</version>
shivasubedif4b36ef2021-06-23 16:01:10 +0100324 <configuration>
325 <container>
326 <mainClass>${app}</mainClass>
327 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
328 </container>
329 <from>
330 <image>${base.image}</image>
331 </from>
332 <to>
333 <tags>
334 <tag>latest</tag>
335 </tags>
336 <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image>
337 </to>
338 </configuration>
339 <executions>
340 <execution>
341 <phase>package</phase>
342 <id>build</id>
343 <goals>
344 <goal>dockerBuild</goal>
345 </goals>
346 </execution>
347 <execution>
348 <phase>deploy</phase>
349 <id>buildAndPush</id>
350 <goals>
351 <goal>build</goal>
352 </goals>
353 </execution>
354 </executions>
355 </plugin>
356 </plugins>
357 </pluginManagement>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100358 </build>
shivasubedif4b36ef2021-06-23 16:01:10 +0100359 <profiles>
360 <profile>
361 <id>dmi-docker</id>
362 <activation>
363 <activeByDefault>true</activeByDefault>
364 </activation>
365 <properties>
366 <image.name>ncmp-dmi-plugin</image.name>
367 </properties>
368 <build>
369 <plugins>
370 <plugin>
371 <groupId>com.google.cloud.tools</groupId>
372 <artifactId>jib-maven-plugin</artifactId>
373 </plugin>
374 </plugins>
375 </build>
376 </profile>
377 </profiles>
DylanB95ESTb5a23832021-06-02 19:45:46 +0100378</project>