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