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 </sonar.coverage.jacoco.xmlReportPaths>
49 <distributionManagement>
51 <id>ecomp-releases</id>
52 <name>ECOMP Release Repository</name>
53 <url>${nexusproxy}${releaseNexusPath}</url>
56 <id>ecomp-snapshots</id>
57 <name>ECOMP Snapshot Repository</name>
58 <url>${nexusproxy}${snapshotNexusPath}</url>
60 </distributionManagement>
62 <dependencyManagement>
65 <groupId>org.onap.cps</groupId>
66 <artifactId>cps-dependencies</artifactId>
67 <version>${project.version}</version>
72 <groupId>org.onap.cps</groupId>
73 <artifactId>cps-bom</artifactId>
74 <version>${project.version}</version>
79 </dependencyManagement>
84 <directory>src/main/resources</directory>
85 <filtering>true</filtering>
88 <directory>target/generated-sources/license</directory>
90 <include>third-party-licenses.txt</include>
94 <directory>target/generated-resources/licenses</directory>
96 <include>*.*</include>
98 <targetPath>third-party-licenses</targetPath>
104 <groupId>org.springframework.boot</groupId>
105 <artifactId>spring-boot-maven-plugin</artifactId>
106 <version>${spring-boot-maven-plugin.version}</version>
110 <goal>build-info</goal>
111 <goal>repackage</goal>
116 <!-- Swagger code generation. -->
118 <groupId>io.swagger.codegen.v3</groupId>
119 <artifactId>swagger-codegen-maven-plugin</artifactId>
120 <version>${swagger-codegen-maven-plugin.version}</version>
124 <goal>generate</goal>
127 <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
128 <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
129 <modelPackage>org.onap.cps.rest.model</modelPackage>
130 <apiPackage>org.onap.cps.rest.api</apiPackage>
131 <language>spring</language>
132 <generateSupportingFiles>false</generateSupportingFiles>
134 <sourceFolder>src/gen/java</sourceFolder>
135 <dateLibrary>java11</dateLibrary>
136 <interfaceOnly>true</interfaceOnly>
137 <useTags>true</useTags>
144 <groupId>com.google.cloud.tools</groupId>
145 <artifactId>jib-maven-plugin</artifactId>
146 <version>${jib-maven-plugin.version}</version>
149 <mainClass>${app}</mainClass>
150 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
153 <image>${base.image}</image>
156 <image>${repository.name}</image>
158 <tag>${tag.version}</tag>
164 <groupId>com.github.spotbugs</groupId>
165 <artifactId>spotbugs-maven-plugin</artifactId>
166 <version>${spotbugs-maven-plugin.version}</version>
169 <groupId>com.github.spotbugs</groupId>
170 <artifactId>spotbugs</artifactId>
171 <version>${spotbugs.version}</version>
174 <groupId>${project.groupId}</groupId>
175 <artifactId>spotbugs</artifactId>
176 <version>${project.version}</version>
179 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
180 <groupId>org.slf4j</groupId>
181 <artifactId>slf4j-simple</artifactId>
182 <version>${spotbugs.slf4j.version}</version>
188 <groupId>jp.skypencil.findbugs.slf4j</groupId>
189 <artifactId>bug-pattern</artifactId>
190 <version>1.5.0</version>
194 Enables analysis which takes more memory but finds more bugs.
195 If you run out of memory, changes the value of the effort element
199 <!-- Reports all bugs (other values are medium and max) -->
200 <threshold>Low</threshold>
201 <!-- Build doesn't fail if problems are found -->
202 <failOnError>true</failOnError>
203 <!-- References the excluded rules -->
204 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
205 <!-- Produces XML report -->
206 <xmlOutput>true</xmlOutput>
207 <!-- Configures the directory in which the XML report is created -->
208 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
212 Ensures that SpotBugs inspects source code when project is compiled.
215 <id>analyze-compile</id>
216 <phase>compile</phase>
227 <groupId>org.apache.maven.plugins</groupId>
228 <artifactId>maven-compiler-plugin</artifactId>
230 <source>${java.version}</source>
231 <target>${java.version}</target>
235 <groupId>org.apache.maven.plugins</groupId>
236 <artifactId>maven-checkstyle-plugin</artifactId>
239 <id>onap-license</id>
243 <phase>process-sources</phase>
245 <configLocation>onap-checkstyle/check-license.xml</configLocation>
246 <includeResources>false</includeResources>
247 <includeTestSourceDirectory>true</includeTestSourceDirectory>
248 <includeTestResources>false</includeTestResources>
250 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
252 <consoleOutput>false</consoleOutput>
253 <violationSeverity>warning</violationSeverity>
254 <failOnViolation>true</failOnViolation>
258 <id>onap-java-style</id>
262 <phase>process-sources</phase>
264 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
266 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
268 <includeResources>true</includeResources>
269 <includeTestSourceDirectory>true</includeTestSourceDirectory>
270 <includeTestResources>true</includeTestResources>
271 <consoleOutput>false</consoleOutput>
272 <violationSeverity>warning</violationSeverity>
273 <failOnViolation>true</failOnViolation>
277 <id>cps-java-style</id>
281 <phase>process-sources</phase>
283 <configLocation>cps-java-style.xml</configLocation>
285 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
287 <includeResources>true</includeResources>
288 <includeTestSourceDirectory>true</includeTestSourceDirectory>
289 <includeTestResources>true</includeTestResources>
290 <consoleOutput>true</consoleOutput>
291 <violationSeverity>warning</violationSeverity>
292 <failOnViolation>true</failOnViolation>
298 <groupId>org.onap.oparent</groupId>
299 <artifactId>checkstyle</artifactId>
300 <version>${oparent.version}</version>
303 <groupId>${project.groupId}</groupId>
304 <artifactId>checkstyle</artifactId>
305 <version>${project.version}</version>
309 <!-- Mandatory plugins for using Spock -->
311 <!-- The gmavenplus plugin is used to compile Groovy code.
312 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
313 <groupId>org.codehaus.gmavenplus</groupId>
314 <artifactId>gmavenplus-plugin</artifactId>
315 <version>1.9.0</version>
319 <goal>compileTests</goal>
324 <!-- Required because names of spec classes don't match default
325 Surefire patterns (`*Test` etc.) -->
327 <groupId>org.apache.maven.plugins</groupId>
328 <artifactId>maven-surefire-plugin</artifactId>
330 <!--suppress UnresolvedMavenProperty -->
331 <argLine>${surefireArgLine}</argLine>
332 <useFile>false</useFile>
334 <include>**/*Spec.java</include>
335 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
338 <exclude>**/IT*.java</exclude>
340 <environmentVariables>
342 disable privileged container usage to cleanup the test containers;
343 these will be removed automatically on jvm termination;
344 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
346 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
347 </environmentVariables>
351 <groupId>org.jacoco</groupId>
352 <artifactId>jacoco-maven-plugin</artifactId>
355 <id>default-prepare-agent</id>
357 <goal>prepare-agent</goal>
361 <id>coverage-check</id>
367 <exclude>org/onap/cps/rest/model/*</exclude>
369 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
372 <element>BUNDLE</element>
375 <counter>INSTRUCTION</counter>
376 <value>COVEREDRATIO</value>
377 <minimum>${minimum-coverage}</minimum>
387 <goal>report-aggregate</goal>
389 <phase>verify</phase>
392 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
399 <groupId>com.github.spotbugs</groupId>
400 <artifactId>spotbugs-maven-plugin</artifactId>
403 <groupId>org.sonarsource.scanner.maven</groupId>
404 <artifactId>sonar-maven-plugin</artifactId>