blob: e8861006e0715dce2f22011aebc0303ed4d4a9eb [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>
Bruno Sakotof549c7c2021-05-18 16:02:30 -040041 <minimum-coverage>0.9</minimum-coverage>
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010042
43 <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
44 <sonar.coverage.jacoco.xmlReportPaths>
45 ../cps-ri/target/site/jacoco-ut/jacoco.xml,
46 ../cps-ri/target/site/jacoco-aggregate/jacoco.xml,
47 ../cps-service/target/site/jacoco-ut/jacoco.xml,
48 ../cps-service/target/site/jacoco-aggregate/jacoco.xml,
49 ../cps-rest/target/site/jacoco-ut/jacoco.xml,
50 ../cps-rest/target/site/jacoco-aggregate/jacoco.xml,
Claudio D. Gasparini3241cda2021-06-04 15:30:59 +020051 ../cps-ncmp-service/target/site/jacoco-ut/jacoco.xml,
52 ../cps-ncmp-service/target/site/jacoco-aggregate/jacoco.xml,
tragait34a94b92021-03-30 12:02:27 +010053 ../cps-ncmp-rest/target/site/jacoco-ut/jacoco.xml,
54 ../cps-ncmp-rest/target/site/jacoco-aggregate/jacoco.xml,
Claudio D. Gasparini3241cda2021-06-04 15:30:59 +020055 ../cps-path-parser/target/site/jacoco-ut/jacoco.xml,
56 ../cps-path-parser/target/site/jacoco-aggregate/jacoco.xml,
Claudio D. Gasparinib77bf252021-01-28 15:36:37 +010057 ../cps-application/target/site/jacoco-ut/jacoco.xml,
58 ../cps-application/target/site/jacoco-aggregate/jacoco.xml
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010059 </sonar.coverage.jacoco.xmlReportPaths>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010060 </properties>
61
62 <dependencyManagement>
63 <dependencies>
64 <dependency>
65 <groupId>org.onap.cps</groupId>
66 <artifactId>cps-dependencies</artifactId>
67 <version>${project.version}</version>
68 <type>pom</type>
69 <scope>import</scope>
70 </dependency>
71 <dependency>
72 <groupId>org.onap.cps</groupId>
73 <artifactId>cps-bom</artifactId>
74 <version>${project.version}</version>
75 <type>pom</type>
76 <scope>import</scope>
77 </dependency>
78 </dependencies>
79 </dependencyManagement>
80
81 <build>
82 <resources>
83 <resource>
84 <directory>src/main/resources</directory>
85 <filtering>true</filtering>
86 </resource>
87 <resource>
88 <directory>target/generated-sources/license</directory>
89 <includes>
90 <include>third-party-licenses.txt</include>
91 </includes>
92 </resource>
93 <resource>
94 <directory>target/generated-resources/licenses</directory>
95 <includes>
96 <include>*.*</include>
97 </includes>
98 <targetPath>third-party-licenses</targetPath>
99 </resource>
100 </resources>
101 <pluginManagement>
102 <plugins>
103 <plugin>
104 <groupId>org.springframework.boot</groupId>
105 <artifactId>spring-boot-maven-plugin</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100106 <version>2.3.3.RELEASE</version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100107 <executions>
108 <execution>
109 <goals>
Ruslan Kashapovf4d1c982020-10-29 11:39:31 +0200110 <goal>build-info</goal>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100111 <goal>repackage</goal>
112 </goals>
113 </execution>
114 </executions>
115 </plugin>
Bruno Sakoto6c347182021-07-22 15:25:23 -0400116 <plugin>
117 <groupId>org.apache.maven.plugins</groupId>
118 <artifactId>maven-surefire-plugin</artifactId>
119 <version>3.0.0-M5</version>
120 </plugin>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000121 <!-- Swagger code generation. -->
122 <plugin>
123 <groupId>io.swagger.codegen.v3</groupId>
124 <artifactId>swagger-codegen-maven-plugin</artifactId>
JosephKeenanbe215952021-08-03 18:24:32 +0100125 <version>3.0.27</version>
Renu Kumari4d520012021-08-30 11:50:43 -0400126 <executions>
127 <execution>
128 <id>openapi-yaml-gen</id>
129 <goals>
130 <goal>generate</goal>
131 </goals>
132 <phase>compile</phase>
133 <configuration>
134 <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
135 <language>openapi-yaml</language>
136 </configuration>
137 </execution>
138 </executions>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000139 </plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100140 <plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100141 <groupId>com.github.spotbugs</groupId>
142 <artifactId>spotbugs-maven-plugin</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100143 <version>4.1.3</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100144 <dependencies>
145 <dependency>
146 <groupId>com.github.spotbugs</groupId>
147 <artifactId>spotbugs</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100148 <version>4.2.0</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100149 </dependency>
150 <dependency>
151 <groupId>${project.groupId}</groupId>
152 <artifactId>spotbugs</artifactId>
153 <version>${project.version}</version>
154 </dependency>
155 <dependency>
156 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
157 <groupId>org.slf4j</groupId>
158 <artifactId>slf4j-simple</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100159 <version>1.8.0-beta4</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100160 </dependency>
161 </dependencies>
162 <configuration>
163 <plugins>
164 <plugin>
165 <groupId>jp.skypencil.findbugs.slf4j</groupId>
166 <artifactId>bug-pattern</artifactId>
167 <version>1.5.0</version>
168 </plugin>
169 </plugins>
170 <!--
171 Enables analysis which takes more memory but finds more bugs.
172 If you run out of memory, changes the value of the effort element
173 to 'Low'.
174 -->
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400175 <addSourceDirs>true</addSourceDirs>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100176 <effort>Max</effort>
177 <!-- Reports all bugs (other values are medium and max) -->
178 <threshold>Low</threshold>
179 <!-- Build doesn't fail if problems are found -->
Claudio David Gasparini9afc8d12021-01-11 16:42:30 +0100180 <failOnError>true</failOnError>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100181 <!-- References the excluded rules -->
182 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
183 <!-- Produces XML report -->
184 <xmlOutput>true</xmlOutput>
185 <!-- Configures the directory in which the XML report is created -->
186 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
187 </configuration>
188 <executions>
189 <!--
190 Ensures that SpotBugs inspects source code when project is compiled.
191 -->
192 <execution>
193 <id>analyze-compile</id>
194 <phase>compile</phase>
195 <goals>
196 <goal>check</goal>
197 </goals>
198 </execution>
199 </executions>
200 </plugin>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400201 <plugin>
202 <groupId>org.jsonschema2pojo</groupId>
203 <artifactId>jsonschema2pojo-maven-plugin</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100204 <version>1.1.1</version>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400205 <configuration>
206 <targetVersion>${java.version}</targetVersion>
207 </configuration>
208 <executions>
209 <execution>
210 <goals>
211 <goal>generate</goal>
212 </goals>
213 </execution>
214 </executions>
215 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100216 </plugins>
217 </pluginManagement>
218 <plugins>
219 <plugin>
220 <groupId>org.apache.maven.plugins</groupId>
221 <artifactId>maven-compiler-plugin</artifactId>
222 <configuration>
223 <source>${java.version}</source>
224 <target>${java.version}</target>
225 </configuration>
226 </plugin>
227 <plugin>
228 <groupId>org.apache.maven.plugins</groupId>
229 <artifactId>maven-checkstyle-plugin</artifactId>
230 <executions>
231 <execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100232 <id>onap-license</id>
233 <goals>
234 <goal>check</goal>
235 </goals>
236 <phase>process-sources</phase>
237 <configuration>
238 <configLocation>onap-checkstyle/check-license.xml</configLocation>
239 <includeResources>false</includeResources>
240 <includeTestSourceDirectory>true</includeTestSourceDirectory>
241 <includeTestResources>false</includeTestResources>
242 <sourceDirectories>
243 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
244 </sourceDirectories>
245 <consoleOutput>false</consoleOutput>
246 <violationSeverity>warning</violationSeverity>
247 <failOnViolation>true</failOnViolation>
248 </configuration>
249 </execution>
250 <execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100251 <id>onap-java-style</id>
252 <goals>
253 <goal>check</goal>
254 </goals>
255 <phase>process-sources</phase>
256 <configuration>
257 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100258 <sourceDirectories>
259 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
260 </sourceDirectories>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100261 <includeResources>true</includeResources>
262 <includeTestSourceDirectory>true</includeTestSourceDirectory>
263 <includeTestResources>true</includeTestResources>
264 <consoleOutput>false</consoleOutput>
265 <violationSeverity>warning</violationSeverity>
266 <failOnViolation>true</failOnViolation>
267 </configuration>
268 </execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100269 <execution>
270 <id>cps-java-style</id>
271 <goals>
272 <goal>check</goal>
273 </goals>
274 <phase>process-sources</phase>
275 <configuration>
276 <configLocation>cps-java-style.xml</configLocation>
277 <sourceDirectories>
278 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
279 </sourceDirectories>
280 <includeResources>true</includeResources>
281 <includeTestSourceDirectory>true</includeTestSourceDirectory>
282 <includeTestResources>true</includeTestResources>
283 <consoleOutput>true</consoleOutput>
284 <violationSeverity>warning</violationSeverity>
285 <failOnViolation>true</failOnViolation>
286 </configuration>
287 </execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100288 </executions>
289 <dependencies>
290 <dependency>
291 <groupId>org.onap.oparent</groupId>
292 <artifactId>checkstyle</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100293 <version>3.1.0</version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100294 </dependency>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100295 <dependency>
296 <groupId>${project.groupId}</groupId>
297 <artifactId>checkstyle</artifactId>
298 <version>${project.version}</version>
299 </dependency>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100300 </dependencies>
301 </plugin>
302 <!-- Mandatory plugins for using Spock -->
303 <plugin>
304 <!-- The gmavenplus plugin is used to compile Groovy code.
305 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
306 <groupId>org.codehaus.gmavenplus</groupId>
307 <artifactId>gmavenplus-plugin</artifactId>
308 <version>1.9.0</version>
309 <executions>
310 <execution>
311 <goals>
312 <goal>compileTests</goal>
313 </goals>
314 </execution>
315 </executions>
316 </plugin>
317 <!-- Required because names of spec classes don't match default
318 Surefire patterns (`*Test` etc.) -->
319 <plugin>
320 <groupId>org.apache.maven.plugins</groupId>
321 <artifactId>maven-surefire-plugin</artifactId>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100322 <configuration>
puthuparambil.aditya008c0ad2020-12-14 15:46:30 +0000323 <!--suppress UnresolvedMavenProperty -->
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100324 <argLine>${surefireArgLine}</argLine>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100325 <useFile>false</useFile>
326 <includes>
327 <include>**/*Spec.java</include>
328 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
329 </includes>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100330 <excludes>
331 <exclude>**/IT*.java</exclude>
332 </excludes>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200333 <environmentVariables>
334 <!--
335 disable privileged container usage to cleanup the test containers;
336 these will be removed automatically on jvm termination;
337 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
338 -->
339 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
Renu Kumariff52b942021-05-27 23:16:32 -0400340 <TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>${docker.pull.registry}/</TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200341 </environmentVariables>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100342 </configuration>
343 </plugin>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100344 <plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100345 <groupId>org.jacoco</groupId>
346 <artifactId>jacoco-maven-plugin</artifactId>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400347 <configuration>
348 <excludes>
349 <exclude>org/onap/cps/rest/model/*</exclude>
350 <exclude>org/onap/cps/cpspath/parser/antlr4/*</exclude>
DylanB95EST4f4178c2021-07-02 13:30:42 +0100351 <exclude>org/onap/cps/ncmp/rest/model/*</exclude>
tragaitc3285512021-08-16 15:12:36 +0100352 <exclude>org/onap/cps/ncmp/api/models/*</exclude>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400353 </excludes>
354 </configuration>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100355 <executions>
356 <execution>
357 <id>default-prepare-agent</id>
358 <goals>
359 <goal>prepare-agent</goal>
360 </goals>
361 </execution>
362 <execution>
363 <id>coverage-check</id>
364 <goals>
365 <goal>check</goal>
366 </goals>
367 <configuration>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100368 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100369 <rules>
370 <rule>
371 <element>BUNDLE</element>
372 <limits>
373 <limit>
374 <counter>INSTRUCTION</counter>
375 <value>COVEREDRATIO</value>
376 <minimum>${minimum-coverage}</minimum>
377 </limit>
378 </limits>
379 </rule>
380 </rules>
381 </configuration>
382 </execution>
Claudio David Gasparini593920b2021-01-13 13:47:18 +0100383 <execution>
384 <id>report</id>
385 <goals>
386 <goal>report-aggregate</goal>
387 </goals>
388 <phase>verify</phase>
389 <configuration>
390 <dataFileIncludes>
391 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
392 </dataFileIncludes>
393 </configuration>
394 </execution>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100395 </executions>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100396 </plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100397 <plugin>
398 <groupId>com.github.spotbugs</groupId>
399 <artifactId>spotbugs-maven-plugin</artifactId>
400 </plugin>
Claudio David Gasparini7492aea2021-01-13 08:34:00 +0100401 <plugin>
402 <groupId>org.sonarsource.scanner.maven</groupId>
403 <artifactId>sonar-maven-plugin</artifactId>
404 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100405 </plugins>
406 </build>
Rishi.Chail75729072021-04-08 14:23:32 +0100407</project>