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