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>
98 <id>skip-db-tests</id>
100 <!-- exclude module tests by default till Jenkins is configured to support test containers -->
101 <activeByDefault>true</activeByDefault>
106 <groupId>org.apache.maven.plugins</groupId>
107 <artifactId>maven-surefire-plugin</artifactId>
110 <exclude>**/spi/impl/*Test.java</exclude>
119 <dependencyManagement>
122 <groupId>org.onap.cps</groupId>
123 <artifactId>cps-dependencies</artifactId>
124 <version>${project.version}</version>
126 <scope>import</scope>
129 <groupId>org.onap.cps</groupId>
130 <artifactId>cps-bom</artifactId>
131 <version>${project.version}</version>
133 <scope>import</scope>
136 </dependencyManagement>
141 <directory>src/main/resources</directory>
142 <filtering>true</filtering>
145 <directory>target/generated-sources/license</directory>
147 <include>third-party-licenses.txt</include>
151 <directory>target/generated-resources/licenses</directory>
153 <include>*.*</include>
155 <targetPath>third-party-licenses</targetPath>
161 <groupId>org.springframework.boot</groupId>
162 <artifactId>spring-boot-maven-plugin</artifactId>
163 <version>${spring-boot-maven-plugin.version}</version>
167 <goal>build-info</goal>
168 <goal>repackage</goal>
173 <!-- Swagger code generation. -->
175 <groupId>io.swagger.codegen.v3</groupId>
176 <artifactId>swagger-codegen-maven-plugin</artifactId>
177 <version>${swagger-codegen-maven-plugin.version}</version>
181 <goal>generate</goal>
184 <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
185 <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
186 <modelPackage>org.onap.cps.rest.model</modelPackage>
187 <apiPackage>org.onap.cps.rest.api</apiPackage>
188 <language>spring</language>
189 <generateSupportingFiles>false</generateSupportingFiles>
191 <sourceFolder>src/gen/java</sourceFolder>
192 <dateLibrary>java11</dateLibrary>
193 <interfaceOnly>true</interfaceOnly>
194 <useTags>true</useTags>
201 <groupId>com.google.cloud.tools</groupId>
202 <artifactId>jib-maven-plugin</artifactId>
203 <version>${jib-maven-plugin.version}</version>
206 <mainClass>${app}</mainClass>
207 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
210 <image>${base.image}</image>
213 <image>${repository.name}</image>
215 <tag>${tag.version}</tag>
224 <groupId>org.apache.maven.plugins</groupId>
225 <artifactId>maven-compiler-plugin</artifactId>
227 <source>${java.version}</source>
228 <target>${java.version}</target>
232 <groupId>org.apache.maven.plugins</groupId>
233 <artifactId>maven-checkstyle-plugin</artifactId>
236 <id>onap-license</id>
240 <phase>process-sources</phase>
242 <configLocation>onap-checkstyle/check-license.xml</configLocation>
243 <includeResources>false</includeResources>
244 <includeTestSourceDirectory>true</includeTestSourceDirectory>
245 <includeTestResources>false</includeTestResources>
247 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
249 <consoleOutput>false</consoleOutput>
250 <violationSeverity>warning</violationSeverity>
251 <failOnViolation>true</failOnViolation>
255 <id>onap-java-style</id>
259 <phase>process-sources</phase>
261 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
263 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
265 <includeResources>true</includeResources>
266 <includeTestSourceDirectory>true</includeTestSourceDirectory>
267 <includeTestResources>true</includeTestResources>
268 <consoleOutput>false</consoleOutput>
269 <violationSeverity>warning</violationSeverity>
270 <failOnViolation>true</failOnViolation>
274 <id>cps-java-style</id>
278 <phase>process-sources</phase>
280 <configLocation>cps-java-style.xml</configLocation>
282 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
284 <includeResources>true</includeResources>
285 <includeTestSourceDirectory>true</includeTestSourceDirectory>
286 <includeTestResources>true</includeTestResources>
287 <consoleOutput>true</consoleOutput>
288 <violationSeverity>warning</violationSeverity>
289 <failOnViolation>true</failOnViolation>
295 <groupId>org.onap.oparent</groupId>
296 <artifactId>checkstyle</artifactId>
297 <version>${oparent.version}</version>
300 <groupId>${project.groupId}</groupId>
301 <artifactId>checkstyle</artifactId>
302 <version>${project.version}</version>
306 <!-- Mandatory plugins for using Spock -->
308 <!-- The gmavenplus plugin is used to compile Groovy code.
309 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
310 <groupId>org.codehaus.gmavenplus</groupId>
311 <artifactId>gmavenplus-plugin</artifactId>
312 <version>1.9.0</version>
316 <goal>compileTests</goal>
321 <!-- Required because names of spec classes don't match default
322 Surefire patterns (`*Test` etc.) -->
324 <groupId>org.apache.maven.plugins</groupId>
325 <artifactId>maven-surefire-plugin</artifactId>
327 <!--suppress UnresolvedMavenProperty -->
328 <argLine>${surefireArgLine}</argLine>
329 <useFile>false</useFile>
331 <include>**/*Spec.java</include>
332 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
335 <exclude>**/IT*.java</exclude>
340 <groupId>org.jacoco</groupId>
341 <artifactId>jacoco-maven-plugin</artifactId>
344 <id>default-prepare-agent</id>
346 <goal>prepare-agent</goal>
350 <id>coverage-check</id>
356 <exclude>org/onap/cps/rest/model/*</exclude>
358 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
361 <element>BUNDLE</element>
364 <counter>INSTRUCTION</counter>
365 <value>COVEREDRATIO</value>
366 <minimum>${minimum-coverage}</minimum>