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.20</minimum-coverage>
24 <nexusproxy>https://nexus.onap.org</nexusproxy>
25 <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
26 <oparent.version>3.1.0</oparent.version>
27 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
28 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
29 <repository.name>nexus3.onap.org:10001/onap/cps-service</repository.name>
30 <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
31 <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
32 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
33 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
34 <tag.version>${project.version}</tag.version>
37 <distributionManagement>
39 <id>ecomp-releases</id>
40 <name>ECOMP Release Repository</name>
41 <url>${nexusproxy}${releaseNexusPath}</url>
44 <id>ecomp-snapshots</id>
45 <name>ECOMP Snapshot Repository</name>
46 <url>${nexusproxy}${snapshotNexusPath}</url>
48 </distributionManagement>
54 <activeByDefault>false</activeByDefault>
60 <groupId>com.google.cloud.tools</groupId>
61 <artifactId>jib-maven-plugin</artifactId>
62 <version>${jib-maven-plugin.version}</version>
65 <mainClass>${app}</mainClass>
66 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
69 <image>${base.image}</image>
72 <image>${repository.name}</image>
74 <tag>${tag.version}</tag>
80 <phase>package</phase>
83 <goal>dockerBuild</goal>
100 <id>skip-db-tests</id>
102 <!-- exclude module tests by default till Jenkins is configured to support test containers -->
103 <activeByDefault>true</activeByDefault>
108 <groupId>org.apache.maven.plugins</groupId>
109 <artifactId>maven-surefire-plugin</artifactId>
112 <exclude>**/spi/impl/*Test.java</exclude>
121 <dependencyManagement>
124 <groupId>org.onap.cps</groupId>
125 <artifactId>cps-dependencies</artifactId>
126 <version>${project.version}</version>
128 <scope>import</scope>
131 <groupId>org.onap.cps</groupId>
132 <artifactId>cps-bom</artifactId>
133 <version>${project.version}</version>
135 <scope>import</scope>
138 </dependencyManagement>
143 <directory>src/main/resources</directory>
144 <filtering>true</filtering>
147 <directory>target/generated-sources/license</directory>
149 <include>third-party-licenses.txt</include>
153 <directory>target/generated-resources/licenses</directory>
155 <include>*.*</include>
157 <targetPath>third-party-licenses</targetPath>
163 <groupId>org.springframework.boot</groupId>
164 <artifactId>spring-boot-maven-plugin</artifactId>
165 <version>${spring-boot-maven-plugin.version}</version>
169 <goal>build-info</goal>
170 <goal>repackage</goal>
175 <!-- Swagger code generation. -->
177 <groupId>io.swagger.codegen.v3</groupId>
178 <artifactId>swagger-codegen-maven-plugin</artifactId>
179 <version>${swagger-codegen-maven-plugin.version}</version>
183 <goal>generate</goal>
186 <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
187 <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
188 <modelPackage>org.onap.cps.rest.model</modelPackage>
189 <apiPackage>org.onap.cps.rest.api</apiPackage>
190 <language>spring</language>
191 <generateSupportingFiles>false</generateSupportingFiles>
193 <sourceFolder>src/gen/java</sourceFolder>
194 <dateLibrary>java11</dateLibrary>
195 <interfaceOnly>true</interfaceOnly>
196 <useTags>true</useTags>
203 <groupId>com.google.cloud.tools</groupId>
204 <artifactId>jib-maven-plugin</artifactId>
205 <version>${jib-maven-plugin.version}</version>
208 <mainClass>${app}</mainClass>
209 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
212 <image>${base.image}</image>
215 <image>${repository.name}</image>
217 <tag>${tag.version}</tag>
226 <groupId>org.apache.maven.plugins</groupId>
227 <artifactId>maven-compiler-plugin</artifactId>
229 <source>${java.version}</source>
230 <target>${java.version}</target>
234 <groupId>org.apache.maven.plugins</groupId>
235 <artifactId>maven-checkstyle-plugin</artifactId>
238 <id>onap-license</id>
242 <phase>process-sources</phase>
244 <configLocation>onap-checkstyle/check-license.xml</configLocation>
245 <includeResources>false</includeResources>
246 <includeTestSourceDirectory>true</includeTestSourceDirectory>
247 <includeTestResources>false</includeTestResources>
249 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
251 <consoleOutput>false</consoleOutput>
252 <violationSeverity>warning</violationSeverity>
253 <failOnViolation>true</failOnViolation>
257 <id>onap-java-style</id>
261 <phase>process-sources</phase>
263 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
265 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
267 <includeResources>true</includeResources>
268 <includeTestSourceDirectory>true</includeTestSourceDirectory>
269 <includeTestResources>true</includeTestResources>
270 <consoleOutput>false</consoleOutput>
271 <violationSeverity>warning</violationSeverity>
272 <failOnViolation>true</failOnViolation>
276 <id>cps-java-style</id>
280 <phase>process-sources</phase>
282 <configLocation>cps-java-style.xml</configLocation>
284 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
286 <includeResources>true</includeResources>
287 <includeTestSourceDirectory>true</includeTestSourceDirectory>
288 <includeTestResources>true</includeTestResources>
289 <consoleOutput>true</consoleOutput>
290 <violationSeverity>warning</violationSeverity>
291 <failOnViolation>true</failOnViolation>
297 <groupId>org.onap.oparent</groupId>
298 <artifactId>checkstyle</artifactId>
299 <version>${oparent.version}</version>
302 <groupId>${project.groupId}</groupId>
303 <artifactId>checkstyle</artifactId>
304 <version>${project.version}</version>
308 <!-- Mandatory plugins for using Spock -->
310 <!-- The gmavenplus plugin is used to compile Groovy code.
311 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
312 <groupId>org.codehaus.gmavenplus</groupId>
313 <artifactId>gmavenplus-plugin</artifactId>
314 <version>1.9.0</version>
318 <goal>compileTests</goal>
323 <!-- Required because names of spec classes don't match default
324 Surefire patterns (`*Test` etc.) -->
326 <groupId>org.apache.maven.plugins</groupId>
327 <artifactId>maven-surefire-plugin</artifactId>
329 <argLine>${surefireArgLine}</argLine>
330 <useFile>false</useFile>
332 <include>**/*Spec.java</include>
333 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
336 <exclude>**/IT*.java</exclude>
341 <groupId>org.jacoco</groupId>
342 <artifactId>jacoco-maven-plugin</artifactId>
345 <id>default-prepare-agent</id>
347 <goal>prepare-agent</goal>
351 <id>coverage-check</id>
356 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
359 <element>BUNDLE</element>
362 <counter>INSTRUCTION</counter>
363 <value>COVEREDRATIO</value>
364 <minimum>${minimum-coverage}</minimum>