1 <?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">
6 <groupId>org.onap.oparent</groupId>
7 <artifactId>oparent</artifactId>
8 <version>3.1.0</version>
11 <modelVersion>4.0.0</modelVersion>
13 <groupId>org.onap.cps</groupId>
14 <artifactId>cps-parent</artifactId>
15 <version>0.0.1-SNAPSHOT</version>
16 <packaging>pom</packaging>
19 <app>org.onap.cps.Application</app>
20 <base.image>openjdk:11-jre-slim</base.image>
21 <java.version>11</java.version>
22 <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
23 <minimum-coverage>0.9</minimum-coverage>
24 <nexusproxy>https://nexus.onap.org</nexusproxy>
25 <oparent.version>3.1.0</oparent.version>
26 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
27 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
28 <repository.name>nexus3.onap.org:10001/onap/cps-service</repository.name>
29 <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
30 <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
31 <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>
34 <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
35 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
36 <tag.version>${project.version}</tag.version>
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,
46 ../cps-nf-proxy-rest/target/site/jacoco-ut/jacoco.xml,
47 ../cps-nf-proxy-rest/target/site/jacoco-aggregate/jacoco.xml,
48 </sonar.coverage.jacoco.xmlReportPaths>
51 <distributionManagement>
53 <id>ecomp-releases</id>
54 <name>ECOMP Release Repository</name>
55 <url>${nexusproxy}${releaseNexusPath}</url>
58 <id>ecomp-snapshots</id>
59 <name>ECOMP Snapshot Repository</name>
60 <url>${nexusproxy}${snapshotNexusPath}</url>
62 </distributionManagement>
64 <dependencyManagement>
67 <groupId>org.onap.cps</groupId>
68 <artifactId>cps-dependencies</artifactId>
69 <version>${project.version}</version>
74 <groupId>org.onap.cps</groupId>
75 <artifactId>cps-bom</artifactId>
76 <version>${project.version}</version>
81 </dependencyManagement>
86 <directory>src/main/resources</directory>
87 <filtering>true</filtering>
90 <directory>target/generated-sources/license</directory>
92 <include>third-party-licenses.txt</include>
96 <directory>target/generated-resources/licenses</directory>
98 <include>*.*</include>
100 <targetPath>third-party-licenses</targetPath>
106 <groupId>org.springframework.boot</groupId>
107 <artifactId>spring-boot-maven-plugin</artifactId>
108 <version>${spring-boot-maven-plugin.version}</version>
112 <goal>build-info</goal>
113 <goal>repackage</goal>
118 <!-- Swagger code generation. -->
120 <groupId>io.swagger.codegen.v3</groupId>
121 <artifactId>swagger-codegen-maven-plugin</artifactId>
122 <version>${swagger-codegen-maven-plugin.version}</version>
126 <goal>generate</goal>
129 <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
130 <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
131 <modelPackage>org.onap.cps.rest.model</modelPackage>
132 <apiPackage>org.onap.cps.rest.api</apiPackage>
133 <language>spring</language>
134 <generateSupportingFiles>false</generateSupportingFiles>
136 <sourceFolder>src/gen/java</sourceFolder>
137 <dateLibrary>java11</dateLibrary>
138 <interfaceOnly>true</interfaceOnly>
139 <useTags>true</useTags>
146 <groupId>com.google.cloud.tools</groupId>
147 <artifactId>jib-maven-plugin</artifactId>
148 <version>${jib-maven-plugin.version}</version>
151 <mainClass>${app}</mainClass>
152 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
155 <image>${base.image}</image>
158 <image>${repository.name}</image>
160 <tag>${tag.version}</tag>
166 <groupId>com.github.spotbugs</groupId>
167 <artifactId>spotbugs-maven-plugin</artifactId>
168 <version>${spotbugs-maven-plugin.version}</version>
171 <groupId>com.github.spotbugs</groupId>
172 <artifactId>spotbugs</artifactId>
173 <version>${spotbugs.version}</version>
176 <groupId>${project.groupId}</groupId>
177 <artifactId>spotbugs</artifactId>
178 <version>${project.version}</version>
181 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
182 <groupId>org.slf4j</groupId>
183 <artifactId>slf4j-simple</artifactId>
184 <version>${spotbugs.slf4j.version}</version>
190 <groupId>jp.skypencil.findbugs.slf4j</groupId>
191 <artifactId>bug-pattern</artifactId>
192 <version>1.5.0</version>
196 Enables analysis which takes more memory but finds more bugs.
197 If you run out of memory, changes the value of the effort element
201 <!-- Reports all bugs (other values are medium and max) -->
202 <threshold>Low</threshold>
203 <!-- Build doesn't fail if problems are found -->
204 <failOnError>true</failOnError>
205 <!-- References the excluded rules -->
206 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
207 <!-- Produces XML report -->
208 <xmlOutput>true</xmlOutput>
209 <!-- Configures the directory in which the XML report is created -->
210 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
214 Ensures that SpotBugs inspects source code when project is compiled.
217 <id>analyze-compile</id>
218 <phase>compile</phase>
229 <groupId>org.apache.maven.plugins</groupId>
230 <artifactId>maven-compiler-plugin</artifactId>
232 <source>${java.version}</source>
233 <target>${java.version}</target>
237 <groupId>org.apache.maven.plugins</groupId>
238 <artifactId>maven-checkstyle-plugin</artifactId>
241 <id>onap-license</id>
245 <phase>process-sources</phase>
247 <configLocation>onap-checkstyle/check-license.xml</configLocation>
248 <includeResources>false</includeResources>
249 <includeTestSourceDirectory>true</includeTestSourceDirectory>
250 <includeTestResources>false</includeTestResources>
252 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
254 <consoleOutput>false</consoleOutput>
255 <violationSeverity>warning</violationSeverity>
256 <failOnViolation>true</failOnViolation>
260 <id>onap-java-style</id>
264 <phase>process-sources</phase>
266 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
268 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
270 <includeResources>true</includeResources>
271 <includeTestSourceDirectory>true</includeTestSourceDirectory>
272 <includeTestResources>true</includeTestResources>
273 <consoleOutput>false</consoleOutput>
274 <violationSeverity>warning</violationSeverity>
275 <failOnViolation>true</failOnViolation>
279 <id>cps-java-style</id>
283 <phase>process-sources</phase>
285 <configLocation>cps-java-style.xml</configLocation>
287 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
289 <includeResources>true</includeResources>
290 <includeTestSourceDirectory>true</includeTestSourceDirectory>
291 <includeTestResources>true</includeTestResources>
292 <consoleOutput>true</consoleOutput>
293 <violationSeverity>warning</violationSeverity>
294 <failOnViolation>true</failOnViolation>
300 <groupId>org.onap.oparent</groupId>
301 <artifactId>checkstyle</artifactId>
302 <version>${oparent.version}</version>
305 <groupId>${project.groupId}</groupId>
306 <artifactId>checkstyle</artifactId>
307 <version>${project.version}</version>
311 <!-- Mandatory plugins for using Spock -->
313 <!-- The gmavenplus plugin is used to compile Groovy code.
314 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
315 <groupId>org.codehaus.gmavenplus</groupId>
316 <artifactId>gmavenplus-plugin</artifactId>
317 <version>1.9.0</version>
321 <goal>compileTests</goal>
326 <!-- Required because names of spec classes don't match default
327 Surefire patterns (`*Test` etc.) -->
329 <groupId>org.apache.maven.plugins</groupId>
330 <artifactId>maven-surefire-plugin</artifactId>
332 <!--suppress UnresolvedMavenProperty -->
333 <argLine>${surefireArgLine}</argLine>
334 <useFile>false</useFile>
336 <include>**/*Spec.java</include>
337 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
340 <exclude>**/IT*.java</exclude>
342 <environmentVariables>
344 disable privileged container usage to cleanup the test containers;
345 these will be removed automatically on jvm termination;
346 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
348 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
349 </environmentVariables>
353 <groupId>org.jacoco</groupId>
354 <artifactId>jacoco-maven-plugin</artifactId>
357 <id>default-prepare-agent</id>
359 <goal>prepare-agent</goal>
363 <id>coverage-check</id>
369 <exclude>org/onap/cps/rest/model/*</exclude>
371 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
374 <element>BUNDLE</element>
377 <counter>INSTRUCTION</counter>
378 <value>COVEREDRATIO</value>
379 <minimum>${minimum-coverage}</minimum>
389 <goal>report-aggregate</goal>
391 <phase>verify</phase>
394 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
401 <groupId>com.github.spotbugs</groupId>
402 <artifactId>spotbugs-maven-plugin</artifactId>
405 <groupId>org.sonarsource.scanner.maven</groupId>
406 <artifactId>sonar-maven-plugin</artifactId>