blob: 430f4b5cd82db8acb1d34e8c27588ca1a3a9aa77 [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.
danielhanrahanc72a0132024-02-09 17:40:18 +00006 Modifications Copyright (C) 2021-2024 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>
danielhanrahan64ff4582024-08-21 16:14:53 +010035 <version>3.5.3-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>
egernug2b8268f2023-07-03 10:09:09 +010040 <java.version>17</java.version>
ToineSiebelink7fcffe52023-07-24 12:23:05 +010041 <minimum-coverage>1.00</minimum-coverage>
leventecsanyiabf32442022-12-07 16:22:39 +010042 <postgres.version>42.5.1</postgres.version>
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010043
44 <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
45 <sonar.coverage.jacoco.xmlReportPaths>
ToineSiebelink73001f62021-09-17 15:07:38 +010046 ../jacoco-report/target/site/jacoco-aggregate/jacoco.xml
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010047 </sonar.coverage.jacoco.xmlReportPaths>
waqas.ikramcb0256d2023-06-16 13:05:04 +010048 <parent.directory>${project.basedir}/..</parent.directory>
egernug477bd462023-09-21 17:51:21 +010049 <maven.compiler.release>17</maven.compiler.release>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010050 </properties>
51
DylanB95EST63132ce2021-12-14 16:34:38 +000052 <profiles>
53 <profile>
54 <id>Windows</id>
55 <activation>
56 <os>
57 <family>Windows</family>
58 </os>
59 </activation>
60 <properties>
61 <script.executor>python</script.executor>
62 </properties>
63 </profile>
64 <profile>
65 <id>unix</id>
66 <activation>
67 <os>
68 <family>unix</family>
69 </os>
70 </activation>
71 <properties>
72 <script.executor>python3</script.executor>
73 </properties>
74 </profile>
75 </profiles>
76
Claudio David Gasparini70c17022020-10-26 10:12:10 +010077 <dependencyManagement>
78 <dependencies>
79 <dependency>
80 <groupId>org.onap.cps</groupId>
81 <artifactId>cps-dependencies</artifactId>
82 <version>${project.version}</version>
83 <type>pom</type>
84 <scope>import</scope>
85 </dependency>
86 <dependency>
87 <groupId>org.onap.cps</groupId>
88 <artifactId>cps-bom</artifactId>
89 <version>${project.version}</version>
90 <type>pom</type>
91 <scope>import</scope>
92 </dependency>
93 </dependencies>
94 </dependencyManagement>
95
96 <build>
97 <resources>
98 <resource>
99 <directory>src/main/resources</directory>
100 <filtering>true</filtering>
101 </resource>
102 <resource>
103 <directory>target/generated-sources/license</directory>
104 <includes>
105 <include>third-party-licenses.txt</include>
106 </includes>
107 </resource>
108 <resource>
109 <directory>target/generated-resources/licenses</directory>
110 <includes>
111 <include>*.*</include>
112 </includes>
113 <targetPath>third-party-licenses</targetPath>
114 </resource>
115 </resources>
116 <pluginManagement>
117 <plugins>
118 <plugin>
119 <groupId>org.springframework.boot</groupId>
120 <artifactId>spring-boot-maven-plugin</artifactId>
emacleeea7d1b42024-03-24 19:05:34 +0000121 <version>3.2.4</version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100122 <executions>
123 <execution>
124 <goals>
Ruslan Kashapovf4d1c982020-10-29 11:39:31 +0200125 <goal>build-info</goal>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100126 <goal>repackage</goal>
127 </goals>
128 </execution>
129 </executions>
130 </plugin>
Bruno Sakoto6c347182021-07-22 15:25:23 -0400131 <plugin>
132 <groupId>org.apache.maven.plugins</groupId>
133 <artifactId>maven-surefire-plugin</artifactId>
134 <version>3.0.0-M5</version>
135 </plugin>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000136 <!-- Swagger code generation. -->
137 <plugin>
138 <groupId>io.swagger.codegen.v3</groupId>
139 <artifactId>swagger-codegen-maven-plugin</artifactId>
Renu Kumari4d520012021-08-30 11:50:43 -0400140 <executions>
141 <execution>
142 <id>openapi-yaml-gen</id>
143 <goals>
144 <goal>generate</goal>
145 </goals>
146 <phase>compile</phase>
147 <configuration>
148 <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
149 <language>openapi-yaml</language>
150 </configuration>
151 </execution>
152 </executions>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000153 </plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100154 <plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100155 <groupId>com.github.spotbugs</groupId>
156 <artifactId>spotbugs-maven-plugin</artifactId>
egernug2b8268f2023-07-03 10:09:09 +0100157 <version>4.4.2</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100158 <dependencies>
159 <dependency>
160 <groupId>com.github.spotbugs</groupId>
161 <artifactId>spotbugs</artifactId>
ToineSiebelink59a34f52024-03-19 10:42:07 +0000162 <version>4.2.3</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100163 </dependency>
164 <dependency>
165 <groupId>${project.groupId}</groupId>
166 <artifactId>spotbugs</artifactId>
167 <version>${project.version}</version>
168 </dependency>
169 <dependency>
170 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
171 <groupId>org.slf4j</groupId>
172 <artifactId>slf4j-simple</artifactId>
egernug477bd462023-09-21 17:51:21 +0100173 <version>2.0.6</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100174 </dependency>
175 </dependencies>
176 <configuration>
177 <plugins>
178 <plugin>
179 <groupId>jp.skypencil.findbugs.slf4j</groupId>
180 <artifactId>bug-pattern</artifactId>
181 <version>1.5.0</version>
182 </plugin>
183 </plugins>
184 <!--
185 Enables analysis which takes more memory but finds more bugs.
186 If you run out of memory, changes the value of the effort element
187 to 'Low'.
188 -->
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400189 <addSourceDirs>true</addSourceDirs>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100190 <effort>Max</effort>
191 <!-- Reports all bugs (other values are medium and max) -->
192 <threshold>Low</threshold>
193 <!-- Build doesn't fail if problems are found -->
Claudio David Gasparini9afc8d12021-01-11 16:42:30 +0100194 <failOnError>true</failOnError>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100195 <!-- References the excluded rules -->
196 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
197 <!-- Produces XML report -->
198 <xmlOutput>true</xmlOutput>
199 <!-- Configures the directory in which the XML report is created -->
200 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
201 </configuration>
202 <executions>
203 <!--
204 Ensures that SpotBugs inspects source code when project is compiled.
205 -->
206 <execution>
207 <id>analyze-compile</id>
208 <phase>compile</phase>
209 <goals>
210 <goal>check</goal>
211 </goals>
212 </execution>
213 </executions>
214 </plugin>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400215 <plugin>
216 <groupId>org.jsonschema2pojo</groupId>
217 <artifactId>jsonschema2pojo-maven-plugin</artifactId>
egernug477bd462023-09-21 17:51:21 +0100218 <version>1.2.1</version>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400219 <configuration>
220 <targetVersion>${java.version}</targetVersion>
221 </configuration>
222 <executions>
223 <execution>
224 <goals>
225 <goal>generate</goal>
226 </goals>
227 </execution>
228 </executions>
229 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100230 </plugins>
231 </pluginManagement>
232 <plugins>
233 <plugin>
234 <groupId>org.apache.maven.plugins</groupId>
235 <artifactId>maven-compiler-plugin</artifactId>
egernug477bd462023-09-21 17:51:21 +0100236 <version>3.11.0</version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100237 </plugin>
238 <plugin>
239 <groupId>org.apache.maven.plugins</groupId>
240 <artifactId>maven-checkstyle-plugin</artifactId>
241 <executions>
242 <execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100243 <id>onap-license</id>
244 <goals>
245 <goal>check</goal>
246 </goals>
247 <phase>process-sources</phase>
248 <configuration>
249 <configLocation>onap-checkstyle/check-license.xml</configLocation>
250 <includeResources>false</includeResources>
251 <includeTestSourceDirectory>true</includeTestSourceDirectory>
252 <includeTestResources>false</includeTestResources>
253 <sourceDirectories>
254 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
255 </sourceDirectories>
256 <consoleOutput>false</consoleOutput>
257 <violationSeverity>warning</violationSeverity>
258 <failOnViolation>true</failOnViolation>
259 </configuration>
260 </execution>
261 <execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100262 <id>onap-java-style</id>
263 <goals>
264 <goal>check</goal>
265 </goals>
266 <phase>process-sources</phase>
267 <configuration>
268 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100269 <sourceDirectories>
270 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
271 </sourceDirectories>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100272 <includeResources>true</includeResources>
273 <includeTestSourceDirectory>true</includeTestSourceDirectory>
274 <includeTestResources>true</includeTestResources>
275 <consoleOutput>false</consoleOutput>
276 <violationSeverity>warning</violationSeverity>
277 <failOnViolation>true</failOnViolation>
278 </configuration>
279 </execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100280 <execution>
281 <id>cps-java-style</id>
282 <goals>
283 <goal>check</goal>
284 </goals>
285 <phase>process-sources</phase>
286 <configuration>
287 <configLocation>cps-java-style.xml</configLocation>
288 <sourceDirectories>
289 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
290 </sourceDirectories>
291 <includeResources>true</includeResources>
292 <includeTestSourceDirectory>true</includeTestSourceDirectory>
293 <includeTestResources>true</includeTestResources>
294 <consoleOutput>true</consoleOutput>
295 <violationSeverity>warning</violationSeverity>
296 <failOnViolation>true</failOnViolation>
297 </configuration>
298 </execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100299 </executions>
300 <dependencies>
301 <dependency>
302 <groupId>org.onap.oparent</groupId>
303 <artifactId>checkstyle</artifactId>
ToineSiebelinka0bbb4e2023-04-19 12:04:50 +0100304 <version>3.2.0</version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100305 </dependency>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100306 <dependency>
307 <groupId>${project.groupId}</groupId>
308 <artifactId>checkstyle</artifactId>
309 <version>${project.version}</version>
310 </dependency>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100311 </dependencies>
312 </plugin>
313 <!-- Mandatory plugins for using Spock -->
314 <plugin>
315 <!-- The gmavenplus plugin is used to compile Groovy code.
316 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
317 <groupId>org.codehaus.gmavenplus</groupId>
318 <artifactId>gmavenplus-plugin</artifactId>
319 <version>1.9.0</version>
320 <executions>
321 <execution>
322 <goals>
323 <goal>compileTests</goal>
324 </goals>
325 </execution>
326 </executions>
327 </plugin>
328 <!-- Required because names of spec classes don't match default
329 Surefire patterns (`*Test` etc.) -->
330 <plugin>
331 <groupId>org.apache.maven.plugins</groupId>
332 <artifactId>maven-surefire-plugin</artifactId>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100333 <configuration>
puthuparambil.aditya008c0ad2020-12-14 15:46:30 +0000334 <!--suppress UnresolvedMavenProperty -->
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100335 <argLine>${surefireArgLine}</argLine>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100336 <useFile>false</useFile>
337 <includes>
338 <include>**/*Spec.java</include>
339 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
340 </includes>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100341 <excludes>
danielhanrahanc72a0132024-02-09 17:40:18 +0000342 <!-- maven-failsafe-plugin will run performance tests in the integration-test module,
343 so performance tests will not affect Jacoco coverage (jacoco-report module is configured
344 to aggregate results from tests run with maven-surefire-plugin only) -->
345 <exclude>**/*PerfTest.java</exclude>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100346 </excludes>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200347 <environmentVariables>
348 <!--
349 disable privileged container usage to cleanup the test containers;
350 these will be removed automatically on jvm termination;
351 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
352 -->
353 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
Renu Kumariff52b942021-05-27 23:16:32 -0400354 <TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>${docker.pull.registry}/</TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200355 </environmentVariables>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100356 </configuration>
357 </plugin>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100358 <plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100359 <groupId>org.jacoco</groupId>
360 <artifactId>jacoco-maven-plugin</artifactId>
egernug2b8268f2023-07-03 10:09:09 +0100361 <version>0.8.10</version>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400362 <configuration>
ToineSiebelink7fcffe52023-07-24 12:23:05 +0100363 <!--All exclusions below are referring to generated code-->
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400364 <excludes>
ToineSiebelink73001f62021-09-17 15:07:38 +0100365 <exclude>org/onap/cps/event/model/*</exclude>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400366 <exclude>org/onap/cps/rest/model/*</exclude>
367 <exclude>org/onap/cps/cpspath/parser/antlr4/*</exclude>
DylanB95EST4f4178c2021-07-02 13:30:42 +0100368 <exclude>org/onap/cps/ncmp/rest/model/*</exclude>
ToineSiebelink7fcffe52023-07-24 12:23:05 +0100369 <exclude>org/onap/cps/**/*MapperImpl.class</exclude>
370 <exclude>org/onap/cps/ncmp/rest/stub/*</exclude>
ToineSiebelinkd7914bc2024-07-04 15:15:36 +0100371 <exclude>org/onap/cps/policyexecutor/stub/model/*</exclude>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400372 </excludes>
373 </configuration>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100374 <executions>
375 <execution>
376 <id>default-prepare-agent</id>
377 <goals>
378 <goal>prepare-agent</goal>
379 </goals>
380 </execution>
381 <execution>
382 <id>coverage-check</id>
383 <goals>
384 <goal>check</goal>
385 </goals>
386 <configuration>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100387 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100388 <rules>
389 <rule>
390 <element>BUNDLE</element>
391 <limits>
392 <limit>
393 <counter>INSTRUCTION</counter>
394 <value>COVEREDRATIO</value>
395 <minimum>${minimum-coverage}</minimum>
396 </limit>
397 </limits>
398 </rule>
399 </rules>
400 </configuration>
401 </execution>
402 </executions>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100403 </plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100404 <plugin>
405 <groupId>com.github.spotbugs</groupId>
406 <artifactId>spotbugs-maven-plugin</artifactId>
407 </plugin>
Claudio David Gasparini7492aea2021-01-13 08:34:00 +0100408 <plugin>
409 <groupId>org.sonarsource.scanner.maven</groupId>
410 <artifactId>sonar-maven-plugin</artifactId>
egernug2b8268f2023-07-03 10:09:09 +0100411 <version>3.9.1.2184</version>
Claudio David Gasparini7492aea2021-01-13 08:34:00 +0100412 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100413 </plugins>
414 </build>
Rishi.Chail75729072021-04-08 14:23:32 +0100415</project>