1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START=======================================================
4 Copyright (c) 2021 Pantheon.tech.
5 Modifications Copyright (C) 2021 Bell Canada.
6 Modifications Copyright (C) 2021-2024 Nordix Foundation.
7 ================================================================================
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
12 http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
22 <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">
26 <groupId>org.onap.oparent</groupId>
27 <artifactId>oparent</artifactId>
28 <version>3.2.0</version>
31 <modelVersion>4.0.0</modelVersion>
33 <groupId>org.onap.cps</groupId>
34 <artifactId>cps-parent</artifactId>
35 <version>3.4.7-SNAPSHOT</version>
36 <packaging>pom</packaging>
39 <app>org.onap.cps.Application</app>
40 <java.version>17</java.version>
41 <minimum-coverage>1.00</minimum-coverage>
42 <postgres.version>42.5.1</postgres.version>
44 <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
45 <sonar.coverage.jacoco.xmlReportPaths>
46 ../jacoco-report/target/site/jacoco-aggregate/jacoco.xml
47 </sonar.coverage.jacoco.xmlReportPaths>
48 <parent.directory>${project.basedir}/..</parent.directory>
49 <maven.compiler.release>17</maven.compiler.release>
57 <family>Windows</family>
61 <script.executor>python</script.executor>
72 <script.executor>python3</script.executor>
77 <dependencyManagement>
80 <groupId>org.onap.cps</groupId>
81 <artifactId>cps-dependencies</artifactId>
82 <version>${project.version}</version>
87 <groupId>org.onap.cps</groupId>
88 <artifactId>cps-bom</artifactId>
89 <version>${project.version}</version>
94 </dependencyManagement>
99 <directory>src/main/resources</directory>
100 <filtering>true</filtering>
103 <directory>target/generated-sources/license</directory>
105 <include>third-party-licenses.txt</include>
109 <directory>target/generated-resources/licenses</directory>
111 <include>*.*</include>
113 <targetPath>third-party-licenses</targetPath>
119 <groupId>org.springframework.boot</groupId>
120 <artifactId>spring-boot-maven-plugin</artifactId>
121 <version>3.1.2</version>
125 <goal>build-info</goal>
126 <goal>repackage</goal>
132 <groupId>org.apache.maven.plugins</groupId>
133 <artifactId>maven-surefire-plugin</artifactId>
134 <version>3.0.0-M5</version>
136 <!-- Swagger code generation. -->
138 <groupId>io.swagger.codegen.v3</groupId>
139 <artifactId>swagger-codegen-maven-plugin</artifactId>
142 <id>openapi-yaml-gen</id>
144 <goal>generate</goal>
146 <phase>compile</phase>
148 <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
149 <language>openapi-yaml</language>
155 <groupId>com.github.spotbugs</groupId>
156 <artifactId>spotbugs-maven-plugin</artifactId>
157 <version>4.4.2</version>
160 <groupId>com.github.spotbugs</groupId>
161 <artifactId>spotbugs</artifactId>
162 <version>4.2.3</version>
165 <groupId>${project.groupId}</groupId>
166 <artifactId>spotbugs</artifactId>
167 <version>${project.version}</version>
170 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
171 <groupId>org.slf4j</groupId>
172 <artifactId>slf4j-simple</artifactId>
173 <version>2.0.6</version>
179 <groupId>jp.skypencil.findbugs.slf4j</groupId>
180 <artifactId>bug-pattern</artifactId>
181 <version>1.5.0</version>
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
189 <addSourceDirs>true</addSourceDirs>
191 <!-- Reports all bugs (other values are medium and max) -->
192 <threshold>Low</threshold>
193 <!-- Build doesn't fail if problems are found -->
194 <failOnError>true</failOnError>
195 <!-- 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>
204 Ensures that SpotBugs inspects source code when project is compiled.
207 <id>analyze-compile</id>
208 <phase>compile</phase>
216 <groupId>org.jsonschema2pojo</groupId>
217 <artifactId>jsonschema2pojo-maven-plugin</artifactId>
218 <version>1.2.1</version>
220 <targetVersion>${java.version}</targetVersion>
225 <goal>generate</goal>
234 <groupId>org.apache.maven.plugins</groupId>
235 <artifactId>maven-compiler-plugin</artifactId>
236 <version>3.11.0</version>
239 <groupId>org.apache.maven.plugins</groupId>
240 <artifactId>maven-checkstyle-plugin</artifactId>
243 <id>onap-license</id>
247 <phase>process-sources</phase>
249 <configLocation>onap-checkstyle/check-license.xml</configLocation>
250 <includeResources>false</includeResources>
251 <includeTestSourceDirectory>true</includeTestSourceDirectory>
252 <includeTestResources>false</includeTestResources>
254 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
256 <consoleOutput>false</consoleOutput>
257 <violationSeverity>warning</violationSeverity>
258 <failOnViolation>true</failOnViolation>
262 <id>onap-java-style</id>
266 <phase>process-sources</phase>
268 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
270 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
272 <includeResources>true</includeResources>
273 <includeTestSourceDirectory>true</includeTestSourceDirectory>
274 <includeTestResources>true</includeTestResources>
275 <consoleOutput>false</consoleOutput>
276 <violationSeverity>warning</violationSeverity>
277 <failOnViolation>true</failOnViolation>
281 <id>cps-java-style</id>
285 <phase>process-sources</phase>
287 <configLocation>cps-java-style.xml</configLocation>
289 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
291 <includeResources>true</includeResources>
292 <includeTestSourceDirectory>true</includeTestSourceDirectory>
293 <includeTestResources>true</includeTestResources>
294 <consoleOutput>true</consoleOutput>
295 <violationSeverity>warning</violationSeverity>
296 <failOnViolation>true</failOnViolation>
302 <groupId>org.onap.oparent</groupId>
303 <artifactId>checkstyle</artifactId>
304 <version>3.2.0</version>
307 <groupId>${project.groupId}</groupId>
308 <artifactId>checkstyle</artifactId>
309 <version>${project.version}</version>
313 <!-- Mandatory plugins for using Spock -->
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>
323 <goal>compileTests</goal>
328 <!-- Required because names of spec classes don't match default
329 Surefire patterns (`*Test` etc.) -->
331 <groupId>org.apache.maven.plugins</groupId>
332 <artifactId>maven-surefire-plugin</artifactId>
334 <!--suppress UnresolvedMavenProperty -->
335 <argLine>${surefireArgLine}</argLine>
336 <useFile>false</useFile>
338 <include>**/*Spec.java</include>
339 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
342 <!-- 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>
347 <environmentVariables>
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
353 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
354 <TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>${docker.pull.registry}/</TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>
355 </environmentVariables>
359 <groupId>org.jacoco</groupId>
360 <artifactId>jacoco-maven-plugin</artifactId>
361 <version>0.8.10</version>
363 <!--All exclusions below are referring to generated code-->
365 <exclude>org/onap/cps/event/model/*</exclude>
366 <exclude>org/onap/cps/rest/model/*</exclude>
367 <exclude>org/onap/cps/cpspath/parser/antlr4/*</exclude>
368 <exclude>org/onap/cps/ncmp/rest/model/*</exclude>
369 <exclude>org/onap/cps/**/*MapperImpl.class</exclude>
370 <exclude>org/onap/cps/ncmp/rest/stub/*</exclude>
375 <id>default-prepare-agent</id>
377 <goal>prepare-agent</goal>
381 <id>coverage-check</id>
386 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
389 <element>BUNDLE</element>
392 <counter>INSTRUCTION</counter>
393 <value>COVEREDRATIO</value>
394 <minimum>${minimum-coverage}</minimum>
404 <groupId>com.github.spotbugs</groupId>
405 <artifactId>spotbugs-maven-plugin</artifactId>
408 <groupId>org.sonarsource.scanner.maven</groupId>
409 <artifactId>sonar-maven-plugin</artifactId>
410 <version>3.9.1.2184</version>
413 <groupId>org.codehaus.mojo</groupId>
414 <artifactId>exec-maven-plugin</artifactId>
415 <version>1.6.0</version>
418 <id>generate-csv</id>
419 <phase>prepare-package</phase>
426 <executable>${script.executor}</executable>
427 <workingDirectory>${parent.directory}/cps-ri/src/main/resources/</workingDirectory>
429 <argument>yangResourceCsvGenerator.py</argument>
430 <argument>dmi-registry@2021-12-13</argument>
431 <argument>dmi-registry@2022-02-10</argument>
432 <argument>dmi-registry@2022-05-10</argument>