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 <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>
39 <distributionManagement>
41 <id>ecomp-releases</id>
42 <name>ECOMP Release Repository</name>
43 <url>${nexusproxy}${releaseNexusPath}</url>
46 <id>ecomp-snapshots</id>
47 <name>ECOMP Snapshot Repository</name>
48 <url>${nexusproxy}${snapshotNexusPath}</url>
50 </distributionManagement>
56 <activeByDefault>false</activeByDefault>
62 <groupId>com.google.cloud.tools</groupId>
63 <artifactId>jib-maven-plugin</artifactId>
64 <version>${jib-maven-plugin.version}</version>
67 <mainClass>${app}</mainClass>
68 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
71 <image>${base.image}</image>
74 <image>${repository.name}</image>
76 <tag>${tag.version}</tag>
82 <phase>package</phase>
85 <goal>dockerBuild</goal>
103 <dependencyManagement>
106 <groupId>org.onap.cps</groupId>
107 <artifactId>cps-dependencies</artifactId>
108 <version>${project.version}</version>
110 <scope>import</scope>
113 <groupId>org.onap.cps</groupId>
114 <artifactId>cps-bom</artifactId>
115 <version>${project.version}</version>
117 <scope>import</scope>
120 </dependencyManagement>
125 <directory>src/main/resources</directory>
126 <filtering>true</filtering>
129 <directory>target/generated-sources/license</directory>
131 <include>third-party-licenses.txt</include>
135 <directory>target/generated-resources/licenses</directory>
137 <include>*.*</include>
139 <targetPath>third-party-licenses</targetPath>
145 <groupId>org.springframework.boot</groupId>
146 <artifactId>spring-boot-maven-plugin</artifactId>
147 <version>${spring-boot-maven-plugin.version}</version>
151 <goal>build-info</goal>
152 <goal>repackage</goal>
157 <!-- Swagger code generation. -->
159 <groupId>io.swagger.codegen.v3</groupId>
160 <artifactId>swagger-codegen-maven-plugin</artifactId>
161 <version>${swagger-codegen-maven-plugin.version}</version>
165 <goal>generate</goal>
168 <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
169 <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
170 <modelPackage>org.onap.cps.rest.model</modelPackage>
171 <apiPackage>org.onap.cps.rest.api</apiPackage>
172 <language>spring</language>
173 <generateSupportingFiles>false</generateSupportingFiles>
175 <sourceFolder>src/gen/java</sourceFolder>
176 <dateLibrary>java11</dateLibrary>
177 <interfaceOnly>true</interfaceOnly>
178 <useTags>true</useTags>
185 <groupId>com.google.cloud.tools</groupId>
186 <artifactId>jib-maven-plugin</artifactId>
187 <version>${jib-maven-plugin.version}</version>
190 <mainClass>${app}</mainClass>
191 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
194 <image>${base.image}</image>
197 <image>${repository.name}</image>
199 <tag>${tag.version}</tag>
205 <groupId>com.github.spotbugs</groupId>
206 <artifactId>spotbugs-maven-plugin</artifactId>
207 <version>${spotbugs-maven-plugin.version}</version>
210 <groupId>com.github.spotbugs</groupId>
211 <artifactId>spotbugs</artifactId>
212 <version>${spotbugs.version}</version>
215 <groupId>${project.groupId}</groupId>
216 <artifactId>spotbugs</artifactId>
217 <version>${project.version}</version>
220 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
221 <groupId>org.slf4j</groupId>
222 <artifactId>slf4j-simple</artifactId>
223 <version>${spotbugs.slf4j.version}</version>
229 <groupId>jp.skypencil.findbugs.slf4j</groupId>
230 <artifactId>bug-pattern</artifactId>
231 <version>1.5.0</version>
235 Enables analysis which takes more memory but finds more bugs.
236 If you run out of memory, changes the value of the effort element
240 <!-- Reports all bugs (other values are medium and max) -->
241 <threshold>Low</threshold>
242 <!-- Build doesn't fail if problems are found -->
243 <failOnError>true</failOnError>
244 <!-- References the excluded rules -->
245 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
246 <!-- Produces XML report -->
247 <xmlOutput>true</xmlOutput>
248 <!-- Configures the directory in which the XML report is created -->
249 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
253 Ensures that SpotBugs inspects source code when project is compiled.
256 <id>analyze-compile</id>
257 <phase>compile</phase>
268 <groupId>org.apache.maven.plugins</groupId>
269 <artifactId>maven-compiler-plugin</artifactId>
271 <source>${java.version}</source>
272 <target>${java.version}</target>
276 <groupId>org.apache.maven.plugins</groupId>
277 <artifactId>maven-checkstyle-plugin</artifactId>
280 <id>onap-license</id>
284 <phase>process-sources</phase>
286 <configLocation>onap-checkstyle/check-license.xml</configLocation>
287 <includeResources>false</includeResources>
288 <includeTestSourceDirectory>true</includeTestSourceDirectory>
289 <includeTestResources>false</includeTestResources>
291 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
293 <consoleOutput>false</consoleOutput>
294 <violationSeverity>warning</violationSeverity>
295 <failOnViolation>true</failOnViolation>
299 <id>onap-java-style</id>
303 <phase>process-sources</phase>
305 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
307 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
309 <includeResources>true</includeResources>
310 <includeTestSourceDirectory>true</includeTestSourceDirectory>
311 <includeTestResources>true</includeTestResources>
312 <consoleOutput>false</consoleOutput>
313 <violationSeverity>warning</violationSeverity>
314 <failOnViolation>true</failOnViolation>
318 <id>cps-java-style</id>
322 <phase>process-sources</phase>
324 <configLocation>cps-java-style.xml</configLocation>
326 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
328 <includeResources>true</includeResources>
329 <includeTestSourceDirectory>true</includeTestSourceDirectory>
330 <includeTestResources>true</includeTestResources>
331 <consoleOutput>true</consoleOutput>
332 <violationSeverity>warning</violationSeverity>
333 <failOnViolation>true</failOnViolation>
339 <groupId>org.onap.oparent</groupId>
340 <artifactId>checkstyle</artifactId>
341 <version>${oparent.version}</version>
344 <groupId>${project.groupId}</groupId>
345 <artifactId>checkstyle</artifactId>
346 <version>${project.version}</version>
350 <!-- Mandatory plugins for using Spock -->
352 <!-- The gmavenplus plugin is used to compile Groovy code.
353 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
354 <groupId>org.codehaus.gmavenplus</groupId>
355 <artifactId>gmavenplus-plugin</artifactId>
356 <version>1.9.0</version>
360 <goal>compileTests</goal>
365 <!-- Required because names of spec classes don't match default
366 Surefire patterns (`*Test` etc.) -->
368 <groupId>org.apache.maven.plugins</groupId>
369 <artifactId>maven-surefire-plugin</artifactId>
371 <!--suppress UnresolvedMavenProperty -->
372 <argLine>${surefireArgLine}</argLine>
373 <useFile>false</useFile>
375 <include>**/*Spec.java</include>
376 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
379 <exclude>**/IT*.java</exclude>
381 <environmentVariables>
383 disable privileged container usage to cleanup the test containers;
384 these will be removed automatically on jvm termination;
385 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
387 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
388 </environmentVariables>
392 <groupId>org.jacoco</groupId>
393 <artifactId>jacoco-maven-plugin</artifactId>
396 <id>default-prepare-agent</id>
398 <goal>prepare-agent</goal>
402 <id>coverage-check</id>
408 <exclude>org/onap/cps/rest/model/*</exclude>
410 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
413 <element>BUNDLE</element>
416 <counter>INSTRUCTION</counter>
417 <value>COVEREDRATIO</value>
418 <minimum>${minimum-coverage}</minimum>
428 <groupId>com.github.spotbugs</groupId>
429 <artifactId>spotbugs-maven-plugin</artifactId>