Release oam/nf-oam-adopter
[oam/nf-oam-adopter.git] / ves-nf-oam-adopter / ves-nf-oam-adopter-app / 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</version>
31         <relativePath>../ves-nf-oam-adopter-parent/pom.xml</relativePath>
32     </parent>
33
34     <artifactId>ves-nf-oam-adopter-app</artifactId>
35
36     <properties>
37         <!--Image properties-->
38         <image.name>ves-nf-oam-adopter</image.name>
39     </properties>
40
41     <dependencies>
42         <dependency>
43             <groupId>${project.groupId}</groupId>
44             <artifactId>ves-nf-oam-adopter-api</artifactId>
45         </dependency>
46         <dependency>
47             <groupId>${project.groupId}</groupId>
48             <artifactId>ves-nf-oam-adopter-event-notifier</artifactId>
49         </dependency>
50         <dependency>
51             <groupId>${project.groupId}</groupId>
52             <artifactId>ves-nf-oam-adopter-snmp-manager</artifactId>
53         </dependency>
54         <dependency>
55             <groupId>${project.groupId}</groupId>
56             <artifactId>ves-nf-oam-adopter-pm-manager</artifactId>
57         </dependency>
58         <dependency>
59             <groupId>${project.groupId}</groupId>
60             <artifactId>ves-nf-oam-adopter-pm-sb-rest-client</artifactId>
61         </dependency>
62         <dependency>
63             <groupId>org.springframework.boot</groupId>
64             <artifactId>spring-boot-starter-web</artifactId>
65         </dependency>
66         <dependency>
67             <groupId>org.springframework.boot</groupId>
68             <artifactId>spring-boot-starter-security</artifactId>
69         </dependency>
70         <dependency>
71             <groupId>org.springframework.boot</groupId>
72             <artifactId>spring-boot-starter-actuator</artifactId>
73         </dependency>
74         <dependency>
75             <groupId>org.springframework.boot</groupId>
76             <artifactId>spring-boot-starter-validation</artifactId>
77         </dependency>
78         <dependency>
79             <groupId>org.springframework.boot</groupId>
80             <artifactId>spring-boot-starter-log4j2</artifactId>
81         </dependency>
82         <dependency>
83             <groupId>org.apache.httpcomponents.client5</groupId>
84             <artifactId>httpclient5</artifactId>
85         </dependency>
86         <dependency>
87             <groupId>io.swagger.core.v3</groupId>
88             <artifactId>swagger-annotations</artifactId>
89         </dependency>
90         <dependency>
91             <groupId>org.springframework.boot</groupId>
92             <artifactId>spring-boot-starter-test</artifactId>
93             <scope>test</scope>
94         </dependency>
95         <dependency>
96             <groupId>org.springframework.security</groupId>
97             <artifactId>spring-security-test</artifactId>
98             <scope>test</scope>
99         </dependency>
100     </dependencies>
101
102     <build>
103         <plugins>
104             <plugin>
105                 <groupId>org.springframework.boot</groupId>
106                 <artifactId>spring-boot-maven-plugin</artifactId>
107             </plugin>
108             <!-- Swagger code generation. -->
109             <plugin>
110                 <groupId>io.swagger.codegen.v3</groupId>
111                 <artifactId>swagger-codegen-maven-plugin</artifactId>
112                 <executions>
113                     <execution>
114                         <goals>
115                             <goal>generate</goal>
116                         </goals>
117                         <configuration>
118                             <inputSpec>${project.basedir}/docs/api/swagger/openapi.yaml</inputSpec>
119                             <invokerPackage>org.o.ran.oam.nf.oam.adopter.app.controller</invokerPackage>
120                             <modelPackage>org.o.ran.oam.nf.oam.adopter.model</modelPackage>
121                             <apiPackage>org.o.ran.oam.nf.oam.adopter.api</apiPackage>
122                             <language>spring</language>
123                             <generateSupportingFiles>false</generateSupportingFiles>
124                             <configOptions>
125                                 <sourceFolder>src/gen/java</sourceFolder>
126                                 <dateLibrary>java11</dateLibrary>
127                                 <interfaceOnly>true</interfaceOnly>
128                                 <useTags>true</useTags>
129                                 <serializableModel>true</serializableModel>
130                             </configOptions>
131                         </configuration>
132                     </execution>
133                 </executions>
134             </plugin>
135         </plugins>
136     </build>
137
138     <profiles>
139         <profile>
140             <id>docker</id>
141             <activation>
142                 <activeByDefault>false</activeByDefault>
143             </activation>
144             <build>
145                 <plugins>
146                     <plugin>
147                         <groupId>io.fabric8</groupId>
148                         <artifactId>docker-maven-plugin</artifactId>
149                         <version>0.34.1</version>
150                         <extensions>true</extensions>
151                         <configuration>
152                             <verbose>true</verbose>
153                             <images>
154                                 <image>
155                                     <name>${nexus.repository}${image.name}</name>
156                                     <build>
157                                         <from>${nexus.repository.mirror}${base.image}</from>
158                                         <tags>
159                                             <tag>${project.version}</tag>
160                                         </tags>
161                                         <workdir>${image.workdir}</workdir>
162                                         <entryPoint>
163                                             <exec>
164                                                 <args>java</args>
165                                                 <args>-jar</args>
166                                                 <args>${project.artifactId}-${project.version}.jar</args>
167                                             </exec>
168                                         </entryPoint>
169                                         <assembly>
170                                             <basedir>${image.workdir}</basedir>
171                                             <inline>
172                                                 <dependencySets>
173                                                     <dependencySet>
174                                                         <useProjectArtifact>true</useProjectArtifact>
175                                                         <includes>
176                                                             <include>${project.groupId}:${project.artifactId}</include>
177                                                         </includes>
178                                                         <outputFileNameMapping>${project.build.finalName}.jar</outputFileNameMapping>
179                                                     </dependencySet>
180                                                 </dependencySets>
181                                                 <files>
182                                                     <file>
183                                                         <source>${base.config}application.yml</source>
184                                                         <outputDirectory>.</outputDirectory>
185                                                         <destName>application.yml</destName>
186                                                     </file>
187                                                     <file>
188                                                         <source>${base.config}fm-ves-message-mapping.yaml</source>
189                                                         <outputDirectory>./mapping-configuration</outputDirectory>
190                                                         <destName>fm-ves-message-mapping.yaml</destName>
191                                                     </file>
192                                                     <file>
193                                                         <source>${base.config}pm-ves-message-mapping.yaml</source>
194                                                         <outputDirectory>./mapping-configuration</outputDirectory>
195                                                         <destName>pm-ves-message-mapping.yaml</destName>
196                                                     </file>
197                                                     <file>
198                                                         <source>${base.config}log4j2.yml</source>
199                                                     </file>
200                                                     <file>
201                                                         <source>${base.config}/ssl/nf-oam-adopter-keystore.jks</source>
202                                                         <outputDirectory>./ssl</outputDirectory>
203                                                         <destName>nf-oam-adopter-keystore.jks</destName>
204                                                     </file>
205                                                     <file>
206                                                         <source>${base.config}/ssl/nf-oam-adopter-truststore.jks</source>
207                                                         <outputDirectory>./ssl</outputDirectory>
208                                                         <destName>nf-oam-adopter-truststore.jks</destName>
209                                                     </file>
210                                                 </files>
211                                             </inline>
212                                         </assembly>
213                                     </build>
214                                 </image>
215                             </images>
216                         </configuration>
217                         <executions>
218                             <execution>
219                                 <id>build-docker-image</id>
220                                 <phase>package</phase>
221                                 <goals>
222                                     <goal>build</goal>
223                                 </goals>
224                             </execution>
225                             <execution>
226                                 <id>push-image</id>
227                                 <phase>deploy</phase>
228                                 <goals>
229                                     <goal>push</goal>
230                                 </goals>
231                             </execution>
232                         </executions>
233                     </plugin>
234                 </plugins>
235             </build>
236         </profile>
237     </profiles>
238
239 </project>