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.76</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 <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-aggregate/jacoco.xml,${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
30 <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
31 <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
32 <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
33 <spotbugs.bug-pattern.version>1.5.0</spotbugs.bug-pattern.version>
34 <spotbugs.version>4.2.0</spotbugs.version>
35 <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
36 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
37 <tag.version>${project.version}</tag.version>
40 <distributionManagement>
42 <id>ecomp-releases</id>
43 <name>ECOMP Release Repository</name>
44 <url>${nexusproxy}${releaseNexusPath}</url>
47 <id>ecomp-snapshots</id>
48 <name>ECOMP Snapshot Repository</name>
49 <url>${nexusproxy}${snapshotNexusPath}</url>
51 </distributionManagement>
57 <activeByDefault>false</activeByDefault>
63 <groupId>com.google.cloud.tools</groupId>
64 <artifactId>jib-maven-plugin</artifactId>
65 <version>${jib-maven-plugin.version}</version>
68 <mainClass>${app}</mainClass>
69 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
72 <image>${base.image}</image>
75 <image>${repository.name}</image>
77 <tag>${tag.version}</tag>
83 <phase>package</phase>
86 <goal>dockerBuild</goal>
104 <dependencyManagement>
107 <groupId>org.onap.cps</groupId>
108 <artifactId>cps-dependencies</artifactId>
109 <version>${project.version}</version>
111 <scope>import</scope>
114 <groupId>org.onap.cps</groupId>
115 <artifactId>cps-bom</artifactId>
116 <version>${project.version}</version>
118 <scope>import</scope>
121 </dependencyManagement>
126 <directory>src/main/resources</directory>
127 <filtering>true</filtering>
130 <directory>target/generated-sources/license</directory>
132 <include>third-party-licenses.txt</include>
136 <directory>target/generated-resources/licenses</directory>
138 <include>*.*</include>
140 <targetPath>third-party-licenses</targetPath>
146 <groupId>org.springframework.boot</groupId>
147 <artifactId>spring-boot-maven-plugin</artifactId>
148 <version>${spring-boot-maven-plugin.version}</version>
152 <goal>build-info</goal>
153 <goal>repackage</goal>
158 <!-- Swagger code generation. -->
160 <groupId>io.swagger.codegen.v3</groupId>
161 <artifactId>swagger-codegen-maven-plugin</artifactId>
162 <version>${swagger-codegen-maven-plugin.version}</version>
166 <goal>generate</goal>
169 <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
170 <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
171 <modelPackage>org.onap.cps.rest.model</modelPackage>
172 <apiPackage>org.onap.cps.rest.api</apiPackage>
173 <language>spring</language>
174 <generateSupportingFiles>false</generateSupportingFiles>
176 <sourceFolder>src/gen/java</sourceFolder>
177 <dateLibrary>java11</dateLibrary>
178 <interfaceOnly>true</interfaceOnly>
179 <useTags>true</useTags>
186 <groupId>com.google.cloud.tools</groupId>
187 <artifactId>jib-maven-plugin</artifactId>
188 <version>${jib-maven-plugin.version}</version>
191 <mainClass>${app}</mainClass>
192 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
195 <image>${base.image}</image>
198 <image>${repository.name}</image>
200 <tag>${tag.version}</tag>
206 <groupId>com.github.spotbugs</groupId>
207 <artifactId>spotbugs-maven-plugin</artifactId>
208 <version>${spotbugs-maven-plugin.version}</version>
211 <groupId>com.github.spotbugs</groupId>
212 <artifactId>spotbugs</artifactId>
213 <version>${spotbugs.version}</version>
216 <groupId>${project.groupId}</groupId>
217 <artifactId>spotbugs</artifactId>
218 <version>${project.version}</version>
221 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
222 <groupId>org.slf4j</groupId>
223 <artifactId>slf4j-simple</artifactId>
224 <version>${spotbugs.slf4j.version}</version>
230 <groupId>jp.skypencil.findbugs.slf4j</groupId>
231 <artifactId>bug-pattern</artifactId>
232 <version>1.5.0</version>
236 Enables analysis which takes more memory but finds more bugs.
237 If you run out of memory, changes the value of the effort element
241 <!-- Reports all bugs (other values are medium and max) -->
242 <threshold>Low</threshold>
243 <!-- Build doesn't fail if problems are found -->
244 <failOnError>true</failOnError>
245 <!-- References the excluded rules -->
246 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
247 <!-- Produces XML report -->
248 <xmlOutput>true</xmlOutput>
249 <!-- Configures the directory in which the XML report is created -->
250 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
254 Ensures that SpotBugs inspects source code when project is compiled.
257 <id>analyze-compile</id>
258 <phase>compile</phase>
269 <groupId>org.apache.maven.plugins</groupId>
270 <artifactId>maven-compiler-plugin</artifactId>
272 <source>${java.version}</source>
273 <target>${java.version}</target>
277 <groupId>org.apache.maven.plugins</groupId>
278 <artifactId>maven-checkstyle-plugin</artifactId>
281 <id>onap-license</id>
285 <phase>process-sources</phase>
287 <configLocation>onap-checkstyle/check-license.xml</configLocation>
288 <includeResources>false</includeResources>
289 <includeTestSourceDirectory>true</includeTestSourceDirectory>
290 <includeTestResources>false</includeTestResources>
292 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
294 <consoleOutput>false</consoleOutput>
295 <violationSeverity>warning</violationSeverity>
296 <failOnViolation>true</failOnViolation>
300 <id>onap-java-style</id>
304 <phase>process-sources</phase>
306 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
308 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
310 <includeResources>true</includeResources>
311 <includeTestSourceDirectory>true</includeTestSourceDirectory>
312 <includeTestResources>true</includeTestResources>
313 <consoleOutput>false</consoleOutput>
314 <violationSeverity>warning</violationSeverity>
315 <failOnViolation>true</failOnViolation>
319 <id>cps-java-style</id>
323 <phase>process-sources</phase>
325 <configLocation>cps-java-style.xml</configLocation>
327 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
329 <includeResources>true</includeResources>
330 <includeTestSourceDirectory>true</includeTestSourceDirectory>
331 <includeTestResources>true</includeTestResources>
332 <consoleOutput>true</consoleOutput>
333 <violationSeverity>warning</violationSeverity>
334 <failOnViolation>true</failOnViolation>
340 <groupId>org.onap.oparent</groupId>
341 <artifactId>checkstyle</artifactId>
342 <version>${oparent.version}</version>
345 <groupId>${project.groupId}</groupId>
346 <artifactId>checkstyle</artifactId>
347 <version>${project.version}</version>
351 <!-- Mandatory plugins for using Spock -->
353 <!-- The gmavenplus plugin is used to compile Groovy code.
354 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
355 <groupId>org.codehaus.gmavenplus</groupId>
356 <artifactId>gmavenplus-plugin</artifactId>
357 <version>1.9.0</version>
361 <goal>compileTests</goal>
366 <!-- Required because names of spec classes don't match default
367 Surefire patterns (`*Test` etc.) -->
369 <groupId>org.apache.maven.plugins</groupId>
370 <artifactId>maven-surefire-plugin</artifactId>
372 <!--suppress UnresolvedMavenProperty -->
373 <argLine>${surefireArgLine}</argLine>
374 <useFile>false</useFile>
376 <include>**/*Spec.java</include>
377 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
380 <exclude>**/IT*.java</exclude>
382 <environmentVariables>
384 disable privileged container usage to cleanup the test containers;
385 these will be removed automatically on jvm termination;
386 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
388 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
389 </environmentVariables>
393 <groupId>org.jacoco</groupId>
394 <artifactId>jacoco-maven-plugin</artifactId>
397 <id>default-prepare-agent</id>
399 <goal>prepare-agent</goal>
403 <id>coverage-check</id>
409 <exclude>org/onap/cps/rest/model/*</exclude>
411 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
414 <element>BUNDLE</element>
417 <counter>INSTRUCTION</counter>
418 <value>COVEREDRATIO</value>
419 <minimum>${minimum-coverage}</minimum>
429 <goal>report-aggregate</goal>
431 <phase>verify</phase>
434 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
441 <groupId>com.github.spotbugs</groupId>
442 <artifactId>spotbugs-maven-plugin</artifactId>
445 <groupId>org.sonarsource.scanner.maven</groupId>
446 <artifactId>sonar-maven-plugin</artifactId>