blob: 6536cc87888f69c993784d22990b63401c077f92 [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>
Rishi.Chail475bab52021-03-30 14:02:03 +010040 <base.image>nexus3.onap.org:10001/onap/integration-java11:8.0.0</base.image>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010041 <java.version>11</java.version>
Claudio David Gasparini3e38d762021-01-15 14:08:34 +010042 <minimum-coverage>0.9</minimum-coverage>
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010043 <nexusproxy>https://nexus.onap.org</nexusproxy>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010044 <oparent.version>3.1.0</oparent.version>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +010045 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010046 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +010047 <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010048 <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +010049 <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
50 <spotbugs.bug-pattern.version>1.5.0</spotbugs.bug-pattern.version>
51 <spotbugs.version>4.2.0</spotbugs.version>
puthuparambil.aditya47598112020-11-02 11:31:39 +000052 <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010053 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010054
55 <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
56 <sonar.coverage.jacoco.xmlReportPaths>
57 ../cps-ri/target/site/jacoco-ut/jacoco.xml,
58 ../cps-ri/target/site/jacoco-aggregate/jacoco.xml,
59 ../cps-service/target/site/jacoco-ut/jacoco.xml,
60 ../cps-service/target/site/jacoco-aggregate/jacoco.xml,
61 ../cps-rest/target/site/jacoco-ut/jacoco.xml,
62 ../cps-rest/target/site/jacoco-aggregate/jacoco.xml,
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020063 ../cps-nf-proxy-rest/target/site/jacoco-ut/jacoco.xml,
64 ../cps-nf-proxy-rest/target/site/jacoco-aggregate/jacoco.xml,
Claudio D. Gasparinib77bf252021-01-28 15:36:37 +010065 ../cps-application/target/site/jacoco-ut/jacoco.xml,
66 ../cps-application/target/site/jacoco-aggregate/jacoco.xml
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010067 </sonar.coverage.jacoco.xmlReportPaths>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010068 </properties>
69
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010070 <distributionManagement>
71 <repository>
72 <id>ecomp-releases</id>
73 <name>ECOMP Release Repository</name>
74 <url>${nexusproxy}${releaseNexusPath}</url>
75 </repository>
76 <snapshotRepository>
77 <id>ecomp-snapshots</id>
78 <name>ECOMP Snapshot Repository</name>
79 <url>${nexusproxy}${snapshotNexusPath}</url>
80 </snapshotRepository>
81 </distributionManagement>
82
Claudio David Gasparini70c17022020-10-26 10:12:10 +010083 <dependencyManagement>
84 <dependencies>
85 <dependency>
86 <groupId>org.onap.cps</groupId>
87 <artifactId>cps-dependencies</artifactId>
88 <version>${project.version}</version>
89 <type>pom</type>
90 <scope>import</scope>
91 </dependency>
92 <dependency>
93 <groupId>org.onap.cps</groupId>
94 <artifactId>cps-bom</artifactId>
95 <version>${project.version}</version>
96 <type>pom</type>
97 <scope>import</scope>
98 </dependency>
99 </dependencies>
100 </dependencyManagement>
101
102 <build>
103 <resources>
104 <resource>
105 <directory>src/main/resources</directory>
106 <filtering>true</filtering>
107 </resource>
108 <resource>
109 <directory>target/generated-sources/license</directory>
110 <includes>
111 <include>third-party-licenses.txt</include>
112 </includes>
113 </resource>
114 <resource>
115 <directory>target/generated-resources/licenses</directory>
116 <includes>
117 <include>*.*</include>
118 </includes>
119 <targetPath>third-party-licenses</targetPath>
120 </resource>
121 </resources>
122 <pluginManagement>
123 <plugins>
124 <plugin>
125 <groupId>org.springframework.boot</groupId>
126 <artifactId>spring-boot-maven-plugin</artifactId>
127 <version>${spring-boot-maven-plugin.version}</version>
128 <executions>
129 <execution>
130 <goals>
Ruslan Kashapovf4d1c982020-10-29 11:39:31 +0200131 <goal>build-info</goal>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100132 <goal>repackage</goal>
133 </goals>
134 </execution>
135 </executions>
136 </plugin>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000137 <!-- Swagger code generation. -->
138 <plugin>
139 <groupId>io.swagger.codegen.v3</groupId>
140 <artifactId>swagger-codegen-maven-plugin</artifactId>
141 <version>${swagger-codegen-maven-plugin.version}</version>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000142 </plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100143 <plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100144 <groupId>com.github.spotbugs</groupId>
145 <artifactId>spotbugs-maven-plugin</artifactId>
146 <version>${spotbugs-maven-plugin.version}</version>
147 <dependencies>
148 <dependency>
149 <groupId>com.github.spotbugs</groupId>
150 <artifactId>spotbugs</artifactId>
151 <version>${spotbugs.version}</version>
152 </dependency>
153 <dependency>
154 <groupId>${project.groupId}</groupId>
155 <artifactId>spotbugs</artifactId>
156 <version>${project.version}</version>
157 </dependency>
158 <dependency>
159 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
160 <groupId>org.slf4j</groupId>
161 <artifactId>slf4j-simple</artifactId>
162 <version>${spotbugs.slf4j.version}</version>
163 </dependency>
164 </dependencies>
165 <configuration>
166 <plugins>
167 <plugin>
168 <groupId>jp.skypencil.findbugs.slf4j</groupId>
169 <artifactId>bug-pattern</artifactId>
170 <version>1.5.0</version>
171 </plugin>
172 </plugins>
173 <!--
174 Enables analysis which takes more memory but finds more bugs.
175 If you run out of memory, changes the value of the effort element
176 to 'Low'.
177 -->
178 <effort>Max</effort>
179 <!-- Reports all bugs (other values are medium and max) -->
180 <threshold>Low</threshold>
181 <!-- Build doesn't fail if problems are found -->
Claudio David Gasparini9afc8d12021-01-11 16:42:30 +0100182 <failOnError>true</failOnError>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100183 <!-- References the excluded rules -->
184 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
185 <!-- Produces XML report -->
186 <xmlOutput>true</xmlOutput>
187 <!-- Configures the directory in which the XML report is created -->
188 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
189 </configuration>
190 <executions>
191 <!--
192 Ensures that SpotBugs inspects source code when project is compiled.
193 -->
194 <execution>
195 <id>analyze-compile</id>
196 <phase>compile</phase>
197 <goals>
198 <goal>check</goal>
199 </goals>
200 </execution>
201 </executions>
202 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100203 </plugins>
204 </pluginManagement>
205 <plugins>
206 <plugin>
207 <groupId>org.apache.maven.plugins</groupId>
208 <artifactId>maven-compiler-plugin</artifactId>
209 <configuration>
210 <source>${java.version}</source>
211 <target>${java.version}</target>
212 </configuration>
213 </plugin>
214 <plugin>
215 <groupId>org.apache.maven.plugins</groupId>
216 <artifactId>maven-checkstyle-plugin</artifactId>
217 <executions>
218 <execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100219 <id>onap-license</id>
220 <goals>
221 <goal>check</goal>
222 </goals>
223 <phase>process-sources</phase>
224 <configuration>
225 <configLocation>onap-checkstyle/check-license.xml</configLocation>
226 <includeResources>false</includeResources>
227 <includeTestSourceDirectory>true</includeTestSourceDirectory>
228 <includeTestResources>false</includeTestResources>
229 <sourceDirectories>
230 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
231 </sourceDirectories>
232 <consoleOutput>false</consoleOutput>
233 <violationSeverity>warning</violationSeverity>
234 <failOnViolation>true</failOnViolation>
235 </configuration>
236 </execution>
237 <execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100238 <id>onap-java-style</id>
239 <goals>
240 <goal>check</goal>
241 </goals>
242 <phase>process-sources</phase>
243 <configuration>
244 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100245 <sourceDirectories>
246 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
247 </sourceDirectories>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100248 <includeResources>true</includeResources>
249 <includeTestSourceDirectory>true</includeTestSourceDirectory>
250 <includeTestResources>true</includeTestResources>
251 <consoleOutput>false</consoleOutput>
252 <violationSeverity>warning</violationSeverity>
253 <failOnViolation>true</failOnViolation>
254 </configuration>
255 </execution>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100256 <execution>
257 <id>cps-java-style</id>
258 <goals>
259 <goal>check</goal>
260 </goals>
261 <phase>process-sources</phase>
262 <configuration>
263 <configLocation>cps-java-style.xml</configLocation>
264 <sourceDirectories>
265 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
266 </sourceDirectories>
267 <includeResources>true</includeResources>
268 <includeTestSourceDirectory>true</includeTestSourceDirectory>
269 <includeTestResources>true</includeTestResources>
270 <consoleOutput>true</consoleOutput>
271 <violationSeverity>warning</violationSeverity>
272 <failOnViolation>true</failOnViolation>
273 </configuration>
274 </execution>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100275 </executions>
276 <dependencies>
277 <dependency>
278 <groupId>org.onap.oparent</groupId>
279 <artifactId>checkstyle</artifactId>
280 <version>${oparent.version}</version>
281 </dependency>
Claudio David Gasparini35b2b442020-12-01 14:53:40 +0100282 <dependency>
283 <groupId>${project.groupId}</groupId>
284 <artifactId>checkstyle</artifactId>
285 <version>${project.version}</version>
286 </dependency>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100287 </dependencies>
288 </plugin>
289 <!-- Mandatory plugins for using Spock -->
290 <plugin>
291 <!-- The gmavenplus plugin is used to compile Groovy code.
292 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
293 <groupId>org.codehaus.gmavenplus</groupId>
294 <artifactId>gmavenplus-plugin</artifactId>
295 <version>1.9.0</version>
296 <executions>
297 <execution>
298 <goals>
299 <goal>compileTests</goal>
300 </goals>
301 </execution>
302 </executions>
303 </plugin>
304 <!-- Required because names of spec classes don't match default
305 Surefire patterns (`*Test` etc.) -->
306 <plugin>
307 <groupId>org.apache.maven.plugins</groupId>
308 <artifactId>maven-surefire-plugin</artifactId>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100309 <configuration>
puthuparambil.aditya008c0ad2020-12-14 15:46:30 +0000310 <!--suppress UnresolvedMavenProperty -->
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100311 <argLine>${surefireArgLine}</argLine>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100312 <useFile>false</useFile>
313 <includes>
314 <include>**/*Spec.java</include>
315 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
316 </includes>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100317 <excludes>
318 <exclude>**/IT*.java</exclude>
319 </excludes>
Ruslan Kashapovbf02f202020-12-17 10:38:53 +0200320 <environmentVariables>
321 <!--
322 disable privileged container usage to cleanup the test containers;
323 these will be removed automatically on jvm termination;
324 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
325 -->
326 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
327 </environmentVariables>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100328 </configuration>
329 </plugin>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100330 <plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100331 <groupId>org.jacoco</groupId>
332 <artifactId>jacoco-maven-plugin</artifactId>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100333 <executions>
334 <execution>
335 <id>default-prepare-agent</id>
336 <goals>
337 <goal>prepare-agent</goal>
338 </goals>
339 </execution>
340 <execution>
341 <id>coverage-check</id>
342 <goals>
343 <goal>check</goal>
344 </goals>
345 <configuration>
puthuparambil.aditya008c0ad2020-12-14 15:46:30 +0000346 <excludes>
347 <exclude>org/onap/cps/rest/model/*</exclude>
348 </excludes>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +0100349 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100350 <rules>
351 <rule>
352 <element>BUNDLE</element>
353 <limits>
354 <limit>
355 <counter>INSTRUCTION</counter>
356 <value>COVEREDRATIO</value>
357 <minimum>${minimum-coverage}</minimum>
358 </limit>
359 </limits>
360 </rule>
361 </rules>
362 </configuration>
363 </execution>
Claudio David Gasparini593920b2021-01-13 13:47:18 +0100364 <execution>
365 <id>report</id>
366 <goals>
367 <goal>report-aggregate</goal>
368 </goals>
369 <phase>verify</phase>
370 <configuration>
371 <dataFileIncludes>
372 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
373 </dataFileIncludes>
374 </configuration>
375 </execution>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100376 </executions>
Claudio David Gasparini900ba022020-11-08 22:18:36 +0100377 </plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100378 <plugin>
379 <groupId>com.github.spotbugs</groupId>
380 <artifactId>spotbugs-maven-plugin</artifactId>
381 </plugin>
Claudio David Gasparini7492aea2021-01-13 08:34:00 +0100382 <plugin>
383 <groupId>org.sonarsource.scanner.maven</groupId>
384 <artifactId>sonar-maven-plugin</artifactId>
385 </plugin>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100386 </plugins>
387 </build>
388</project>