blob: be62a4c5de8c7054774ab672e977e6530e44c3c9 [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.
lukegleeson7e243c92023-04-20 15:32:12 +01006 Modifications Copyright (C) 2021-2023 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>
danielhanrahan19f963b2023-06-15 13:52:34 +010035 <version>3.3.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>
Bruno Sakotof549c7c2021-05-18 16:02:30 -040040 <java.version>11</java.version>
ToineSiebelink73001f62021-09-17 15:07:38 +010041 <minimum-coverage>0.97</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>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010049 </properties>
50
DylanB95EST63132ce2021-12-14 16:34:38 +000051 <profiles>
52 <profile>
53 <id>Windows</id>
54 <activation>
55 <os>
56 <family>Windows</family>
57 </os>
58 </activation>
59 <properties>
60 <script.executor>python</script.executor>
61 </properties>
62 </profile>
63 <profile>
64 <id>unix</id>
65 <activation>
66 <os>
67 <family>unix</family>
68 </os>
69 </activation>
70 <properties>
71 <script.executor>python3</script.executor>
72 </properties>
73 </profile>
74 </profiles>
75
Claudio David Gasparini70c17022020-10-26 10:12:10 +010076 <dependencyManagement>
77 <dependencies>
78 <dependency>
79 <groupId>org.onap.cps</groupId>
80 <artifactId>cps-dependencies</artifactId>
81 <version>${project.version}</version>
82 <type>pom</type>
83 <scope>import</scope>
84 </dependency>
85 <dependency>
86 <groupId>org.onap.cps</groupId>
87 <artifactId>cps-bom</artifactId>
88 <version>${project.version}</version>
89 <type>pom</type>
90 <scope>import</scope>
91 </dependency>
92 </dependencies>
93 </dependencyManagement>
94
95 <build>
96 <resources>
97 <resource>
98 <directory>src/main/resources</directory>
99 <filtering>true</filtering>
100 </resource>
101 <resource>
102 <directory>target/generated-sources/license</directory>
103 <includes>
104 <include>third-party-licenses.txt</include>
105 </includes>
106 </resource>
107 <resource>
108 <directory>target/generated-resources/licenses</directory>
109 <includes>
110 <include>*.*</include>
111 </includes>
112 <targetPath>third-party-licenses</targetPath>
113 </resource>
114 </resources>
115 <pluginManagement>
116 <plugins>
117 <plugin>
118 <groupId>org.springframework.boot</groupId>
119 <artifactId>spring-boot-maven-plugin</artifactId>
JosephKeenan274d1612022-03-23 15:01:33 +0000120 <version>2.6.4</version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100121 <executions>
122 <execution>
123 <goals>
Ruslan Kashapovf4d1c982020-10-29 11:39:31 +0200124 <goal>build-info</goal>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100125 <goal>repackage</goal>
126 </goals>
127 </execution>
128 </executions>
129 </plugin>
Bruno Sakoto6c347182021-07-22 15:25:23 -0400130 <plugin>
131 <groupId>org.apache.maven.plugins</groupId>
132 <artifactId>maven-surefire-plugin</artifactId>
133 <version>3.0.0-M5</version>
134 </plugin>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000135 <!-- Swagger code generation. -->
136 <plugin>
137 <groupId>io.swagger.codegen.v3</groupId>
138 <artifactId>swagger-codegen-maven-plugin</artifactId>
Renu Kumari4d520012021-08-30 11:50:43 -0400139 <executions>
140 <execution>
141 <id>openapi-yaml-gen</id>
142 <goals>
143 <goal>generate</goal>
144 </goals>
145 <phase>compile</phase>
146 <configuration>
147 <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
148 <language>openapi-yaml</language>
149 </configuration>
150 </execution>
151 </executions>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000152 </plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100153 <plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100154 <groupId>com.github.spotbugs</groupId>
155 <artifactId>spotbugs-maven-plugin</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100156 <version>4.1.3</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100157 <dependencies>
158 <dependency>
159 <groupId>com.github.spotbugs</groupId>
160 <artifactId>spotbugs</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100161 <version>4.2.0</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100162 </dependency>
163 <dependency>
164 <groupId>${project.groupId}</groupId>
165 <artifactId>spotbugs</artifactId>
166 <version>${project.version}</version>
167 </dependency>
168 <dependency>
169 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
170 <groupId>org.slf4j</groupId>
171 <artifactId>slf4j-simple</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100172 <version>1.8.0-beta4</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100173 </dependency>
174 </dependencies>
175 <configuration>
176 <plugins>
177 <plugin>
178 <groupId>jp.skypencil.findbugs.slf4j</groupId>
179 <artifactId>bug-pattern</artifactId>
180 <version>1.5.0</version>
181 </plugin>
182 </plugins>
183 <!--
184 Enables analysis which takes more memory but finds more bugs.
185 If you run out of memory, changes the value of the effort element
186 to 'Low'.
187 -->
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400188 <addSourceDirs>true</addSourceDirs>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100189 <effort>Max</effort>
190 <!-- Reports all bugs (other values are medium and max) -->
191 <threshold>Low</threshold>
192 <!-- Build doesn't fail if problems are found -->
Claudio David Gasparini9afc8d12021-01-11 16:42:30 +0100193 <failOnError>true</failOnError>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100194 <!-- References the excluded rules -->
195 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
196 <!-- Produces XML report -->
197 <xmlOutput>true</xmlOutput>
198 <!-- Configures the directory in which the XML report is created -->
199 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
200 </configuration>
201 <executions>
202 <!--
203 Ensures that SpotBugs inspects source code when project is compiled.
204 -->
205 <execution>
206 <id>analyze-compile</id>
207 <phase>compile</phase>
208 <goals>
209 <goal>check</goal>
210 </goals>
211 </execution>
212 </executions>
213 </plugin>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400214 <plugin>
215 <groupId>org.jsonschema2pojo</groupId>
216 <artifactId>jsonschema2pojo-maven-plugin</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100217 <version>1.1.1</version>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400218 <configuration>
219 <targetVersion>${java.version}</targetVersion>
220 </configuration>
221 <executions>
222 <execution>
223 <goals>
224 <goal>generate</goal>
225 </goals>
226 </execution>
227 </executions>
228 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100229 </plugins>
230 </pluginManagement>
231 <plugins>
232 <plugin>
233 <groupId>org.apache.maven.plugins</groupId>
234 <artifactId>maven-compiler-plugin</artifactId>
235 <configuration>
236 <source>${java.version}</source>
237 <target>${java.version}</target>
238 </configuration>
239 </plugin>
240 <plugin>
241 <groupId>org.apache.maven.plugins</groupId>
242 <artifactId>maven-checkstyle-plugin</artifactId>
243 <executions>
244 <execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100245 <id>onap-license</id>
246 <goals>
247 <goal>check</goal>
248 </goals>
249 <phase>process-sources</phase>
250 <configuration>
251 <configLocation>onap-checkstyle/check-license.xml</configLocation>
252 <includeResources>false</includeResources>
253 <includeTestSourceDirectory>true</includeTestSourceDirectory>
254 <includeTestResources>false</includeTestResources>
255 <sourceDirectories>
256 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
257 </sourceDirectories>
258 <consoleOutput>false</consoleOutput>
259 <violationSeverity>warning</violationSeverity>
260 <failOnViolation>true</failOnViolation>
261 </configuration>
262 </execution>
263 <execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100264 <id>onap-java-style</id>
265 <goals>
266 <goal>check</goal>
267 </goals>
268 <phase>process-sources</phase>
269 <configuration>
270 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100271 <sourceDirectories>
272 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
273 </sourceDirectories>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100274 <includeResources>true</includeResources>
275 <includeTestSourceDirectory>true</includeTestSourceDirectory>
276 <includeTestResources>true</includeTestResources>
277 <consoleOutput>false</consoleOutput>
278 <violationSeverity>warning</violationSeverity>
279 <failOnViolation>true</failOnViolation>
280 </configuration>
281 </execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100282 <execution>
283 <id>cps-java-style</id>
284 <goals>
285 <goal>check</goal>
286 </goals>
287 <phase>process-sources</phase>
288 <configuration>
289 <configLocation>cps-java-style.xml</configLocation>
290 <sourceDirectories>
291 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
292 </sourceDirectories>
293 <includeResources>true</includeResources>
294 <includeTestSourceDirectory>true</includeTestSourceDirectory>
295 <includeTestResources>true</includeTestResources>
296 <consoleOutput>true</consoleOutput>
297 <violationSeverity>warning</violationSeverity>
298 <failOnViolation>true</failOnViolation>
299 </configuration>
300 </execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100301 </executions>
302 <dependencies>
303 <dependency>
304 <groupId>org.onap.oparent</groupId>
305 <artifactId>checkstyle</artifactId>
ToineSiebelinka0bbb4e2023-04-19 12:04:50 +0100306 <version>3.2.0</version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100307 </dependency>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100308 <dependency>
309 <groupId>${project.groupId}</groupId>
310 <artifactId>checkstyle</artifactId>
311 <version>${project.version}</version>
312 </dependency>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100313 </dependencies>
314 </plugin>
315 <!-- Mandatory plugins for using Spock -->
316 <plugin>
317 <!-- The gmavenplus plugin is used to compile Groovy code.
318 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
319 <groupId>org.codehaus.gmavenplus</groupId>
320 <artifactId>gmavenplus-plugin</artifactId>
321 <version>1.9.0</version>
322 <executions>
323 <execution>
324 <goals>
325 <goal>compileTests</goal>
326 </goals>
327 </execution>
328 </executions>
329 </plugin>
330 <!-- Required because names of spec classes don't match default
331 Surefire patterns (`*Test` etc.) -->
332 <plugin>
333 <groupId>org.apache.maven.plugins</groupId>
334 <artifactId>maven-surefire-plugin</artifactId>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100335 <configuration>
puthuparambil.aditya008c0ad2020-12-14 15:46:30 +0000336 <!--suppress UnresolvedMavenProperty -->
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100337 <argLine>${surefireArgLine}</argLine>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100338 <useFile>false</useFile>
339 <includes>
340 <include>**/*Spec.java</include>
341 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
342 </includes>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100343 <excludes>
344 <exclude>**/IT*.java</exclude>
345 </excludes>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200346 <environmentVariables>
347 <!--
348 disable privileged container usage to cleanup the test containers;
349 these will be removed automatically on jvm termination;
350 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
351 -->
352 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
Renu Kumariff52b942021-05-27 23:16:32 -0400353 <TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>${docker.pull.registry}/</TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200354 </environmentVariables>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100355 </configuration>
356 </plugin>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100357 <plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100358 <groupId>org.jacoco</groupId>
359 <artifactId>jacoco-maven-plugin</artifactId>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400360 <configuration>
361 <excludes>
ToineSiebelink73001f62021-09-17 15:07:38 +0100362 <exclude>org/onap/cps/event/model/*</exclude>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400363 <exclude>org/onap/cps/rest/model/*</exclude>
364 <exclude>org/onap/cps/cpspath/parser/antlr4/*</exclude>
DylanB95EST4f4178c2021-07-02 13:30:42 +0100365 <exclude>org/onap/cps/ncmp/rest/model/*</exclude>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400366 </excludes>
367 </configuration>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100368 <executions>
369 <execution>
370 <id>default-prepare-agent</id>
371 <goals>
372 <goal>prepare-agent</goal>
373 </goals>
374 </execution>
375 <execution>
376 <id>coverage-check</id>
377 <goals>
378 <goal>check</goal>
379 </goals>
380 <configuration>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100381 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100382 <rules>
383 <rule>
384 <element>BUNDLE</element>
385 <limits>
386 <limit>
387 <counter>INSTRUCTION</counter>
388 <value>COVEREDRATIO</value>
389 <minimum>${minimum-coverage}</minimum>
390 </limit>
391 </limits>
392 </rule>
393 </rules>
394 </configuration>
395 </execution>
396 </executions>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100397 </plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100398 <plugin>
399 <groupId>com.github.spotbugs</groupId>
400 <artifactId>spotbugs-maven-plugin</artifactId>
401 </plugin>
Claudio David Gasparini7492aea2021-01-13 08:34:00 +0100402 <plugin>
403 <groupId>org.sonarsource.scanner.maven</groupId>
404 <artifactId>sonar-maven-plugin</artifactId>
405 </plugin>
DylanB95EST63132ce2021-12-14 16:34:38 +0000406 <plugin>
407 <groupId>org.codehaus.mojo</groupId>
408 <artifactId>exec-maven-plugin</artifactId>
409 <version>1.6.0</version>
410 <executions>
411 <execution>
412 <id>generate-csv</id>
413 <phase>prepare-package</phase>
414 <goals>
415 <goal>exec</goal>
416 </goals>
417 </execution>
418 </executions>
419 <configuration>
420 <executable>${script.executor}</executable>
waqas.ikramcb0256d2023-06-16 13:05:04 +0100421 <workingDirectory>${parent.directory}/cps-ri/src/main/resources/</workingDirectory>
DylanB95EST63132ce2021-12-14 16:34:38 +0000422 <arguments>
423 <argument>yangResourceCsvGenerator.py</argument>
424 <argument>dmi-registry@2021-12-13</argument>
lukegleeson0cbc4482022-02-10 10:58:29 +0000425 <argument>dmi-registry@2022-02-10</argument>
Lathishba6d14f2022-05-10 10:41:05 +0100426 <argument>dmi-registry@2022-05-10</argument>
DylanB95EST63132ce2021-12-14 16:34:38 +0000427 </arguments>
428 </configuration>
429 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100430 </plugins>
431 </build>
Rishi.Chail75729072021-04-08 14:23:32 +0100432</project>