blob: b52db7cde608d4d8dd7ba7f0bddada8041496a80 [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.
lukegleeson0cbc4482022-02-10 10:58:29 +00006 Modifications Copyright (C) 2021-2022 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>
Bruno Sakoto0d7bf692022-03-16 17:14:39 -040035 <version>3.0.1-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>
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>
ToineSiebelink73001f62021-09-17 15:07:38 +010045 ../jacoco-report/target/site/jacoco-aggregate/jacoco.xml
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010046 </sonar.coverage.jacoco.xmlReportPaths>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010047 </properties>
48
DylanB95EST63132ce2021-12-14 16:34:38 +000049 <profiles>
50 <profile>
51 <id>Windows</id>
52 <activation>
53 <os>
54 <family>Windows</family>
55 </os>
56 </activation>
57 <properties>
58 <script.executor>python</script.executor>
59 </properties>
60 </profile>
61 <profile>
62 <id>unix</id>
63 <activation>
64 <os>
65 <family>unix</family>
66 </os>
67 </activation>
68 <properties>
69 <script.executor>python3</script.executor>
70 </properties>
71 </profile>
72 </profiles>
73
Claudio David Gasparini70c17022020-10-26 10:12:10 +010074 <dependencyManagement>
75 <dependencies>
76 <dependency>
77 <groupId>org.onap.cps</groupId>
78 <artifactId>cps-dependencies</artifactId>
79 <version>${project.version}</version>
80 <type>pom</type>
81 <scope>import</scope>
82 </dependency>
83 <dependency>
84 <groupId>org.onap.cps</groupId>
85 <artifactId>cps-bom</artifactId>
86 <version>${project.version}</version>
87 <type>pom</type>
88 <scope>import</scope>
89 </dependency>
90 </dependencies>
91 </dependencyManagement>
92
93 <build>
94 <resources>
95 <resource>
96 <directory>src/main/resources</directory>
97 <filtering>true</filtering>
98 </resource>
99 <resource>
100 <directory>target/generated-sources/license</directory>
101 <includes>
102 <include>third-party-licenses.txt</include>
103 </includes>
104 </resource>
105 <resource>
106 <directory>target/generated-resources/licenses</directory>
107 <includes>
108 <include>*.*</include>
109 </includes>
110 <targetPath>third-party-licenses</targetPath>
111 </resource>
112 </resources>
113 <pluginManagement>
114 <plugins>
115 <plugin>
116 <groupId>org.springframework.boot</groupId>
117 <artifactId>spring-boot-maven-plugin</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100118 <version>2.3.3.RELEASE</version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100119 <executions>
120 <execution>
121 <goals>
Ruslan Kashapovf4d1c982020-10-29 11:39:31 +0200122 <goal>build-info</goal>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100123 <goal>repackage</goal>
124 </goals>
125 </execution>
126 </executions>
127 </plugin>
Bruno Sakoto6c347182021-07-22 15:25:23 -0400128 <plugin>
129 <groupId>org.apache.maven.plugins</groupId>
130 <artifactId>maven-surefire-plugin</artifactId>
131 <version>3.0.0-M5</version>
132 </plugin>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000133 <!-- Swagger code generation. -->
134 <plugin>
135 <groupId>io.swagger.codegen.v3</groupId>
136 <artifactId>swagger-codegen-maven-plugin</artifactId>
JosephKeenanbe215952021-08-03 18:24:32 +0100137 <version>3.0.27</version>
Renu Kumari4d520012021-08-30 11:50:43 -0400138 <executions>
139 <execution>
140 <id>openapi-yaml-gen</id>
141 <goals>
142 <goal>generate</goal>
143 </goals>
144 <phase>compile</phase>
145 <configuration>
146 <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
147 <language>openapi-yaml</language>
148 </configuration>
149 </execution>
150 </executions>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000151 </plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100152 <plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100153 <groupId>com.github.spotbugs</groupId>
154 <artifactId>spotbugs-maven-plugin</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100155 <version>4.1.3</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100156 <dependencies>
157 <dependency>
158 <groupId>com.github.spotbugs</groupId>
159 <artifactId>spotbugs</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100160 <version>4.2.0</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100161 </dependency>
162 <dependency>
163 <groupId>${project.groupId}</groupId>
164 <artifactId>spotbugs</artifactId>
165 <version>${project.version}</version>
166 </dependency>
167 <dependency>
168 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
169 <groupId>org.slf4j</groupId>
170 <artifactId>slf4j-simple</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100171 <version>1.8.0-beta4</version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100172 </dependency>
173 </dependencies>
174 <configuration>
175 <plugins>
176 <plugin>
177 <groupId>jp.skypencil.findbugs.slf4j</groupId>
178 <artifactId>bug-pattern</artifactId>
179 <version>1.5.0</version>
180 </plugin>
181 </plugins>
182 <!--
183 Enables analysis which takes more memory but finds more bugs.
184 If you run out of memory, changes the value of the effort element
185 to 'Low'.
186 -->
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400187 <addSourceDirs>true</addSourceDirs>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100188 <effort>Max</effort>
189 <!-- Reports all bugs (other values are medium and max) -->
190 <threshold>Low</threshold>
191 <!-- Build doesn't fail if problems are found -->
Claudio David Gasparini9afc8d12021-01-11 16:42:30 +0100192 <failOnError>true</failOnError>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100193 <!-- References the excluded rules -->
194 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
195 <!-- Produces XML report -->
196 <xmlOutput>true</xmlOutput>
197 <!-- Configures the directory in which the XML report is created -->
198 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
199 </configuration>
200 <executions>
201 <!--
202 Ensures that SpotBugs inspects source code when project is compiled.
203 -->
204 <execution>
205 <id>analyze-compile</id>
206 <phase>compile</phase>
207 <goals>
208 <goal>check</goal>
209 </goals>
210 </execution>
211 </executions>
212 </plugin>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400213 <plugin>
214 <groupId>org.jsonschema2pojo</groupId>
215 <artifactId>jsonschema2pojo-maven-plugin</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100216 <version>1.1.1</version>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400217 <configuration>
218 <targetVersion>${java.version}</targetVersion>
219 </configuration>
220 <executions>
221 <execution>
222 <goals>
223 <goal>generate</goal>
224 </goals>
225 </execution>
226 </executions>
227 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100228 </plugins>
229 </pluginManagement>
230 <plugins>
231 <plugin>
232 <groupId>org.apache.maven.plugins</groupId>
233 <artifactId>maven-compiler-plugin</artifactId>
234 <configuration>
235 <source>${java.version}</source>
236 <target>${java.version}</target>
237 </configuration>
238 </plugin>
239 <plugin>
240 <groupId>org.apache.maven.plugins</groupId>
241 <artifactId>maven-checkstyle-plugin</artifactId>
242 <executions>
243 <execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100244 <id>onap-license</id>
245 <goals>
246 <goal>check</goal>
247 </goals>
248 <phase>process-sources</phase>
249 <configuration>
250 <configLocation>onap-checkstyle/check-license.xml</configLocation>
251 <includeResources>false</includeResources>
252 <includeTestSourceDirectory>true</includeTestSourceDirectory>
253 <includeTestResources>false</includeTestResources>
254 <sourceDirectories>
255 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
256 </sourceDirectories>
257 <consoleOutput>false</consoleOutput>
258 <violationSeverity>warning</violationSeverity>
259 <failOnViolation>true</failOnViolation>
260 </configuration>
261 </execution>
262 <execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100263 <id>onap-java-style</id>
264 <goals>
265 <goal>check</goal>
266 </goals>
267 <phase>process-sources</phase>
268 <configuration>
269 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100270 <sourceDirectories>
271 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
272 </sourceDirectories>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100273 <includeResources>true</includeResources>
274 <includeTestSourceDirectory>true</includeTestSourceDirectory>
275 <includeTestResources>true</includeTestResources>
276 <consoleOutput>false</consoleOutput>
277 <violationSeverity>warning</violationSeverity>
278 <failOnViolation>true</failOnViolation>
279 </configuration>
280 </execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100281 <execution>
282 <id>cps-java-style</id>
283 <goals>
284 <goal>check</goal>
285 </goals>
286 <phase>process-sources</phase>
287 <configuration>
288 <configLocation>cps-java-style.xml</configLocation>
289 <sourceDirectories>
290 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
291 </sourceDirectories>
292 <includeResources>true</includeResources>
293 <includeTestSourceDirectory>true</includeTestSourceDirectory>
294 <includeTestResources>true</includeTestResources>
295 <consoleOutput>true</consoleOutput>
296 <violationSeverity>warning</violationSeverity>
297 <failOnViolation>true</failOnViolation>
298 </configuration>
299 </execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100300 </executions>
301 <dependencies>
302 <dependency>
303 <groupId>org.onap.oparent</groupId>
304 <artifactId>checkstyle</artifactId>
shivasubedi34c30f82021-07-07 16:30:36 +0100305 <version>3.1.0</version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100306 </dependency>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100307 <dependency>
308 <groupId>${project.groupId}</groupId>
309 <artifactId>checkstyle</artifactId>
310 <version>${project.version}</version>
311 </dependency>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100312 </dependencies>
313 </plugin>
314 <!-- Mandatory plugins for using Spock -->
315 <plugin>
316 <!-- The gmavenplus plugin is used to compile Groovy code.
317 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
318 <groupId>org.codehaus.gmavenplus</groupId>
319 <artifactId>gmavenplus-plugin</artifactId>
320 <version>1.9.0</version>
321 <executions>
322 <execution>
323 <goals>
324 <goal>compileTests</goal>
325 </goals>
326 </execution>
327 </executions>
328 </plugin>
329 <!-- Required because names of spec classes don't match default
330 Surefire patterns (`*Test` etc.) -->
331 <plugin>
332 <groupId>org.apache.maven.plugins</groupId>
333 <artifactId>maven-surefire-plugin</artifactId>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100334 <configuration>
puthuparambil.aditya008c0ad2020-12-14 15:46:30 +0000335 <!--suppress UnresolvedMavenProperty -->
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100336 <argLine>${surefireArgLine}</argLine>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100337 <useFile>false</useFile>
338 <includes>
339 <include>**/*Spec.java</include>
340 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
341 </includes>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100342 <excludes>
343 <exclude>**/IT*.java</exclude>
344 </excludes>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200345 <environmentVariables>
346 <!--
347 disable privileged container usage to cleanup the test containers;
348 these will be removed automatically on jvm termination;
349 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
350 -->
351 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
Renu Kumariff52b942021-05-27 23:16:32 -0400352 <TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>${docker.pull.registry}/</TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200353 </environmentVariables>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100354 </configuration>
355 </plugin>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100356 <plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100357 <groupId>org.jacoco</groupId>
358 <artifactId>jacoco-maven-plugin</artifactId>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400359 <configuration>
360 <excludes>
ToineSiebelink73001f62021-09-17 15:07:38 +0100361 <exclude>org/onap/cps/event/model/*</exclude>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400362 <exclude>org/onap/cps/rest/model/*</exclude>
363 <exclude>org/onap/cps/cpspath/parser/antlr4/*</exclude>
DylanB95EST4f4178c2021-07-02 13:30:42 +0100364 <exclude>org/onap/cps/ncmp/rest/model/*</exclude>
Bruno Sakotof549c7c2021-05-18 16:02:30 -0400365 </excludes>
366 </configuration>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100367 <executions>
368 <execution>
369 <id>default-prepare-agent</id>
370 <goals>
371 <goal>prepare-agent</goal>
372 </goals>
373 </execution>
374 <execution>
375 <id>coverage-check</id>
376 <goals>
377 <goal>check</goal>
378 </goals>
379 <configuration>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100380 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100381 <rules>
382 <rule>
383 <element>BUNDLE</element>
384 <limits>
385 <limit>
386 <counter>INSTRUCTION</counter>
387 <value>COVEREDRATIO</value>
388 <minimum>${minimum-coverage}</minimum>
389 </limit>
390 </limits>
391 </rule>
392 </rules>
393 </configuration>
394 </execution>
395 </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>
DylanB95EST63132ce2021-12-14 16:34:38 +0000405 <plugin>
406 <groupId>org.codehaus.mojo</groupId>
407 <artifactId>exec-maven-plugin</artifactId>
408 <version>1.6.0</version>
409 <executions>
410 <execution>
411 <id>generate-csv</id>
412 <phase>prepare-package</phase>
413 <goals>
414 <goal>exec</goal>
415 </goals>
416 </execution>
417 </executions>
418 <configuration>
419 <executable>${script.executor}</executable>
420 <workingDirectory>../cps-ri/src/main/resources/</workingDirectory>
421 <arguments>
422 <argument>yangResourceCsvGenerator.py</argument>
423 <argument>dmi-registry@2021-12-13</argument>
lukegleeson0cbc4482022-02-10 10:58:29 +0000424 <argument>dmi-registry@2022-02-10</argument>
DylanB95EST63132ce2021-12-14 16:34:38 +0000425 </arguments>
426 </configuration>
427 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100428 </plugins>
429 </build>
Rishi.Chail75729072021-04-08 14:23:32 +0100430</project>