Generate rApp packages for unit test
[nonrtric/plt/rappmanager.git] / rapp-manager-sme / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 * ========================LICENSE_START=================================
4 * O-RAN-SC
5 * %%
6 * Copyright (C) 2023 Nordix Foundation
7 * Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved.
8 * %%
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ========================LICENSE_END===================================
21 -->
22 <project xmlns="http://maven.apache.org/POM/4.0.0"
23          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25     <modelVersion>4.0.0</modelVersion>
26     <parent>
27         <groupId>org.o-ran-sc.nonrtric.plt</groupId>
28         <artifactId>rappmanager</artifactId>
29         <version>0.1.0-SNAPSHOT</version>
30     </parent>
31
32     <groupId>org.o-ran-sc.nonrtric.plt.rappmanager</groupId>
33     <artifactId>rapp-manager-sme</artifactId>
34
35     <properties>
36         <maven.compiler.source>${java.version}</maven.compiler.source>
37         <maven.compiler.target>${java.version}</maven.compiler.target>
38         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39
40     </properties>
41     <dependencies>
42         <dependency>
43             <groupId>org.o-ran-sc.nonrtric.plt.rappmanager</groupId>
44             <artifactId>rapp-manager-models</artifactId>
45             <version>${project.version}</version>
46         </dependency>
47         <dependency>
48             <groupId>org.springframework.boot</groupId>
49             <artifactId>spring-boot-starter-web</artifactId>
50         </dependency>
51         <dependency>
52             <groupId>org.projectlombok</groupId>
53             <artifactId>lombok</artifactId>
54             <optional>true</optional>
55         </dependency>
56         <dependency>
57             <groupId>org.openapitools</groupId>
58             <artifactId>jackson-databind-nullable</artifactId>
59             <version>${openapi.jackson.databind.nullable.version}</version>
60         </dependency>
61         <dependency>
62             <groupId>org.springframework.boot</groupId>
63             <artifactId>spring-boot-starter-test</artifactId>
64             <scope>test</scope>
65         </dependency>
66         <dependency>
67             <groupId>org.apache.httpcomponents</groupId>
68             <artifactId>httpcore</artifactId>
69             <version>${apache.httpcore.version}</version>
70             <scope>test</scope>
71         </dependency>
72     </dependencies>
73
74     <build>
75         <plugins>
76             <plugin>
77                 <groupId>org.codehaus.mojo</groupId>
78                 <artifactId>exec-maven-plugin</artifactId>
79                 <version>${exec-maven-plugin.version}</version>
80                 <executions>
81                     <execution>
82                         <id>git submodule update</id>
83                         <phase>initialize</phase>
84                         <configuration>
85                             <executable>git</executable>
86                             <arguments>
87                                 <argument>submodule</argument>
88                                 <argument>update</argument>
89                                 <argument>--init</argument>
90                                 <argument>--recursive</argument>
91                             </arguments>
92                         </configuration>
93                         <goals>
94                             <goal>exec</goal>
95                         </goals>
96                     </execution>
97                     <execution>
98                         <id>initialize-sme-openapi-specs</id>
99                         <phase>initialize</phase>
100                         <goals>
101                             <goal>exec</goal>
102                         </goals>
103                         <configuration>
104                             <executable>
105                                 ..${file.separator}scripts${file.separator}init${file.separator}init-sme-spec${script.extension}
106                             </executable>
107                         </configuration>
108                     </execution>
109                 </executions>
110             </plugin>
111             <plugin>
112                 <groupId>org.openapitools</groupId>
113                 <artifactId>openapi-generator-maven-plugin</artifactId>
114                 <version>${openapi.maven.version}</version>
115                 <executions>
116                     <execution>
117                         <id>provider-spec-generator</id>
118                         <goals>
119                             <goal>generate</goal>
120                         </goals>
121                         <configuration>
122                             <inputSpec>
123                                 ${project.parent.basedir}/openapi/sme/TS29222_CAPIF_API_Provider_Management_API.yaml
124                             </inputSpec>
125                             <generatorName>java</generatorName>
126                             <library>resttemplate</library>
127                             <generateApiTests>false</generateApiTests>
128                             <generateModelTests>false</generateModelTests>
129                             <generateApiDocumentation>false</generateApiDocumentation>
130                             <generateModelDocumentation>false</generateModelDocumentation>
131                             <generateModels>true</generateModels>
132                             <additionalProperties>
133                                 <additionalProperty>apiNameSuffix=ApiClient</additionalProperty>
134                             </additionalProperties>
135                             <configOptions>
136                                 <sourceFolder>src/main/java</sourceFolder>
137                                 <useJakartaEe>true</useJakartaEe>
138                                 <invokerPackage>com.oransc.rappmanager.sme.provider</invokerPackage>
139                                 <apiPackage>com.oransc.rappmanager.sme.provider.rest</apiPackage>
140                                 <modelPackage>com.oransc.rappmanager.sme.provider.data</modelPackage>
141                                 <generateClientAsBean>false</generateClientAsBean>
142                             </configOptions>
143                         </configuration>
144                     </execution>
145                     <execution>
146                         <id>publish-service-spec-generator</id>
147                         <goals>
148                             <goal>generate</goal>
149                         </goals>
150                         <configuration>
151                             <inputSpec>
152                                 ${project.parent.basedir}/openapi/sme/TS29222_CAPIF_Publish_Service_API.yaml
153                             </inputSpec>
154                             <generatorName>java</generatorName>
155                             <library>resttemplate</library>
156                             <generateApiTests>false</generateApiTests>
157                             <generateModelTests>false</generateModelTests>
158                             <generateApiDocumentation>false</generateApiDocumentation>
159                             <generateModelDocumentation>false</generateModelDocumentation>
160                             <generateModels>true</generateModels>
161                             <additionalProperties>
162                                 <additionalProperty>apiNameSuffix=ApiClient</additionalProperty>
163                             </additionalProperties>
164                             <configOptions>
165                                 <sourceFolder>src/main/java</sourceFolder>
166                                 <useJakartaEe>true</useJakartaEe>
167                                 <invokerPackage>com.oransc.rappmanager.sme.publishservice</invokerPackage>
168                                 <apiPackage>com.oransc.rappmanager.sme.publishservice.rest</apiPackage>
169                                 <modelPackage>com.oransc.rappmanager.sme.publishservice.data</modelPackage>
170                                 <generateClientAsBean>false</generateClientAsBean>
171                             </configOptions>
172                         </configuration>
173                     </execution>
174                     <execution>
175                         <id>invoker-spec-generator</id>
176                         <goals>
177                             <goal>generate</goal>
178                         </goals>
179                         <configuration>
180                             <inputSpec>
181                                 ${project.parent.basedir}/openapi/sme/TS29222_CAPIF_API_Invoker_Management_API.yaml
182                             </inputSpec>
183                             <generatorName>java</generatorName>
184                             <library>resttemplate</library>
185                             <generateApiTests>false</generateApiTests>
186                             <generateModelTests>false</generateModelTests>
187                             <generateApiDocumentation>false</generateApiDocumentation>
188                             <generateModelDocumentation>false</generateModelDocumentation>
189                             <generateModels>true</generateModels>
190                             <additionalProperties>
191                                 <additionalProperty>apiNameSuffix=ApiClient</additionalProperty>
192                             </additionalProperties>
193                             <configOptions>
194                                 <sourceFolder>src/main/java</sourceFolder>
195                                 <useJakartaEe>true</useJakartaEe>
196                                 <invokerPackage>com.oransc.rappmanager.sme.invoker</invokerPackage>
197                                 <apiPackage>com.oransc.rappmanager.sme.invoker.rest</apiPackage>
198                                 <modelPackage>com.oransc.rappmanager.sme.invoker.data</modelPackage>
199                                 <generateClientAsBean>false</generateClientAsBean>
200                             </configOptions>
201                         </configuration>
202                     </execution>
203                 </executions>
204             </plugin>
205         </plugins>
206     </build>
207 </project>