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 <java.version>11</java.version>
20 <maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
21 <maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
22 <maven-replacer-plugin.version>1.5.3</maven-replacer-plugin.version>
23 <oparent.version>3.1.0</oparent.version>
24 <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
25 <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
26 <swagger-ui.version>3.35.0</swagger-ui.version>
29 <dependencyManagement>
32 <groupId>org.onap.cps</groupId>
33 <artifactId>cps-dependencies</artifactId>
34 <version>${project.version}</version>
39 <groupId>org.onap.cps</groupId>
40 <artifactId>cps-bom</artifactId>
41 <version>${project.version}</version>
46 </dependencyManagement>
51 <directory>src/main/resources</directory>
52 <filtering>true</filtering>
55 <directory>target/generated-sources/license</directory>
57 <include>third-party-licenses.txt</include>
61 <directory>target/generated-resources/licenses</directory>
63 <include>*.*</include>
65 <targetPath>third-party-licenses</targetPath>
71 <groupId>org.springframework.boot</groupId>
72 <artifactId>spring-boot-maven-plugin</artifactId>
73 <version>${spring-boot-maven-plugin.version}</version>
77 <goal>repackage</goal>
82 <!-- Swagger code generation. -->
84 <groupId>io.swagger.codegen.v3</groupId>
85 <artifactId>swagger-codegen-maven-plugin</artifactId>
86 <version>${swagger-codegen-maven-plugin.version}</version>
93 <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
94 <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
95 <modelPackage>org.onap.cps.rest.model</modelPackage>
96 <apiPackage>org.onap.cps.rest.api</apiPackage>
97 <language>spring</language>
98 <generateSupportingFiles>false</generateSupportingFiles>
100 <sourceFolder>src/gen/java</sourceFolder>
101 <dateLibrary>java11</dateLibrary>
102 <interfaceOnly>true</interfaceOnly>
103 <useTags>true</useTags>
110 <!-- Download Swagger UI webjar. -->
111 <groupId>org.apache.maven.plugins</groupId>
112 <artifactId>maven-dependency-plugin</artifactId>
113 <version>${maven-dependency-plugin.version}</version>
116 <phase>prepare-package</phase>
123 <groupId>org.webjars</groupId>
124 <artifactId>swagger-ui</artifactId>
125 <version>${swagger-ui.version}</version>
129 ${project.build.directory}/swagger-ui-${swagger-ui.version}
136 <!-- Copy Swagger UI resources to static resources directory. -->
137 <groupId>org.apache.maven.plugins</groupId>
138 <artifactId>maven-resources-plugin</artifactId>
139 <version>${maven-resources-plugin.version}</version>
142 <id>copy-resources</id>
143 <phase>prepare-package</phase>
145 <goal>copy-resources</goal>
148 <outputDirectory>${project.build.outputDirectory}/static/swagger-ui
153 ${project.build.directory}/swagger-ui-${swagger-ui.version}/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}/
156 <exclude>**/*.gz</exclude>
165 <!-- Replace the OpenAPI specification example URL with the local one. -->
166 <groupId>com.google.code.maven-replacer-plugin</groupId>
167 <artifactId>replacer</artifactId>
168 <version>${maven-replacer-plugin.version}</version>
171 <phase>prepare-package</phase>
178 <file>${project.build.outputDirectory}/static/swagger-ui/index.html</file>
181 <token>https://petstore.swagger.io/v2/swagger.json</token>
182 <value>/api/cps/openapi.json</value>
191 <groupId>org.apache.maven.plugins</groupId>
192 <artifactId>maven-compiler-plugin</artifactId>
194 <source>${java.version}</source>
195 <target>${java.version}</target>
199 <groupId>org.apache.maven.plugins</groupId>
200 <artifactId>maven-checkstyle-plugin</artifactId>
203 <id>onap-java-style</id>
207 <phase>process-sources</phase>
209 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
210 <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
211 <includeResources>true</includeResources>
212 <includeTestSourceDirectory>true</includeTestSourceDirectory>
213 <includeTestResources>true</includeTestResources>
214 <consoleOutput>false</consoleOutput>
215 <violationSeverity>warning</violationSeverity>
216 <failOnViolation>true</failOnViolation>
222 <groupId>org.onap.oparent</groupId>
223 <artifactId>checkstyle</artifactId>
224 <version>${oparent.version}</version>
228 <!-- Mandatory plugins for using Spock -->
230 <!-- The gmavenplus plugin is used to compile Groovy code.
231 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
232 <groupId>org.codehaus.gmavenplus</groupId>
233 <artifactId>gmavenplus-plugin</artifactId>
234 <version>1.9.0</version>
238 <goal>compileTests</goal>
243 <!-- Required because names of spec classes don't match default
244 Surefire patterns (`*Test` etc.) -->
246 <groupId>org.apache.maven.plugins</groupId>
247 <artifactId>maven-surefire-plugin</artifactId>
248 <version>3.0.0-M5</version>
250 <useFile>false</useFile>
252 <include>**/*Spec.java</include>
253 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->