edb7ff5e8c3499f6f78191e6e954aff453b82fc3
[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.7-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             <exclusions>
110                 <exclusion>
111                     <groupId>org.junit.vintage</groupId>
112                     <artifactId>junit-vintage-engine</artifactId>
113                 </exclusion>
114             </exclusions>
115         </dependency>
116         <dependency>
117             <groupId>com.google.code.gson</groupId>
118             <artifactId>gson</artifactId>
119         </dependency>
120         <dependency>
121             <groupId>org.openapitools</groupId>
122             <artifactId>jackson-databind-nullable</artifactId>
123         </dependency>
124         <dependency>
125             <groupId>org.junit.jupiter</groupId>
126             <artifactId>junit-jupiter-api</artifactId>
127         </dependency>
128     </dependencies>
129
130     <build>
131         <plugins>
132             <!-- Swagger code generation. -->
133             <plugin>
134                 <groupId>org.openapitools</groupId>
135                 <artifactId>openapi-generator-maven-plugin</artifactId>
136                 <version>6.6.0</version>
137                 <executions>
138                     <execution>
139                         <id>ncmp-code-gen</id>
140                         <goals>
141                             <goal>generate</goal>
142                         </goals>
143                         <configuration>
144                             <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
145                             <invokerPackage>org.onap.cps.ncmp.rest.controller</invokerPackage>
146                             <modelPackage>org.onap.cps.ncmp.rest.model</modelPackage>
147                             <apiPackage>org.onap.cps.ncmp.rest.api</apiPackage>
148                             <generatorName>spring</generatorName>
149                             <generateSupportingFiles>false</generateSupportingFiles>
150                             <generateAliasAsModel>true</generateAliasAsModel>
151                             <configOptions>
152                                 <sourceFolder>src/gen/java</sourceFolder>
153                                 <dateLibrary>java11</dateLibrary>
154                                 <interfaceOnly>true</interfaceOnly>
155                                 <useSpringBoot3>true</useSpringBoot3>
156                                 <useTags>true</useTags>
157                                 <openApiNullable>false</openApiNullable>
158                                 <skipDefaultInterface>true</skipDefaultInterface>
159                             </configOptions>
160                         </configuration>
161                     </execution>
162                     <execution>
163                         <id>ncmp-code-gen-inventory</id>
164                         <goals>
165                             <goal>generate</goal>
166                         </goals>
167                         <configuration>
168                             <inputSpec>${project.basedir}/docs/openapi/openapi-inventory.yml</inputSpec>
169                             <invokerPackage>org.onap.cps.ncmp.rest.controller</invokerPackage>
170                             <modelPackage>org.onap.cps.ncmp.rest.model</modelPackage>
171                             <apiPackage>org.onap.cps.ncmp.rest.api</apiPackage>
172                             <generatorName>spring</generatorName>
173                             <generateSupportingFiles>false</generateSupportingFiles>
174                             <configOptions>
175                                 <sourceFolder>src/gen/java</sourceFolder>
176                                 <dateLibrary>java11</dateLibrary>
177                                 <interfaceOnly>true</interfaceOnly>
178                                 <useSpringBoot3>true</useSpringBoot3>
179                                 <useTags>true</useTags>
180                                 <openApiNullable>false</openApiNullable>
181                                 <skipDefaultInterface>true</skipDefaultInterface>
182                             </configOptions>
183                         </configuration>
184                     </execution>
185                     <execution>
186                         <id>ncmp-inventory-openapi-yaml-gen</id>
187                         <goals>
188                             <goal>generate</goal>
189                         </goals>
190                         <phase>compile</phase>
191                         <configuration>
192                             <inputSpec>${project.basedir}/docs/openapi/openapi-inventory.yml</inputSpec>
193                             <generatorName>spring</generatorName>
194                             <configOptions>
195                                 <outputFile>openapi-inventory.yaml</outputFile>
196                                 <useSpringBoot3>true</useSpringBoot3>
197                             </configOptions>
198                         </configuration>
199                     </execution>
200                     <execution>
201                         <id>ncmp-openapi-yaml-gen</id>
202                         <goals>
203                             <goal>generate</goal>
204                         </goals>
205                         <phase>compile</phase>
206                         <configuration>
207                             <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
208                             <generatorName>openapi-yaml</generatorName>
209                             <configOptions>
210                                 <outputFile>openapi.yaml</outputFile>
211                             </configOptions>
212                         </configuration>
213                     </execution>
214                 </executions>
215             </plugin>
216             <plugin>
217                 <groupId>org.apache.maven.plugins</groupId>
218                 <artifactId>maven-resources-plugin</artifactId>
219                 <executions>
220                     <execution>
221                         <id>copy-resources</id>
222                         <phase>compile</phase>
223                         <goals>
224                             <goal>copy-resources</goal>
225                         </goals>
226                         <configuration>
227                             <outputDirectory>${project.basedir}/target/classes/static/api-docs/cps-ncmp
228                             </outputDirectory>
229                             <resources>
230                                 <resource>
231                                     <directory>${project.basedir}/target/generated-sources/openapi/</directory>
232                                     <includes>
233                                         <include>openapi*.yaml</include>
234                                     </includes>
235                                 </resource>
236                             </resources>
237                         </configuration>
238                     </execution>
239                 </executions>
240             </plugin>
241         </plugins>
242     </build>
243 </project>