blob: 3552c28c9682bcee567e9fac601b55329c36d77b [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>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010040 <java.version>11</java.version>
Claudio David Gasparini3e38d762021-01-15 14:08:34 +010041 <minimum-coverage>0.9</minimum-coverage>
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010042 <nexusproxy>https://nexus.onap.org</nexusproxy>
Renu Kumaribd35b4d2021-05-17 07:16:48 -040043 <docker.repository.push>nexus3.onap.org:10003/</docker.repository.push>
44 <docker.repository.pull>nexus3.onap.org:10001/</docker.repository.pull>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010045 <oparent.version>3.1.0</oparent.version>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +010046 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010047 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +010048 <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010049 <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +010050 <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
51 <spotbugs.bug-pattern.version>1.5.0</spotbugs.bug-pattern.version>
52 <spotbugs.version>4.2.0</spotbugs.version>
puthuparambil.aditya47598112020-11-02 11:31:39 +000053 <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010054 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010055
56 <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
57 <sonar.coverage.jacoco.xmlReportPaths>
58 ../cps-ri/target/site/jacoco-ut/jacoco.xml,
59 ../cps-ri/target/site/jacoco-aggregate/jacoco.xml,
60 ../cps-service/target/site/jacoco-ut/jacoco.xml,
61 ../cps-service/target/site/jacoco-aggregate/jacoco.xml,
62 ../cps-rest/target/site/jacoco-ut/jacoco.xml,
63 ../cps-rest/target/site/jacoco-aggregate/jacoco.xml,
tragait34a94b92021-03-30 12:02:27 +010064 ../cps-ncmp-rest/target/site/jacoco-ut/jacoco.xml,
65 ../cps-ncmp-rest/target/site/jacoco-aggregate/jacoco.xml,
Claudio D. Gasparinib77bf252021-01-28 15:36:37 +010066 ../cps-application/target/site/jacoco-ut/jacoco.xml,
67 ../cps-application/target/site/jacoco-aggregate/jacoco.xml
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010068 </sonar.coverage.jacoco.xmlReportPaths>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010069 </properties>
70
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010071 <distributionManagement>
72 <repository>
73 <id>ecomp-releases</id>
74 <name>ECOMP Release Repository</name>
75 <url>${nexusproxy}${releaseNexusPath}</url>
76 </repository>
77 <snapshotRepository>
78 <id>ecomp-snapshots</id>
79 <name>ECOMP Snapshot Repository</name>
80 <url>${nexusproxy}${snapshotNexusPath}</url>
81 </snapshotRepository>
82 </distributionManagement>
83
Claudio David Gasparini70c17022020-10-26 10:12:10 +010084 <dependencyManagement>
85 <dependencies>
86 <dependency>
87 <groupId>org.onap.cps</groupId>
88 <artifactId>cps-dependencies</artifactId>
89 <version>${project.version}</version>
90 <type>pom</type>
91 <scope>import</scope>
92 </dependency>
93 <dependency>
94 <groupId>org.onap.cps</groupId>
95 <artifactId>cps-bom</artifactId>
96 <version>${project.version}</version>
97 <type>pom</type>
98 <scope>import</scope>
99 </dependency>
100 </dependencies>
101 </dependencyManagement>
102
103 <build>
104 <resources>
105 <resource>
106 <directory>src/main/resources</directory>
107 <filtering>true</filtering>
108 </resource>
109 <resource>
110 <directory>target/generated-sources/license</directory>
111 <includes>
112 <include>third-party-licenses.txt</include>
113 </includes>
114 </resource>
115 <resource>
116 <directory>target/generated-resources/licenses</directory>
117 <includes>
118 <include>*.*</include>
119 </includes>
120 <targetPath>third-party-licenses</targetPath>
121 </resource>
122 </resources>
123 <pluginManagement>
124 <plugins>
125 <plugin>
126 <groupId>org.springframework.boot</groupId>
127 <artifactId>spring-boot-maven-plugin</artifactId>
128 <version>${spring-boot-maven-plugin.version}</version>
129 <executions>
130 <execution>
131 <goals>
Ruslan Kashapovf4d1c982020-10-29 11:39:31 +0200132 <goal>build-info</goal>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100133 <goal>repackage</goal>
134 </goals>
135 </execution>
136 </executions>
137 </plugin>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000138 <!-- Swagger code generation. -->
139 <plugin>
140 <groupId>io.swagger.codegen.v3</groupId>
141 <artifactId>swagger-codegen-maven-plugin</artifactId>
142 <version>${swagger-codegen-maven-plugin.version}</version>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000143 </plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100144 <plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100145 <groupId>com.github.spotbugs</groupId>
146 <artifactId>spotbugs-maven-plugin</artifactId>
147 <version>${spotbugs-maven-plugin.version}</version>
148 <dependencies>
149 <dependency>
150 <groupId>com.github.spotbugs</groupId>
151 <artifactId>spotbugs</artifactId>
152 <version>${spotbugs.version}</version>
153 </dependency>
154 <dependency>
155 <groupId>${project.groupId}</groupId>
156 <artifactId>spotbugs</artifactId>
157 <version>${project.version}</version>
158 </dependency>
159 <dependency>
160 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
161 <groupId>org.slf4j</groupId>
162 <artifactId>slf4j-simple</artifactId>
163 <version>${spotbugs.slf4j.version}</version>
164 </dependency>
165 </dependencies>
166 <configuration>
167 <plugins>
168 <plugin>
169 <groupId>jp.skypencil.findbugs.slf4j</groupId>
170 <artifactId>bug-pattern</artifactId>
171 <version>1.5.0</version>
172 </plugin>
173 </plugins>
174 <!--
175 Enables analysis which takes more memory but finds more bugs.
176 If you run out of memory, changes the value of the effort element
177 to 'Low'.
178 -->
179 <effort>Max</effort>
180 <!-- Reports all bugs (other values are medium and max) -->
181 <threshold>Low</threshold>
182 <!-- Build doesn't fail if problems are found -->
Claudio David Gasparini9afc8d12021-01-11 16:42:30 +0100183 <failOnError>true</failOnError>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100184 <!-- References the excluded rules -->
185 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
186 <!-- Produces XML report -->
187 <xmlOutput>true</xmlOutput>
188 <!-- Configures the directory in which the XML report is created -->
189 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
190 </configuration>
191 <executions>
192 <!--
193 Ensures that SpotBugs inspects source code when project is compiled.
194 -->
195 <execution>
196 <id>analyze-compile</id>
197 <phase>compile</phase>
198 <goals>
199 <goal>check</goal>
200 </goals>
201 </execution>
202 </executions>
203 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100204 </plugins>
205 </pluginManagement>
206 <plugins>
207 <plugin>
208 <groupId>org.apache.maven.plugins</groupId>
209 <artifactId>maven-compiler-plugin</artifactId>
210 <configuration>
211 <source>${java.version}</source>
212 <target>${java.version}</target>
213 </configuration>
214 </plugin>
215 <plugin>
216 <groupId>org.apache.maven.plugins</groupId>
217 <artifactId>maven-checkstyle-plugin</artifactId>
218 <executions>
219 <execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100220 <id>onap-license</id>
221 <goals>
222 <goal>check</goal>
223 </goals>
224 <phase>process-sources</phase>
225 <configuration>
226 <configLocation>onap-checkstyle/check-license.xml</configLocation>
227 <includeResources>false</includeResources>
228 <includeTestSourceDirectory>true</includeTestSourceDirectory>
229 <includeTestResources>false</includeTestResources>
230 <sourceDirectories>
231 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
232 </sourceDirectories>
233 <consoleOutput>false</consoleOutput>
234 <violationSeverity>warning</violationSeverity>
235 <failOnViolation>true</failOnViolation>
236 </configuration>
237 </execution>
238 <execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100239 <id>onap-java-style</id>
240 <goals>
241 <goal>check</goal>
242 </goals>
243 <phase>process-sources</phase>
244 <configuration>
245 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100246 <sourceDirectories>
247 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
248 </sourceDirectories>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100249 <includeResources>true</includeResources>
250 <includeTestSourceDirectory>true</includeTestSourceDirectory>
251 <includeTestResources>true</includeTestResources>
252 <consoleOutput>false</consoleOutput>
253 <violationSeverity>warning</violationSeverity>
254 <failOnViolation>true</failOnViolation>
255 </configuration>
256 </execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100257 <execution>
258 <id>cps-java-style</id>
259 <goals>
260 <goal>check</goal>
261 </goals>
262 <phase>process-sources</phase>
263 <configuration>
264 <configLocation>cps-java-style.xml</configLocation>
265 <sourceDirectories>
266 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
267 </sourceDirectories>
268 <includeResources>true</includeResources>
269 <includeTestSourceDirectory>true</includeTestSourceDirectory>
270 <includeTestResources>true</includeTestResources>
271 <consoleOutput>true</consoleOutput>
272 <violationSeverity>warning</violationSeverity>
273 <failOnViolation>true</failOnViolation>
274 </configuration>
275 </execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100276 </executions>
277 <dependencies>
278 <dependency>
279 <groupId>org.onap.oparent</groupId>
280 <artifactId>checkstyle</artifactId>
281 <version>${oparent.version}</version>
282 </dependency>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100283 <dependency>
284 <groupId>${project.groupId}</groupId>
285 <artifactId>checkstyle</artifactId>
286 <version>${project.version}</version>
287 </dependency>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100288 </dependencies>
289 </plugin>
290 <!-- Mandatory plugins for using Spock -->
291 <plugin>
292 <!-- The gmavenplus plugin is used to compile Groovy code.
293 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
294 <groupId>org.codehaus.gmavenplus</groupId>
295 <artifactId>gmavenplus-plugin</artifactId>
296 <version>1.9.0</version>
297 <executions>
298 <execution>
299 <goals>
300 <goal>compileTests</goal>
301 </goals>
302 </execution>
303 </executions>
304 </plugin>
305 <!-- Required because names of spec classes don't match default
306 Surefire patterns (`*Test` etc.) -->
307 <plugin>
308 <groupId>org.apache.maven.plugins</groupId>
309 <artifactId>maven-surefire-plugin</artifactId>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100310 <configuration>
puthuparambil.aditya008c0ad2020-12-14 15:46:30 +0000311 <!--suppress UnresolvedMavenProperty -->
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100312 <argLine>${surefireArgLine}</argLine>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100313 <useFile>false</useFile>
314 <includes>
315 <include>**/*Spec.java</include>
316 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
317 </includes>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100318 <excludes>
319 <exclude>**/IT*.java</exclude>
320 </excludes>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200321 <environmentVariables>
322 <!--
323 disable privileged container usage to cleanup the test containers;
324 these will be removed automatically on jvm termination;
325 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
326 -->
327 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
Renu Kumaribd35b4d2021-05-17 07:16:48 -0400328 <TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>${docker.repository.pull}library/</TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200329 </environmentVariables>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100330 </configuration>
331 </plugin>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100332 <plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100333 <groupId>org.jacoco</groupId>
334 <artifactId>jacoco-maven-plugin</artifactId>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100335 <executions>
336 <execution>
337 <id>default-prepare-agent</id>
338 <goals>
339 <goal>prepare-agent</goal>
340 </goals>
341 </execution>
342 <execution>
343 <id>coverage-check</id>
344 <goals>
345 <goal>check</goal>
346 </goals>
347 <configuration>
puthuparambil.aditya008c0ad2020-12-14 15:46:30 +0000348 <excludes>
349 <exclude>org/onap/cps/rest/model/*</exclude>
350 </excludes>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100351 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100352 <rules>
353 <rule>
354 <element>BUNDLE</element>
355 <limits>
356 <limit>
357 <counter>INSTRUCTION</counter>
358 <value>COVEREDRATIO</value>
359 <minimum>${minimum-coverage}</minimum>
360 </limit>
361 </limits>
362 </rule>
363 </rules>
364 </configuration>
365 </execution>
Claudio David Gasparini593920b2021-01-13 13:47:18 +0100366 <execution>
367 <id>report</id>
368 <goals>
369 <goal>report-aggregate</goal>
370 </goals>
371 <phase>verify</phase>
372 <configuration>
373 <dataFileIncludes>
374 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
375 </dataFileIncludes>
376 </configuration>
377 </execution>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100378 </executions>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100379 </plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100380 <plugin>
381 <groupId>com.github.spotbugs</groupId>
382 <artifactId>spotbugs-maven-plugin</artifactId>
383 </plugin>
Claudio David Gasparini7492aea2021-01-13 08:34:00 +0100384 <plugin>
385 <groupId>org.sonarsource.scanner.maven</groupId>
386 <artifactId>sonar-maven-plugin</artifactId>
387 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100388 </plugins>
389 </build>
Rishi.Chail75729072021-04-08 14:23:32 +0100390</project>