b3ae81be5886447a992120f104ba45bfcc1c4dd7
[cps.git] / cps-ncmp-rest / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4   Copyright (C) 2021-2022 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.0.0-SNAPSHOT</version>
31         <relativePath>../cps-parent/pom.xml</relativePath>
32     </parent>
33
34     <artifactId>cps-ncmp-rest</artifactId>
35
36     <dependencies>
37         <dependency>
38             <groupId>${project.groupId}</groupId>
39             <artifactId>cps-ncmp-service</artifactId>
40             <version>${project.version}</version>
41         </dependency>
42         <dependency>
43             <groupId>org.springframework.boot</groupId>
44             <artifactId>spring-boot-starter-web</artifactId>
45             <exclusions>
46                 <exclusion>
47                     <groupId>org.springframework.boot</groupId>
48                     <artifactId>spring-boot-starter-tomcat</artifactId>
49                 </exclusion>
50             </exclusions>
51         </dependency>
52         <dependency>
53             <groupId>org.springframework.boot</groupId>
54             <artifactId>spring-boot-starter-validation</artifactId>
55         </dependency>
56         <dependency>
57             <groupId>org.springframework.boot</groupId>
58             <artifactId>spring-boot-starter-jetty</artifactId>
59         </dependency>
60         <dependency>
61             <groupId>io.swagger.core.v3</groupId>
62             <artifactId>swagger-annotations</artifactId>
63         </dependency>
64         <!-- T E S T   D E P E N D E N C I E S -->
65         <dependency>
66             <groupId>org.codehaus.groovy</groupId>
67             <artifactId>groovy</artifactId>
68             <scope>test</scope>
69         </dependency>
70         <dependency>
71             <groupId>org.codehaus.groovy</groupId>
72             <artifactId>groovy-json</artifactId>
73             <scope>test</scope>
74         </dependency>
75         <dependency>
76             <groupId>org.spockframework</groupId>
77             <artifactId>spock-core</artifactId>
78             <scope>test</scope>
79         </dependency>
80         <dependency>
81             <groupId>org.spockframework</groupId>
82             <artifactId>spock-spring</artifactId>
83             <scope>test</scope>
84         </dependency>
85         <dependency>
86             <groupId>cglib</groupId>
87             <artifactId>cglib-nodep</artifactId>
88             <scope>test</scope>
89         </dependency>
90         <dependency>
91             <groupId>org.springframework.boot</groupId>
92             <artifactId>spring-boot-starter-test</artifactId>
93             <scope>test</scope>
94             <exclusions>
95                 <exclusion>
96                     <groupId>org.junit.vintage</groupId>
97                     <artifactId>junit-vintage-engine</artifactId>
98                 </exclusion>
99             </exclusions>
100         </dependency>
101         <dependency>
102             <groupId>com.google.code.gson</groupId>
103             <artifactId>gson</artifactId>
104         </dependency>
105     </dependencies>
106
107     <build>
108         <plugins>
109             <!-- Swagger code generation. -->
110             <plugin>
111                 <groupId>io.swagger.codegen.v3</groupId>
112                 <artifactId>swagger-codegen-maven-plugin</artifactId>
113                 <executions>
114                     <execution>
115                         <id>ncmp-code-gen</id>
116                         <goals>
117                             <goal>generate</goal>
118                         </goals>
119                         <configuration>
120                             <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
121                             <invokerPackage>org.onap.cps.ncmp.rest.controller</invokerPackage>
122                             <modelPackage>org.onap.cps.ncmp.rest.model</modelPackage>
123                             <apiPackage>org.onap.cps.ncmp.rest.api</apiPackage>
124                             <language>spring</language>
125                             <generateSupportingFiles>false</generateSupportingFiles>
126                             <configOptions>
127                                 <sourceFolder>src/gen/java</sourceFolder>
128                                 <dateLibrary>java11</dateLibrary>
129                                 <interfaceOnly>true</interfaceOnly>
130                                 <useTags>true</useTags>
131                             </configOptions>
132                         </configuration>
133                     </execution>
134                     <execution>
135                         <id>ncmp-code-gen-inventory</id>
136                         <goals>
137                             <goal>generate</goal>
138                         </goals>
139                         <configuration>
140                             <inputSpec>${project.basedir}/docs/openapi/openapi-inventory.yml</inputSpec>
141                             <invokerPackage>org.onap.cps.ncmp.rest.controller</invokerPackage>
142                             <modelPackage>org.onap.cps.ncmp.rest.model</modelPackage>
143                             <apiPackage>org.onap.cps.ncmp.rest.api</apiPackage>
144                             <language>spring</language>
145                             <generateSupportingFiles>false</generateSupportingFiles>
146                             <configOptions>
147                                 <sourceFolder>src/gen/java</sourceFolder>
148                                 <dateLibrary>java11</dateLibrary>
149                                 <interfaceOnly>true</interfaceOnly>
150                                 <useTags>true</useTags>
151                             </configOptions>
152                         </configuration>
153                     </execution>
154                     <execution>
155                         <id>ncmp-inventory-openapi-yaml-gen</id>
156                         <goals>
157                             <goal>generate</goal>
158                         </goals>
159                         <phase>compile</phase>
160                         <configuration>
161                             <inputSpec>${project.basedir}/docs/openapi/openapi-inventory.yml</inputSpec>
162                             <language>openapi-yaml</language>
163                             <configOptions>
164                                 <outputFile>openapi-inventory.yaml</outputFile>
165                             </configOptions>
166                         </configuration>
167                     </execution>
168                 </executions>
169             </plugin>
170             <plugin>
171                 <artifactId>maven-resources-plugin</artifactId>
172                 <executions>
173                     <execution>
174                         <id>copy-resources</id>
175                         <phase>compile</phase>
176                         <goals>
177                             <goal>copy-resources</goal>
178                         </goals>
179                         <configuration>
180                             <outputDirectory>${project.basedir}/target/classes/static/api-docs/cps-ncmp</outputDirectory>
181                             <resources>
182                                 <resource>
183                                     <directory>${project.basedir}/target/generated-sources/swagger/</directory>
184                                     <includes>
185                                         <include>openapi*.yaml</include>
186                                     </includes>
187                                 </resource>
188                             </resources>
189                         </configuration>
190                     </execution>
191                 </executions>
192             </plugin>
193         </plugins>
194     </build>
195 </project>