blob: 36abc909cc8635bee3e2e0377ef1c87d240a564c [file] [log] [blame]
Claudio David Gasparini70c17022020-10-26 10:12:10 +01001<?xml version="1.0" encoding="UTF-8"?>
2<project xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5 <parent>
6 <groupId>org.onap.oparent</groupId>
7 <artifactId>oparent</artifactId>
8 <version>3.1.0</version>
9 <relativePath/>
10 </parent>
11 <modelVersion>4.0.0</modelVersion>
12
13 <groupId>org.onap.cps</groupId>
14 <artifactId>cps-parent</artifactId>
15 <version>0.0.1-SNAPSHOT</version>
16 <packaging>pom</packaging>
17
18 <properties>
Claudio David Gasparini900ba022020-11-08 22:18:36 +010019 <app>org.onap.cps.Application</app>
20 <base.image>openjdk:11-jre-slim</base.image>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010021 <java.version>11</java.version>
Claudio David Gasparini900ba022020-11-08 22:18:36 +010022 <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
Claudio David Gasparini3e38d762021-01-15 14:08:34 +010023 <minimum-coverage>0.9</minimum-coverage>
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010024 <nexusproxy>https://nexus.onap.org</nexusproxy>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010025 <oparent.version>3.1.0</oparent.version>
Claudio David Gasparini13cc64d2020-12-02 18:47:09 +010026 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010027 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
Claudio David Gasparini900ba022020-11-08 22:18:36 +010028 <repository.name>nexus3.onap.org:10001/onap/cps-service</repository.name>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +010029 <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010030 <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +010031 <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
32 <spotbugs.bug-pattern.version>1.5.0</spotbugs.bug-pattern.version>
33 <spotbugs.version>4.2.0</spotbugs.version>
puthuparambil.aditya47598112020-11-02 11:31:39 +000034 <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010035 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
Claudio D. Gasparinib77bf252021-01-28 15:36:37 +010036 <image.version>${project.version}</image.version>
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010037
38 <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
39 <sonar.coverage.jacoco.xmlReportPaths>
40 ../cps-ri/target/site/jacoco-ut/jacoco.xml,
41 ../cps-ri/target/site/jacoco-aggregate/jacoco.xml,
42 ../cps-service/target/site/jacoco-ut/jacoco.xml,
43 ../cps-service/target/site/jacoco-aggregate/jacoco.xml,
44 ../cps-rest/target/site/jacoco-ut/jacoco.xml,
45 ../cps-rest/target/site/jacoco-aggregate/jacoco.xml,
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020046 ../cps-nf-proxy-rest/target/site/jacoco-ut/jacoco.xml,
47 ../cps-nf-proxy-rest/target/site/jacoco-aggregate/jacoco.xml,
Claudio D. Gasparinib77bf252021-01-28 15:36:37 +010048 ../cps-application/target/site/jacoco-ut/jacoco.xml,
49 ../cps-application/target/site/jacoco-aggregate/jacoco.xml
Claudio David Gasparinid45b2dc2021-01-13 13:28:07 +010050 </sonar.coverage.jacoco.xmlReportPaths>
Claudio David Gasparini70c17022020-10-26 10:12:10 +010051 </properties>
52
Claudio David Gasparini24c217c2020-11-17 13:46:10 +010053 <distributionManagement>
54 <repository>
55 <id>ecomp-releases</id>
56 <name>ECOMP Release Repository</name>
57 <url>${nexusproxy}${releaseNexusPath}</url>
58 </repository>
59 <snapshotRepository>
60 <id>ecomp-snapshots</id>
61 <name>ECOMP Snapshot Repository</name>
62 <url>${nexusproxy}${snapshotNexusPath}</url>
63 </snapshotRepository>
64 </distributionManagement>
65
Claudio David Gasparini70c17022020-10-26 10:12:10 +010066 <dependencyManagement>
67 <dependencies>
68 <dependency>
69 <groupId>org.onap.cps</groupId>
70 <artifactId>cps-dependencies</artifactId>
71 <version>${project.version}</version>
72 <type>pom</type>
73 <scope>import</scope>
74 </dependency>
75 <dependency>
76 <groupId>org.onap.cps</groupId>
77 <artifactId>cps-bom</artifactId>
78 <version>${project.version}</version>
79 <type>pom</type>
80 <scope>import</scope>
81 </dependency>
82 </dependencies>
83 </dependencyManagement>
84
85 <build>
86 <resources>
87 <resource>
88 <directory>src/main/resources</directory>
89 <filtering>true</filtering>
90 </resource>
91 <resource>
92 <directory>target/generated-sources/license</directory>
93 <includes>
94 <include>third-party-licenses.txt</include>
95 </includes>
96 </resource>
97 <resource>
98 <directory>target/generated-resources/licenses</directory>
99 <includes>
100 <include>*.*</include>
101 </includes>
102 <targetPath>third-party-licenses</targetPath>
103 </resource>
104 </resources>
105 <pluginManagement>
106 <plugins>
107 <plugin>
108 <groupId>org.springframework.boot</groupId>
109 <artifactId>spring-boot-maven-plugin</artifactId>
110 <version>${spring-boot-maven-plugin.version}</version>
111 <executions>
112 <execution>
113 <goals>
Ruslan Kashapovf4d1c982020-10-29 11:39:31 +0200114 <goal>build-info</goal>
Claudio David Gasparini70c17022020-10-26 10:12:10 +0100115 <goal>repackage</goal>
116 </goals>
117 </execution>
118 </executions>
119 </plugin>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000120 <!-- Swagger code generation. -->
121 <plugin>
122 <groupId>io.swagger.codegen.v3</groupId>
123 <artifactId>swagger-codegen-maven-plugin</artifactId>
124 <version>${swagger-codegen-maven-plugin.version}</version>
puthuparambil.aditya47598112020-11-02 11:31:39 +0000125 </plugin>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100126 <plugin>
127 <groupId>com.google.cloud.tools</groupId>
128 <artifactId>jib-maven-plugin</artifactId>
129 <version>${jib-maven-plugin.version}</version>
130 <configuration>
131 <container>
132 <mainClass>${app}</mainClass>
133 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
134 </container>
135 <from>
136 <image>${base.image}</image>
137 </from>
138 <to>
Claudio D. Gasparinib77bf252021-01-28 15:36:37 +0100139 <image>${repository.name}:${image.version}</image>
Claudio David Gasparini87c74a12020-11-18 08:38:01 +0100140 </to>
141 </configuration>
142 </plugin>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +0100143 <plugin>
144 <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>