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.35</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 <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
30 <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
31 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
32 <tag.version>${project.version}</tag.version>
35 <distributionManagement>
37 <id>ecomp-releases</id>
38 <name>ECOMP Release Repository</name>
39 <url>${nexusproxy}${releaseNexusPath}</url>
42 <id>ecomp-snapshots</id>
43 <name>ECOMP Snapshot Repository</name>
44 <url>${nexusproxy}${snapshotNexusPath}</url>
46 </distributionManagement>
52 <activeByDefault>false</activeByDefault>
58 <groupId>com.google.cloud.tools</groupId>
59 <artifactId>jib-maven-plugin</artifactId>
60 <version>${jib-maven-plugin.version}</version>
63 <mainClass>${app}</mainClass>
64 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
67 <image>${base.image}</image>
70 <image>${repository.name}</image>
72 <tag>${tag.version}</tag>
78 <phase>package</phase>
81 <goal>dockerBuild</goal>
99 <dependencyManagement>
102 <groupId>org.onap.cps</groupId>
103 <artifactId>cps-dependencies</artifactId>
104 <version>${project.version}</version>
106 <scope>import</scope>
109 <groupId>org.onap.cps</groupId>
110 <artifactId>cps-bom</artifactId>
111 <version>${project.version}</version>
113 <scope>import</scope>
116 </dependencyManagement>
121 <directory>src/main/resources</directory>
122 <filtering>true</filtering>
125 <directory>target/generated-sources/license</directory>
127 <include>third-party-licenses.txt</include>
131 <directory>target/generated-resources/licenses</directory>
133 <include>*.*</include>
135 <targetPath>third-party-licenses</targetPath>
141 <groupId>org.springframework.boot</groupId>
142 <artifactId>spring-boot-maven-plugin</artifactId>
143 <version>${spring-boot-maven-plugin.version}</version>
147 <goal>build-info</goal>
148 <goal>repackage</goal>
153 <!-- Swagger code generation. -->
155 <groupId>io.swagger.codegen.v3</groupId>
156 <artifactId>swagger-codegen-maven-plugin</artifactId>
157 <version>${swagger-codegen-maven-plugin.version}</version>
161 <goal>generate</goal>
164 <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
165 <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
166 <modelPackage>org.onap.cps.rest.model</modelPackage>
167 <apiPackage>org.onap.cps.rest.api</apiPackage>
168 <language>spring</language>
169 <generateSupportingFiles>false</generateSupportingFiles>
171 <sourceFolder>src/gen/java</sourceFolder>
172 <dateLibrary>java11</dateLibrary>
173 <interfaceOnly>true</interfaceOnly>
174 <useTags>true</useTags>
181 <groupId>com.google.cloud.tools</groupId>
182 <artifactId>jib-maven-plugin</artifactId>
183 <version>${jib-maven-plugin.version}</version>
186 <mainClass>${app}</mainClass>
187 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
190 <image>${base.image}</image>
193 <image>${repository.name}</image>
195 <tag>${tag.version}</tag>
204 <groupId>org.apache.maven.plugins</groupId>
205 <artifactId>maven-compiler-plugin</artifactId>
207 <source>${java.version}</source>
208 <target>${java.version}</target>
212 <groupId>org.apache.maven.plugins</groupId>
213 <artifactId>maven-checkstyle-plugin</artifactId>
216 <id>onap-license</id>
220 <phase>process-sources</phase>
222 <configLocation>onap-checkstyle/check-license.xml</configLocation>
223 <includeResources>false</includeResources>
224 <includeTestSourceDirectory>true</includeTestSourceDirectory>
225 <includeTestResources>false</includeTestResources>
227 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
229 <consoleOutput>false</consoleOutput>
230 <violationSeverity>warning</violationSeverity>
231 <failOnViolation>true</failOnViolation>
235 <id>onap-java-style</id>
239 <phase>process-sources</phase>
241 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
243 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
245 <includeResources>true</includeResources>
246 <includeTestSourceDirectory>true</includeTestSourceDirectory>
247 <includeTestResources>true</includeTestResources>
248 <consoleOutput>false</consoleOutput>
249 <violationSeverity>warning</violationSeverity>
250 <failOnViolation>true</failOnViolation>
254 <id>cps-java-style</id>
258 <phase>process-sources</phase>
260 <configLocation>cps-java-style.xml</configLocation>
262 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
264 <includeResources>true</includeResources>
265 <includeTestSourceDirectory>true</includeTestSourceDirectory>
266 <includeTestResources>true</includeTestResources>
267 <consoleOutput>true</consoleOutput>
268 <violationSeverity>warning</violationSeverity>
269 <failOnViolation>true</failOnViolation>
275 <groupId>org.onap.oparent</groupId>
276 <artifactId>checkstyle</artifactId>
277 <version>${oparent.version}</version>
280 <groupId>${project.groupId}</groupId>
281 <artifactId>checkstyle</artifactId>
282 <version>${project.version}</version>
286 <!-- Mandatory plugins for using Spock -->
288 <!-- The gmavenplus plugin is used to compile Groovy code.
289 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
290 <groupId>org.codehaus.gmavenplus</groupId>
291 <artifactId>gmavenplus-plugin</artifactId>
292 <version>1.9.0</version>
296 <goal>compileTests</goal>
301 <!-- Required because names of spec classes don't match default
302 Surefire patterns (`*Test` etc.) -->
304 <groupId>org.apache.maven.plugins</groupId>
305 <artifactId>maven-surefire-plugin</artifactId>
307 <!--suppress UnresolvedMavenProperty -->
308 <argLine>${surefireArgLine}</argLine>
309 <useFile>false</useFile>
311 <include>**/*Spec.java</include>
312 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
315 <exclude>**/IT*.java</exclude>
317 <environmentVariables>
319 disable privileged container usage to cleanup the test containers;
320 these will be removed automatically on jvm termination;
321 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
323 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
324 </environmentVariables>
328 <groupId>org.jacoco</groupId>
329 <artifactId>jacoco-maven-plugin</artifactId>
332 <id>default-prepare-agent</id>
334 <goal>prepare-agent</goal>
338 <id>coverage-check</id>
344 <exclude>org/onap/cps/rest/model/*</exclude>
346 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
349 <element>BUNDLE</element>
352 <counter>INSTRUCTION</counter>
353 <value>COVEREDRATIO</value>
354 <minimum>${minimum-coverage}</minimum>