Merge "RTD change to document migration to Spring Boot 3.0"
[cps.git] / cps-ncmp-rest / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4   Copyright (C) 2021-2023 Nordix Foundation
5   Modifications Copyright (C) 2021 Bell Canada
6   ================================================================================
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10
11         http://www.apache.org/licenses/LICENSE-2.0
12
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18
19   SPDX-License-Identifier: Apache-2.0
20   ============LICENSE_END=========================================================
21 -->
22
23 <project xmlns="http://maven.apache.org/POM/4.0.0"
24          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
26     <modelVersion>4.0.0</modelVersion>
27     <parent>
28         <groupId>org.onap.cps</groupId>
29         <artifactId>cps-parent</artifactId>
30         <version>3.3.8-SNAPSHOT</version>
31         <relativePath>../cps-parent/pom.xml</relativePath>
32     </parent>
33
34     <artifactId>cps-ncmp-rest</artifactId>
35
36     <properties>
37         <minimum-coverage>0.99</minimum-coverage>
38     </properties>
39
40     <dependencies>
41         <dependency>
42             <groupId>${project.groupId}</groupId>
43             <artifactId>cps-ncmp-service</artifactId>
44             <version>${project.version}</version>
45         </dependency>
46         <dependency>
47             <groupId>org.springframework.boot</groupId>
48             <artifactId>spring-boot-starter-web</artifactId>
49             <exclusions>
50                 <exclusion>
51                     <groupId>org.springframework.boot</groupId>
52                     <artifactId>spring-boot-starter-tomcat</artifactId>
53                 </exclusion>
54             </exclusions>
55         </dependency>
56         <dependency>
57             <groupId>org.springframework.boot</groupId>
58             <artifactId>spring-boot-starter-validation</artifactId>
59         </dependency>
60         <dependency>
61             <groupId>org.springframework.boot</groupId>
62             <artifactId>spring-boot-starter-jetty</artifactId>
63         </dependency>
64         <dependency>
65             <groupId>io.swagger.core.v3</groupId>
66             <artifactId>swagger-annotations</artifactId>
67         </dependency>
68         <dependency>
69             <groupId>io.swagger.core.v3</groupId>
70             <artifactId>swagger-models</artifactId>
71         </dependency>
72         <dependency>
73             <groupId>org.mapstruct</groupId>
74             <artifactId>mapstruct</artifactId>
75         </dependency>
76         <dependency>
77             <groupId>org.mapstruct</groupId>
78             <artifactId>mapstruct-processor</artifactId>
79         </dependency>
80         <!-- T E S T   D E P E N D E N C I E S -->
81         <dependency>
82             <groupId>org.codehaus.groovy</groupId>
83             <artifactId>groovy</artifactId>
84             <scope>test</scope>
85         </dependency>
86         <dependency>
87             <groupId>org.codehaus.groovy</groupId>
88             <artifactId>groovy-json</artifactId>
89             <scope>test</scope>
90         </dependency>
91         <dependency>
92             <groupId>org.spockframework</groupId>
93             <artifactId>spock-core</artifactId>
94             <scope>test</scope>
95         </dependency>
96         <dependency>
97             <groupId>org.spockframework</groupId>
98             <artifactId>spock-spring</artifactId>
99             <scope>test</scope>
100         </dependency>
101         <dependency>
102             <groupId>cglib</groupId>
103             <artifactId>cglib-nodep</artifactId>
104             <scope>test</scope>
105         </dependency>
106         <dependency>
107             <groupId>org.springframework.boot</groupId>
108             <artifactId>spring-boot-starter-test</artifactId>
109             <scope>test</scope>
110             <exclusions>
111                 <exclusion>
112                     <groupId>org.junit.vintage</groupId>
113                     <artifactId>junit-vintage-engine</artifactId>
114                 </exclusion>
115             </exclusions>
116         </dependency>
117         <dependency>
118             <groupId>com.google.code.gson</groupId>
119             <artifactId>gson</artifactId>
120         </dependency>
121         <dependency>
122             <groupId>org.openapitools</groupId>
123             <artifactId>jackson-databind-nullable</artifactId>
124         </dependency>
125         <dependency>
126             <groupId>org.junit.jupiter</groupId>
127             <artifactId>junit-jupiter</artifactId>
128         </dependency>
129     </dependencies>
130
131     <build>
132         <plugins>
133             <!-- Swagger code generation. -->
134             <plugin>
135                 <groupId>org.openapitools</groupId>
136                 <artifactId>openapi-generator-maven-plugin</artifactId>
137                 <version>6.6.0</version>
138                 <executions>
139                     <execution>
140                         <id>ncmp-code-gen</id>
141                         <goals>
142                             <goal>generate</goal>
143                         </goals>
144                         <configuration>
145                             <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
146                             <invokerPackage>org.onap.cps.ncmp.rest.controller</invokerPackage>
147                             <modelPackage>org.onap.cps.ncmp.rest.model</modelPackage>
148                             <apiPackage>org.onap.cps.ncmp.rest.api</apiPackage>
149                             <generatorName>spring</generatorName>
150                             <generateSupportingFiles>false</generateSupportingFiles>
151                             <generateAliasAsModel>true</generateAliasAsModel>
152                             <configOptions>
153                                 <sourceFolder>src/gen/java</sourceFolder>
154                                 <dateLibrary>java11</dateLibrary>
155                                 <interfaceOnly>true</interfaceOnly>
156                                 <useSpringBoot3>true</useSpringBoot3>
157                                 <useTags>true</useTags>
158                                 <openApiNullable>false</openApiNullable>
159                                 <skipDefaultInterface>true</skipDefaultInterface>
160                             </configOptions>
161                         </configuration>
162                     </execution>
163                     <execution>
164                         <id>ncmp-code-gen-inventory</id>
165                         <goals>
166                             <goal>generate</goal>
167                         </goals>
168                         <configuration>
169                             <inputSpec>${project.basedir}/docs/openapi/openapi-inventory.yml</inputSpec>
170                             <invokerPackage>org.onap.cps.ncmp.rest.controller</invokerPackage>
171                             <modelPackage>org.onap.cps.ncmp.rest.model</modelPackage>
172                             <apiPackage>org.onap.cps.ncmp.rest.api</apiPackage>
173                             <generatorName>spring</generatorName>
174                             <generateSupportingFiles>false</generateSupportingFiles>
175                             <configOptions>
176                                 <sourceFolder>src/gen/java</sourceFolder>
177                                 <dateLibrary>java11</dateLibrary>
178                                 <interfaceOnly>true</interfaceOnly>
179                                 <useSpringBoot3>true</useSpringBoot3>
180                                 <useTags>true</useTags>
181                                 <openApiNullable>false</openApiNullable>
182                                 <skipDefaultInterface>true</skipDefaultInterface>
183                             </configOptions>
184                         </configuration>
185                     </execution>
186                     <execution>
187                         <id>ncmp-inventory-openapi-yaml-gen</id>
188                         <goals>
189                             <goal>generate</goal>
190                         </goals>
191                         <phase>compile</phase>
192                         <configuration>
193                             <inputSpec>${project.basedir}/docs/openapi/openapi-inventory.yml</inputSpec>
194                             <generatorName>spring</generatorName>
195                             <configOptions>
196                                 <outputFile>openapi-inventory.yaml</outputFile>
197                                 <useSpringBoot3>true</useSpringBoot3>
198                             </configOptions>
199                         </configuration>
200                     </execution>
201                     <execution>
202                         <id>ncmp-openapi-yaml-gen</id>
203                         <goals>
204                             <goal>generate</goal>
205                         </goals>
206                         <phase>compile</phase>
207                         <configuration>
208                             <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
209                             <generatorName>openapi-yaml</generatorName>
210                             <configOptions>
211                                 <outputFile>openapi.yaml</outputFile>
212                             </configOptions>
213                         </configuration>
214                     </execution>
215                 </executions>
216             </plugin>
217             <plugin>
218                 <groupId>org.apache.maven.plugins</groupId>
219                 <artifactId>maven-resources-plugin</artifactId>
220                 <executions>
221                     <execution>
222                         <id>copy-resources</id>
223                         <phase>compile</phase>
224                         <goals>
225                             <goal>copy-resources</goal>
226                         </goals>
227                         <configuration>
228                             <outputDirectory>${project.basedir}/target/classes/static/api-docs/cps-ncmp
229                             </outputDirectory>
230                             <resources>
231                                 <resource>
232                                     <directory>${project.basedir}/target/generated-sources/openapi/</directory>
233                                     <includes>
234                                         <include>openapi*.yaml</include>
235                                     </includes>
236                                 </resource>
237                             </resources>
238                         </configuration>
239                     </execution>
240                 </executions>
241             </plugin>
242         </plugins>
243     </build>
244 </project>