Increment code coverage for 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                 <executions>
95                     <execution>
96                         <goals>
97                             <goal>generate</goal>
98                         </goals>
99                         <configuration>
100                             <inputSpec>${project.basedir}/docs/api/swagger/openapi.yaml</inputSpec>
101                             <invokerPackage>org.o.ran.oam.nf.oam.adopter.mock.app.controller</invokerPackage>
102                             <modelPackage>org.o.ran.oam.nf.oam.adopter.mock.model</modelPackage>
103                             <apiPackage>org.o.ran.oam.nf.oam.adopter.mock.api</apiPackage>
104                             <language>spring</language>
105                             <generateSupportingFiles>false</generateSupportingFiles>
106                             <configOptions>
107                                 <sourceFolder>src/gen/java</sourceFolder>
108                                 <dateLibrary>java11</dateLibrary>
109                                 <interfaceOnly>true</interfaceOnly>
110                                 <useTags>true</useTags>
111                                 <serializableModel>true</serializableModel>
112                             </configOptions>
113                         </configuration>
114                     </execution>
115                 </executions>
116             </plugin>
117         </plugins>
118     </build>
119
120     <profiles>
121         <profile>
122             <id>docker</id>
123             <activation>
124                 <activeByDefault>false</activeByDefault>
125             </activation>
126             <build>
127                 <plugins>
128                     <plugin>
129                         <groupId>io.fabric8</groupId>
130                         <artifactId>docker-maven-plugin</artifactId>
131                         <extensions>true</extensions>
132                         <configuration>
133                             <verbose>true</verbose>
134                             <images>
135                                 <image>
136                                     <name>${nexus.repository}${image.name}</name>
137                                     <build>
138                                         <from>${nexus.repository.mirror}${base.image}</from>
139                                         <tags>
140                                             <tag>${project.version}</tag>
141                                         </tags>
142                                         <workdir>${image.workdir}</workdir>
143                                         <entryPoint>
144                                             <exec>
145                                                 <args>java</args>
146                                                 <args>-jar</args>
147                                                 <args>${project.artifactId}-${project.version}.jar</args>
148                                             </exec>
149                                         </entryPoint>
150                                         <assembly>
151                                             <basedir>${image.workdir}</basedir>
152                                             <inline>
153                                                 <dependencySets>
154                                                     <dependencySet>
155                                                         <useProjectArtifact>true</useProjectArtifact>
156                                                         <includes>
157                                                             <include>${project.groupId}:${project.artifactId}</include>
158                                                         </includes>
159                                                         <outputFileNameMapping>${project.build.finalName}.jar</outputFileNameMapping>
160                                                     </dependencySet>
161                                                 </dependencySets>
162                                                 <files>
163                                                     <file>
164                                                         <source>${base.config}application.yml</source>
165                                                     </file>
166                                                     <file>
167                                                         <source>${base.config}/zip/pmFiles.zip</source>
168                                                         <outputDirectory>.</outputDirectory>
169                                                         <destName>./pmFiles.zip</destName>
170                                                     </file>
171                                                     <file>
172                                                         <source>${base.config}log4j2.yml</source>
173                                                     </file>
174                                                     <file>
175                                                         <source>${base.config}/ssl/nf-oam-adopter-keystore.jks</source>
176                                                         <outputDirectory>./ssl</outputDirectory>
177                                                         <destName>nf-oam-adopter-keystore.jks</destName>
178                                                     </file>
179                                                 </files>
180                                             </inline>
181                                         </assembly>
182                                     </build>
183                                 </image>
184                             </images>
185                         </configuration>
186                         <executions>
187                             <execution>
188                                 <id>build-docker-image</id>
189                                 <phase>package</phase>
190                                 <goals>
191                                     <goal>build</goal>
192                                 </goals>
193                             </execution>
194                             <execution>
195                                 <id>push-image</id>
196                                 <phase>deploy</phase>
197                                 <goals>
198                                     <goal>push</goal>
199                                 </goals>
200                             </execution>
201                         </executions>
202                     </plugin>
203                 </plugins>
204             </build>
205         </profile>
206     </profiles>
207
208 </project>