Bring back coverage to 1.00 for ncmp-rest
[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.6-SNAPSHOT</version>
31         <relativePath>../cps-parent/pom.xml</relativePath>
32     </parent>
33
34     <artifactId>cps-ncmp-rest</artifactId>
35
36     <properties>
37         <minimum-coverage>1.00</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>org.mapstruct</groupId>
70             <artifactId>mapstruct</artifactId>
71         </dependency>
72         <dependency>
73             <groupId>org.mapstruct</groupId>
74             <artifactId>mapstruct-processor</artifactId>
75         </dependency>
76         <!-- T E S T   D E P E N D E N C I E S -->
77         <dependency>
78             <groupId>org.codehaus.groovy</groupId>
79             <artifactId>groovy</artifactId>
80             <scope>test</scope>
81         </dependency>
82         <dependency>
83             <groupId>org.codehaus.groovy</groupId>
84             <artifactId>groovy-json</artifactId>
85             <scope>test</scope>
86         </dependency>
87         <dependency>
88             <groupId>org.spockframework</groupId>
89             <artifactId>spock-core</artifactId>
90             <scope>test</scope>
91         </dependency>
92         <dependency>
93             <groupId>org.spockframework</groupId>
94             <artifactId>spock-spring</artifactId>
95             <scope>test</scope>
96         </dependency>
97         <dependency>
98             <groupId>cglib</groupId>
99             <artifactId>cglib-nodep</artifactId>
100             <scope>test</scope>
101         </dependency>
102         <dependency>
103             <groupId>org.springframework.boot</groupId>
104             <artifactId>spring-boot-starter-test</artifactId>
105             <scope>test</scope>
106             <exclusions>
107                 <exclusion>
108                     <groupId>org.junit.vintage</groupId>
109                     <artifactId>junit-vintage-engine</artifactId>
110                 </exclusion>
111             </exclusions>
112         </dependency>
113         <dependency>
114             <groupId>com.google.code.gson</groupId>
115             <artifactId>gson</artifactId>
116         </dependency>
117     </dependencies>
118
119     <build>
120         <plugins>
121             <!-- Swagger code generation. -->
122             <plugin>
123                 <groupId>org.openapitools</groupId>
124                 <artifactId>openapi-generator-maven-plugin</artifactId>
125                 <version>6.6.0</version>
126                 <executions>
127                     <execution>
128                         <id>ncmp-code-gen</id>
129                         <goals>
130                             <goal>generate</goal>
131                         </goals>
132                         <configuration>
133                             <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
134                             <invokerPackage>org.onap.cps.ncmp.rest.controller</invokerPackage>
135                             <modelPackage>org.onap.cps.ncmp.rest.model</modelPackage>
136                             <apiPackage>org.onap.cps.ncmp.rest.api</apiPackage>
137                             <generatorName>spring</generatorName>
138                             <generateSupportingFiles>false</generateSupportingFiles>
139                             <generateAliasAsModel>true</generateAliasAsModel>
140                             <configOptions>
141                                 <sourceFolder>src/gen/java</sourceFolder>
142                                 <dateLibrary>java11</dateLibrary>
143                                 <interfaceOnly>true</interfaceOnly>
144                                 <useTags>true</useTags>
145                                 <openApiNullable>false</openApiNullable>
146                                 <skipDefaultInterface>true</skipDefaultInterface>
147                             </configOptions>
148                         </configuration>
149                     </execution>
150                     <execution>
151                         <id>ncmp-code-gen-inventory</id>
152                         <goals>
153                             <goal>generate</goal>
154                         </goals>
155                         <configuration>
156                             <inputSpec>${project.basedir}/docs/openapi/openapi-inventory.yml</inputSpec>
157                             <invokerPackage>org.onap.cps.ncmp.rest.controller</invokerPackage>
158                             <modelPackage>org.onap.cps.ncmp.rest.model</modelPackage>
159                             <apiPackage>org.onap.cps.ncmp.rest.api</apiPackage>
160                             <generatorName>spring</generatorName>
161                             <generateSupportingFiles>false</generateSupportingFiles>
162                             <configOptions>
163                                 <sourceFolder>src/gen/java</sourceFolder>
164                                 <dateLibrary>java11</dateLibrary>
165                                 <interfaceOnly>true</interfaceOnly>
166                                 <useTags>true</useTags>
167                                 <openApiNullable>false</openApiNullable>
168                                 <skipDefaultInterface>true</skipDefaultInterface>
169                             </configOptions>
170                         </configuration>
171                     </execution>
172                     <execution>
173                         <id>ncmp-inventory-openapi-yaml-gen</id>
174                         <goals>
175                             <goal>generate</goal>
176                         </goals>
177                         <phase>compile</phase>
178                         <configuration>
179                             <inputSpec>${project.basedir}/docs/openapi/openapi-inventory.yml</inputSpec>
180                             <generatorName>openapi-yaml</generatorName>
181                             <configOptions>
182                                 <outputFile>openapi-inventory.yaml</outputFile>
183                             </configOptions>
184                         </configuration>
185                     </execution>
186                     <execution>
187                         <id>ncmp-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.yml</inputSpec>
194                             <generatorName>openapi-yaml</generatorName>
195                             <configOptions>
196                                 <outputFile>openapi.yaml</outputFile>
197                             </configOptions>
198                         </configuration>
199                     </execution>
200                 </executions>
201             </plugin>
202             <plugin>
203                 <groupId>org.apache.maven.plugins</groupId>
204                 <artifactId>maven-resources-plugin</artifactId>
205                 <executions>
206                     <execution>
207                         <id>copy-resources</id>
208                         <phase>compile</phase>
209                         <goals>
210                             <goal>copy-resources</goal>
211                         </goals>
212                         <configuration>
213                             <outputDirectory>${project.basedir}/target/classes/static/api-docs/cps-ncmp
214                             </outputDirectory>
215                             <resources>
216                                 <resource>
217                                     <directory>${project.basedir}/target/generated-sources/openapi/</directory>
218                                     <includes>
219                                         <include>openapi*.yaml</include>
220                                     </includes>
221                                 </resource>
222                             </resources>
223                         </configuration>
224                     </execution>
225                 </executions>
226             </plugin>
227         </plugins>
228     </build>
229 </project>