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