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 <image.version>${project.version}</image.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 ../cps-application/target/site/jacoco-ut/jacoco.xml,
49 ../cps-application/target/site/jacoco-aggregate/jacoco.xml
50 </sonar.coverage.jacoco.xmlReportPaths>
53 <distributionManagement>
55 <id>ecomp-releases</id>
56 <name>ECOMP Release Repository</name>
57 <url>${nexusproxy}${releaseNexusPath}</url>
60 <id>ecomp-snapshots</id>
61 <name>ECOMP Snapshot Repository</name>
62 <url>${nexusproxy}${snapshotNexusPath}</url>
64 </distributionManagement>
66 <dependencyManagement>
69 <groupId>org.onap.cps</groupId>
70 <artifactId>cps-dependencies</artifactId>
71 <version>${project.version}</version>
76 <groupId>org.onap.cps</groupId>
77 <artifactId>cps-bom</artifactId>
78 <version>${project.version}</version>
83 </dependencyManagement>
88 <directory>src/main/resources</directory>
89 <filtering>true</filtering>
92 <directory>target/generated-sources/license</directory>
94 <include>third-party-licenses.txt</include>
98 <directory>target/generated-resources/licenses</directory>
100 <include>*.*</include>
102 <targetPath>third-party-licenses</targetPath>
108 <groupId>org.springframework.boot</groupId>
109 <artifactId>spring-boot-maven-plugin</artifactId>
110 <version>${spring-boot-maven-plugin.version}</version>
114 <goal>build-info</goal>
115 <goal>repackage</goal>
120 <!-- Swagger code generation. -->
122 <groupId>io.swagger.codegen.v3</groupId>
123 <artifactId>swagger-codegen-maven-plugin</artifactId>
124 <version>${swagger-codegen-maven-plugin.version}</version>
127 <groupId>com.google.cloud.tools</groupId>
128 <artifactId>jib-maven-plugin</artifactId>
129 <version>${jib-maven-plugin.version}</version>
132 <mainClass>${app}</mainClass>
133 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
136 <image>${base.image}</image>
139 <image>${repository.name}:${image.version}</image>
144 <groupId>com.github.spotbugs</groupId>
145 <artifactId>spotbugs-maven-plugin</artifactId>
146 <version>${spotbugs-maven-plugin.version}</version>
149 <groupId>com.github.spotbugs</groupId>
150 <artifactId>spotbugs</artifactId>
151 <version>${spotbugs.version}</version>
154 <groupId>${project.groupId}</groupId>
155 <artifactId>spotbugs</artifactId>
156 <version>${project.version}</version>
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>
168 <groupId>jp.skypencil.findbugs.slf4j</groupId>
169 <artifactId>bug-pattern</artifactId>
170 <version>1.5.0</version>
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
179 <!-- Reports all bugs (other values are medium and max) -->
180 <threshold>Low</threshold>
181 <!-- Build doesn't fail if problems are found -->
182 <failOnError>true</failOnError>
183 <!-- 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>
192 Ensures that SpotBugs inspects source code when project is compiled.
195 <id>analyze-compile</id>
196 <phase>compile</phase>
207 <groupId>org.apache.maven.plugins</groupId>
208 <artifactId>maven-compiler-plugin</artifactId>
210 <source>${java.version}</source>
211 <target>${java.version}</target>
215 <groupId>org.apache.maven.plugins</groupId>
216 <artifactId>maven-checkstyle-plugin</artifactId>
219 <id>onap-license</id>
223 <phase>process-sources</phase>
225 <configLocation>onap-checkstyle/check-license.xml</configLocation>
226 <includeResources>false</includeResources>
227 <includeTestSourceDirectory>true</includeTestSourceDirectory>
228 <includeTestResources>false</includeTestResources>
230 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
232 <consoleOutput>false</consoleOutput>
233 <violationSeverity>warning</violationSeverity>
234 <failOnViolation>true</failOnViolation>
238 <id>onap-java-style</id>
242 <phase>process-sources</phase>
244 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
246 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
248 <includeResources>true</includeResources>
249 <includeTestSourceDirectory>true</includeTestSourceDirectory>
250 <includeTestResources>true</includeTestResources>
251 <consoleOutput>false</consoleOutput>
252 <violationSeverity>warning</violationSeverity>
253 <failOnViolation>true</failOnViolation>
257 <id>cps-java-style</id>
261 <phase>process-sources</phase>
263 <configLocation>cps-java-style.xml</configLocation>
265 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
267 <includeResources>true</includeResources>
268 <includeTestSourceDirectory>true</includeTestSourceDirectory>
269 <includeTestResources>true</includeTestResources>
270 <consoleOutput>true</consoleOutput>
271 <violationSeverity>warning</violationSeverity>
272 <failOnViolation>true</failOnViolation>
278 <groupId>org.onap.oparent</groupId>
279 <artifactId>checkstyle</artifactId>
280 <version>${oparent.version}</version>
283 <groupId>${project.groupId}</groupId>
284 <artifactId>checkstyle</artifactId>
285 <version>${project.version}</version>
289 <!-- Mandatory plugins for using Spock -->
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>
299 <goal>compileTests</goal>
304 <!-- Required because names of spec classes don't match default
305 Surefire patterns (`*Test` etc.) -->
307 <groupId>org.apache.maven.plugins</groupId>
308 <artifactId>maven-surefire-plugin</artifactId>
310 <!--suppress UnresolvedMavenProperty -->
311 <argLine>${surefireArgLine}</argLine>
312 <useFile>false</useFile>
314 <include>**/*Spec.java</include>
315 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
318 <exclude>**/IT*.java</exclude>
320 <environmentVariables>
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
326 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
327 </environmentVariables>
331 <groupId>org.jacoco</groupId>
332 <artifactId>jacoco-maven-plugin</artifactId>
335 <id>default-prepare-agent</id>
337 <goal>prepare-agent</goal>
341 <id>coverage-check</id>
347 <exclude>org/onap/cps/rest/model/*</exclude>
349 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
352 <element>BUNDLE</element>
355 <counter>INSTRUCTION</counter>
356 <value>COVEREDRATIO</value>
357 <minimum>${minimum-coverage}</minimum>
367 <goal>report-aggregate</goal>
369 <phase>verify</phase>
372 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
379 <groupId>com.github.spotbugs</groupId>
380 <artifactId>spotbugs-maven-plugin</artifactId>
383 <groupId>org.sonarsource.scanner.maven</groupId>
384 <artifactId>sonar-maven-plugin</artifactId>