blob: a341ea9af7f53916820d3989f9bd6bb9da868f2d [file] [log] [blame]
Claudio David Gasparini70c17022020-10-26 10:12:10 +01001<?xml version="1.0" encoding="UTF-8"?>
Bruno Sakoto5c7c4892021-02-08 21:51:05 -05002<!--
3 ============LICENSE_START=======================================================
4 Copyright (c) 2021 Pantheon.tech.
5 Modifications Copyright (C) 2021 Bell Canada.
Rishi.Chail475bab52021-03-30 14:02:03 +01006 Modifications Copyright (C) 2021 Nordix Foundation.
Bruno Sakoto5c7c4892021-02-08 21:51:05 -05007 ================================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END=========================================================
20-->
21
Claudio David Gasparini70c17022020-10-26 10:12:10 +010022<project xmlns="http://maven.apache.org/POM/4.0.0"
23 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25 <parent>
26 <groupId>org.onap.oparent</groupId>
27 <artifactId>oparent</artifactId>
Rishi.Chail47b0b182021-01-28 03:19:47 +000028 <version>3.2.0</version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010029 <relativePath/>
30 </parent>
31 <modelVersion>4.0.0</modelVersion>
32
33 <groupId>org.onap.cps</groupId>
34 <artifactId>cps-parent</artifactId>
Rishi.Chaildbffd912021-03-05 12:32:33 +000035 <version>1.1.0-SNAPSHOT</version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010036 <packaging>pom</packaging>
37
38 <properties>
Claudio David Gasparini900ba022020-11-08 22:18:36 +010039 <app>org.onap.cps.Application</app>
Bruno Sakotof549c7c2021-05-18 16:02:30 -040040 <java.version>11</java.version>
41 <jsonschema2pojo-maven-plugin.version>1.1.1</jsonschema2pojo-maven-plugin.version>
42 <minimum-coverage>0.9</minimum-coverage>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010043 <oparent.version>3.1.0</oparent.version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +010044 <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +010045 <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
46 <spotbugs.bug-pattern.version>1.5.0</spotbugs.bug-pattern.version>
47 <spotbugs.version>4.2.0</spotbugs.version>
Bruno Sakotof549c7c2021-05-18 16:02:30 -040048 <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
puthuparambil.aditya47598112020-11-02 11:31:39 +000049 <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010050
51 <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
52 <sonar.coverage.jacoco.xmlReportPaths>
53 ../cps-ri/target/site/jacoco-ut/jacoco.xml,
54 ../cps-ri/target/site/jacoco-aggregate/jacoco.xml,
55 ../cps-service/target/site/jacoco-ut/jacoco.xml,
56 ../cps-service/target/site/jacoco-aggregate/jacoco.xml,
57 ../cps-rest/target/site/jacoco-ut/jacoco.xml,
58 ../cps-rest/target/site/jacoco-aggregate/jacoco.xml,
Claudio D. Gasparini3241cda2021-06-04 15:30:59 +020059 ../cps-ncmp-service/target/site/jacoco-ut/jacoco.xml,
60 ../cps-ncmp-service/target/site/jacoco-aggregate/jacoco.xml,
tragait34a94b92021-03-30 12:02:27 +010061 ../cps-ncmp-rest/target/site/jacoco-ut/jacoco.xml,
62 ../cps-ncmp-rest/target/site/jacoco-aggregate/jacoco.xml,
Claudio D. Gasparini3241cda2021-06-04 15:30:59 +020063 ../cps-path-parser/target/site/jacoco-ut/jacoco.xml,
64 ../cps-path-parser/target/site/jacoco-aggregate/jacoco.xml,
Claudio D. Gasparinib77bf252021-01-28 15:36:37 +010065 ../cps-application/target/site/jacoco-ut/jacoco.xml,
66 ../cps-application/target/site/jacoco-aggregate/jacoco.xml
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010067 </sonar.coverage.jacoco.xmlReportPaths>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010068 </properties>
69
70 <dependencyManagement>
71 <dependencies>
72 <dependency>
73 <groupId>org.onap.cps</groupId>
74 <artifactId>cps-dependencies</artifactId>
75 <version>${project.version}</version>
76 <type>pom</type>
77 <scope>import</scope>
78 </dependency>
79 <dependency>
80 <groupId>org.onap.cps</groupId>
81 <artifactId>cps-bom</artifactId>
82 <version>${project.version}</version>
83 <type>pom</type>
84 <scope>import</scope>
85 </dependency>
86 </dependencies>
87 </dependencyManagement>
88
89 <build>
90 <resources>
91 <resource>
92 <directory>src/main/resources</directory>
93 <filtering>true</filtering>
94 </resource>
95 <resource>
96 <directory>target/generated-sources/license</directory>
97 <includes>
98 <include>third-party-licenses.txt</include>
99 </includes>
100 </resource>
101 <resource>
102 <directory>target/generated-resources/licenses</directory>
103 <includes>
104 <include>*.*</include>
105 </includes>
106 <targetPath>third-party-licenses</targetPath>
107 </resource>
108 </resources>
109 <pluginManagement>
110 <plugins>
111 <plugin>
112 <groupId>org.springframework.boot</groupId>
113 <artifactId>spring-boot-maven-plugin</artifactId>
114 <version>${spring-boot-maven-plugin.version}</version>
115 <executions>
116 <execution>
117 <goals>
Ruslan Kashapovf4d1c982020-10-29 11:39:31 +0200118 <goal>build-info</goal>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100119 <goal>repackage</goal>
120 </goals>
121 </execution>
122 </executions>
123 </plugin>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000124 <!-- Swagger code generation. -->
125 <plugin>
126 <groupId>io.swagger.codegen.v3</groupId>
127 <artifactId>swagger-codegen-maven-plugin</artifactId>
128 <version>${swagger-codegen-maven-plugin.version}</version>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000129 </plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100130 <plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100131 <groupId>com.github.spotbugs</groupId>
132 <artifactId>spotbugs-maven-plugin</artifactId>
133 <version>${spotbugs-maven-plugin.version}</version>
134 <dependencies>
135 <dependency>
136 <groupId>com.github.spotbugs</groupId>
137 <artifactId>spotbugs</artifactId>
138 <version>${spotbugs.version}</version>
139 </dependency>
140 <dependency>
141 <groupId>${project.groupId}</groupId>
142 <artifactId>spotbugs</artifactId>
143 <version>${project.version}</version>
144 </dependency>
145 <dependency>
146 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
147 <groupId>org.slf4j</groupId>
148 <artifactId>slf4j-simple</artifactId>
149 <version>${spotbugs.slf4j.version}</version>
150 </dependency>
151 </dependencies>
152 <configuration>
153 <plugins>
154 <plugin>
155 <groupId>jp.skypencil.findbugs.slf4j</groupId>
156 <artifactId>bug-pattern</artifactId>
157 <version>1.5.0</version>
158 </plugin>
159 </plugins>
160 <!--
161 Enables analysis which takes more memory but finds more bugs.
162 If you run out of memory, changes the value of the effort element
163 to 'Low'.
164 -->
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400165 <addSourceDirs>true</addSourceDirs>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100166 <effort>Max</effort>
167 <!-- Reports all bugs (other values are medium and max) -->
168 <threshold>Low</threshold>
169 <!-- Build doesn't fail if problems are found -->
Claudio David Gasparini9afc8d12021-01-11 16:42:30 +0100170 <failOnError>true</failOnError>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100171 <!-- References the excluded rules -->
172 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
173 <!-- Produces XML report -->
174 <xmlOutput>true</xmlOutput>
175 <!-- Configures the directory in which the XML report is created -->
176 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
177 </configuration>
178 <executions>
179 <!--
180 Ensures that SpotBugs inspects source code when project is compiled.
181 -->
182 <execution>
183 <id>analyze-compile</id>
184 <phase>compile</phase>
185 <goals>
186 <goal>check</goal>
187 </goals>
188 </execution>
189 </executions>
190 </plugin>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400191 <plugin>
192 <groupId>org.jsonschema2pojo</groupId>
193 <artifactId>jsonschema2pojo-maven-plugin</artifactId>
194 <version>${jsonschema2pojo-maven-plugin.version}</version>
195 <configuration>
196 <targetVersion>${java.version}</targetVersion>
197 </configuration>
198 <executions>
199 <execution>
200 <goals>
201 <goal>generate</goal>
202 </goals>
203 </execution>
204 </executions>
205 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100206 </plugins>
207 </pluginManagement>
208 <plugins>
209 <plugin>
210 <groupId>org.apache.maven.plugins</groupId>
211 <artifactId>maven-compiler-plugin</artifactId>
212 <configuration>
213 <source>${java.version}</source>
214 <target>${java.version}</target>
215 </configuration>
216 </plugin>
217 <plugin>
218 <groupId>org.apache.maven.plugins</groupId>
219 <artifactId>maven-checkstyle-plugin</artifactId>
220 <executions>
221 <execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100222 <id>onap-license</id>
223 <goals>
224 <goal>check</goal>
225 </goals>
226 <phase>process-sources</phase>
227 <configuration>
228 <configLocation>onap-checkstyle/check-license.xml</configLocation>
229 <includeResources>false</includeResources>
230 <includeTestSourceDirectory>true</includeTestSourceDirectory>
231 <includeTestResources>false</includeTestResources>
232 <sourceDirectories>
233 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
234 </sourceDirectories>
235 <consoleOutput>false</consoleOutput>
236 <violationSeverity>warning</violationSeverity>
237 <failOnViolation>true</failOnViolation>
238 </configuration>
239 </execution>
240 <execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100241 <id>onap-java-style</id>
242 <goals>
243 <goal>check</goal>
244 </goals>
245 <phase>process-sources</phase>
246 <configuration>
247 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100248 <sourceDirectories>
249 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
250 </sourceDirectories>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100251 <includeResources>true</includeResources>
252 <includeTestSourceDirectory>true</includeTestSourceDirectory>
253 <includeTestResources>true</includeTestResources>
254 <consoleOutput>false</consoleOutput>
255 <violationSeverity>warning</violationSeverity>
256 <failOnViolation>true</failOnViolation>
257 </configuration>
258 </execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100259 <execution>
260 <id>cps-java-style</id>
261 <goals>
262 <goal>check</goal>
263 </goals>
264 <phase>process-sources</phase>
265 <configuration>
266 <configLocation>cps-java-style.xml</configLocation>
267 <sourceDirectories>
268 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
269 </sourceDirectories>
270 <includeResources>true</includeResources>
271 <includeTestSourceDirectory>true</includeTestSourceDirectory>
272 <includeTestResources>true</includeTestResources>
273 <consoleOutput>true</consoleOutput>
274 <violationSeverity>warning</violationSeverity>
275 <failOnViolation>true</failOnViolation>
276 </configuration>
277 </execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100278 </executions>
279 <dependencies>
280 <dependency>
281 <groupId>org.onap.oparent</groupId>
282 <artifactId>checkstyle</artifactId>
283 <version>${oparent.version}</version>
284 </dependency>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100285 <dependency>
286 <groupId>${project.groupId}</groupId>
287 <artifactId>checkstyle</artifactId>
288 <version>${project.version}</version>
289 </dependency>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100290 </dependencies>
291 </plugin>
292 <!-- Mandatory plugins for using Spock -->
293 <plugin>
294 <!-- The gmavenplus plugin is used to compile Groovy code.
295 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
296 <groupId>org.codehaus.gmavenplus</groupId>
297 <artifactId>gmavenplus-plugin</artifactId>
298 <version>1.9.0</version>
299 <executions>
300 <execution>
301 <goals>
302 <goal>compileTests</goal>
303 </goals>
304 </execution>
305 </executions>
306 </plugin>
307 <!-- Required because names of spec classes don't match default
308 Surefire patterns (`*Test` etc.) -->
309 <plugin>
310 <groupId>org.apache.maven.plugins</groupId>
311 <artifactId>maven-surefire-plugin</artifactId>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100312 <configuration>
puthuparambil.aditya008c0ad2020-12-14 15:46:30 +0000313 <!--suppress UnresolvedMavenProperty -->
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100314 <argLine>${surefireArgLine}</argLine>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100315 <useFile>false</useFile>
316 <includes>
317 <include>**/*Spec.java</include>
318 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
319 </includes>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100320 <excludes>
321 <exclude>**/IT*.java</exclude>
322 </excludes>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200323 <environmentVariables>
324 <!--
325 disable privileged container usage to cleanup the test containers;
326 these will be removed automatically on jvm termination;
327 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
328 -->
329 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
ToineSiebelinka401e722021-06-30 08:38:51 +0100330 <TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>${docker.pull.registry}/library/</TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200331 </environmentVariables>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100332 </configuration>
333 </plugin>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100334 <plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100335 <groupId>org.jacoco</groupId>
336 <artifactId>jacoco-maven-plugin</artifactId>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400337 <configuration>
338 <excludes>
339 <exclude>org/onap/cps/rest/model/*</exclude>
340 <exclude>org/onap/cps/cpspath/parser/antlr4/*</exclude>
341 </excludes>
342 </configuration>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100343 <executions>
344 <execution>
345 <id>default-prepare-agent</id>
346 <goals>
347 <goal>prepare-agent</goal>
348 </goals>
349 </execution>
350 <execution>
351 <id>coverage-check</id>
352 <goals>
353 <goal>check</goal>
354 </goals>
355 <configuration>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100356 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100357 <rules>
358 <rule>
359 <element>BUNDLE</element>
360 <limits>
361 <limit>
362 <counter>INSTRUCTION</counter>
363 <value>COVEREDRATIO</value>
364 <minimum>${minimum-coverage}</minimum>
365 </limit>
366 </limits>
367 </rule>
368 </rules>
369 </configuration>
370 </execution>
Claudio David Gasparini593920b2021-01-13 13:47:18 +0100371 <execution>
372 <id>report</id>
373 <goals>
374 <goal>report-aggregate</goal>
375 </goals>
376 <phase>verify</phase>
377 <configuration>
378 <dataFileIncludes>
379 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
380 </dataFileIncludes>
381 </configuration>
382 </execution>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100383 </executions>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100384 </plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100385 <plugin>
386 <groupId>com.github.spotbugs</groupId>
387 <artifactId>spotbugs-maven-plugin</artifactId>
388 </plugin>
Claudio David Gasparini7492aea2021-01-13 08:34:00 +0100389 <plugin>
390 <groupId>org.sonarsource.scanner.maven</groupId>
391 <artifactId>sonar-maven-plugin</artifactId>
392 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100393 </plugins>
394 </build>
Rishi.Chail75729072021-04-08 14:23:32 +0100395</project>