Add ncmp endpoints to swagger-ui
[cps.git] / cps-ncmp-rest / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4   Copyright (C) 2021 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>1.1.0-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.5</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     <!-- T E S T   D E P E N D E N C I E S -->
69     <dependency>
70         <groupId>org.codehaus.groovy</groupId>
71         <artifactId>groovy</artifactId>
72         <scope>test</scope>
73     </dependency>
74     <dependency>
75         <groupId>org.codehaus.groovy</groupId>
76         <artifactId>groovy-json</artifactId>
77         <scope>test</scope>
78     </dependency>
79     <dependency>
80         <groupId>org.spockframework</groupId>
81         <artifactId>spock-core</artifactId>
82         <scope>test</scope>
83     </dependency>
84     <dependency>
85         <groupId>org.spockframework</groupId>
86         <artifactId>spock-spring</artifactId>
87         <scope>test</scope>
88     </dependency>
89     <dependency>
90         <groupId>cglib</groupId>
91         <artifactId>cglib-nodep</artifactId>
92         <scope>test</scope>
93     </dependency>
94     <dependency>
95         <groupId>org.springframework.boot</groupId>
96         <artifactId>spring-boot-starter-test</artifactId>
97         <scope>test</scope>
98         <exclusions>
99             <exclusion>
100                 <groupId>org.junit.vintage</groupId>
101                 <artifactId>junit-vintage-engine</artifactId>
102             </exclusion>
103         </exclusions>
104     </dependency>
105     <dependency>
106         <groupId>com.google.code.gson</groupId>
107         <artifactId>gson</artifactId>
108     </dependency>
109 </dependencies>
110
111 <build>
112     <plugins>
113         <!-- Swagger code generation. -->
114         <plugin>
115             <groupId>io.swagger.codegen.v3</groupId>
116             <artifactId>swagger-codegen-maven-plugin</artifactId>
117             <executions>
118                 <execution>
119                     <id>code-gen</id>
120                     <goals>
121                         <goal>generate</goal>
122                     </goals>
123                     <configuration>
124                         <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
125                         <invokerPackage>org.onap.cps.ncmp.rest.controller</invokerPackage>
126                         <modelPackage>org.onap.cps.ncmp.rest.model</modelPackage>
127                         <apiPackage>org.onap.cps.ncmp.rest.api</apiPackage>
128                         <language>spring</language>
129                         <generateSupportingFiles>false</generateSupportingFiles>
130                         <configOptions>
131                             <sourceFolder>src/gen/java</sourceFolder>
132                             <dateLibrary>java11</dateLibrary>
133                             <interfaceOnly>true</interfaceOnly>
134                             <useTags>true</useTags>
135                         </configOptions>
136                     </configuration>
137                 </execution>
138             </executions>
139         </plugin>
140         <plugin>
141             <artifactId>maven-resources-plugin</artifactId>
142             <executions>
143                 <execution>
144                     <id>copy-resources</id>
145                     <phase>compile</phase>
146                     <goals>
147                         <goal>copy-resources</goal>
148                     </goals>
149                     <configuration>
150                         <outputDirectory>${project.basedir}/target/classes/static/api-docs/cps-ncmp</outputDirectory>
151                         <resources>
152                             <resource>
153                                 <directory>${project.basedir}/target/generated-sources/swagger/</directory>
154                                 <includes>
155                                     <include>openapi.yaml</include>
156                                 </includes>
157                             </resource>
158                         </resources>
159                     </configuration>
160                 </execution>
161             </executions>
162         </plugin>
163     </plugins>
164 </build>
165 </project>