NF OAM Adopter RAN Mock application
[oam/nf-oam-adopter.git] / ves-nf-oam-adopter / ves-nf-oam-adopter-mock / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 * ============LICENSE_START=======================================================
4 * O-RAN-SC
5 * ================================================================================
6 * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END============================================
20 *
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
27     <parent>
28         <groupId>org.o-ran-sc.oam</groupId>
29         <artifactId>ves-nf-oam-adopter-parent</artifactId>
30         <version>1.0.0-SNAPSHOT</version>
31         <relativePath>../ves-nf-oam-adopter-parent/pom.xml</relativePath>
32     </parent>
33
34     <artifactId>ves-nf-oam-adopter-mock</artifactId>
35
36     <properties>
37         <!--Image properties-->
38         <image.name>ves-nf-oam-adopter-ran-mock</image.name>
39     </properties>
40
41     <dependencies>
42         <dependency>
43             <groupId>org.springframework.boot</groupId>
44             <artifactId>spring-boot-starter-web</artifactId>
45         </dependency>
46         <dependency>
47             <groupId>org.springframework.boot</groupId>
48             <artifactId>spring-boot-starter-security</artifactId>
49         </dependency>
50         <dependency>
51             <groupId>org.springframework.boot</groupId>
52             <artifactId>spring-boot-starter-actuator</artifactId>
53         </dependency>
54         <dependency>
55             <groupId>org.springframework.boot</groupId>
56             <artifactId>spring-boot-starter-validation</artifactId>
57         </dependency>
58         <dependency>
59             <groupId>org.springframework.boot</groupId>
60             <artifactId>spring-boot-starter-log4j2</artifactId>
61         </dependency>
62         <dependency>
63             <groupId>io.swagger.core.v3</groupId>
64             <artifactId>swagger-annotations</artifactId>
65         </dependency>
66         <dependency>
67             <groupId>org.projectlombok</groupId>
68             <artifactId>lombok</artifactId>
69         </dependency>
70         <dependency>
71             <groupId>org.snmp4j</groupId>
72             <artifactId>snmp4j</artifactId>
73         </dependency>
74         <dependency>
75             <groupId>com.google.code.gson</groupId>
76             <artifactId>gson</artifactId>
77         </dependency>
78         <dependency>
79             <groupId>com.github.spotbugs</groupId>
80             <artifactId>spotbugs-annotations</artifactId>
81         </dependency>
82     </dependencies>
83
84     <build>
85         <plugins>
86             <plugin>
87                 <groupId>org.springframework.boot</groupId>
88                 <artifactId>spring-boot-maven-plugin</artifactId>
89             </plugin>
90             <!-- Swagger code generation. -->
91             <plugin>
92                 <groupId>io.swagger.codegen.v3</groupId>
93                 <artifactId>swagger-codegen-maven-plugin</artifactId>
94                 <version>${swagger-codegen-maven-plugin.version}</version>
95                 <executions>
96                     <execution>
97                         <goals>
98                             <goal>generate</goal>
99                         </goals>
100                         <configuration>
101                             <inputSpec>${project.basedir}/docs/api/swagger/openapi.yaml</inputSpec>
102                             <invokerPackage>org.o.ran.oam.nf.oam.adopter.mock.app.controller</invokerPackage>
103                             <modelPackage>org.o.ran.oam.nf.oam.adopter.mock.model</modelPackage>
104                             <apiPackage>org.o.ran.oam.nf.oam.adopter.mock.api</apiPackage>
105                             <language>spring</language>
106                             <generateSupportingFiles>false</generateSupportingFiles>
107                             <configOptions>
108                                 <sourceFolder>src/gen/java</sourceFolder>
109                                 <dateLibrary>java11</dateLibrary>
110                                 <interfaceOnly>true</interfaceOnly>
111                                 <useTags>true</useTags>
112                                 <serializableModel>true</serializableModel>
113                             </configOptions>
114                         </configuration>
115                     </execution>
116                 </executions>
117             </plugin>
118         </plugins>
119     </build>
120
121     <profiles>
122         <profile>
123             <id>docker</id>
124             <activation>
125                 <activeByDefault>false</activeByDefault>
126             </activation>
127             <build>
128                 <plugins>
129                     <plugin>
130                         <groupId>io.fabric8</groupId>
131                         <artifactId>docker-maven-plugin</artifactId>
132                         <extensions>true</extensions>
133                         <configuration>
134                             <verbose>true</verbose>
135                             <images>
136                                 <image>
137                                     <name>${nexus.repository}${image.name}</name>
138                                     <build>
139                                         <from>${base.image}</from>
140                                         <tags>
141                                             <tag>${project.version}</tag>
142                                         </tags>
143                                         <workdir>${image.workdir}</workdir>
144                                         <entryPoint>
145                                             <exec>
146                                                 <args>java</args>
147                                                 <args>-jar</args>
148                                                 <args>${project.artifactId}-${project.version}.jar</args>
149                                             </exec>
150                                         </entryPoint>
151                                         <assembly>
152                                             <basedir>${image.workdir}</basedir>
153                                             <inline>
154                                                 <dependencySets>
155                                                     <dependencySet>
156                                                         <useProjectArtifact>true</useProjectArtifact>
157                                                         <includes>
158                                                             <include>${project.groupId}:${project.artifactId}</include>
159                                                         </includes>
160                                                         <outputFileNameMapping>${project.build.finalName}.jar</outputFileNameMapping>
161                                                     </dependencySet>
162                                                 </dependencySets>
163                                                 <files>
164                                                     <file>
165                                                         <source>${base.config}application.yml</source>
166                                                     </file>
167                                                     <file>
168                                                         <source>${base.config}/zip/pmFiles.zip</source>
169                                                         <outputDirectory>.</outputDirectory>
170                                                         <destName>./pmFiles.zip</destName>
171                                                     </file>
172                                                     <file>
173                                                         <source>${base.config}log4j2.yml</source>
174                                                     </file>
175                                                     <file>
176                                                         <source>${base.config}/ssl/nf-oam-adopter-keystore.jks</source>
177                                                         <outputDirectory>./ssl</outputDirectory>
178                                                         <destName>nf-oam-adopter-keystore.jks</destName>
179                                                     </file>
180                                                 </files>
181                                             </inline>
182                                         </assembly>
183                                     </build>
184                                 </image>
185                             </images>
186                         </configuration>
187                         <executions>
188                             <execution>
189                                 <id>build-docker-image</id>
190                                 <phase>package</phase>
191                                 <goals>
192                                     <goal>build</goal>
193                                 </goals>
194                             </execution>
195                             <execution>
196                                 <id>push-image</id>
197                                 <phase>deploy</phase>
198                                 <goals>
199                                     <goal>push</goal>
200                                 </goals>
201                             </execution>
202                         </executions>
203                     </plugin>
204                 </plugins>
205             </build>
206         </profile>
207     </profiles>
208
209 </project>