Merge "Added a test for service supervision"
[nonrtric.git] / dashboard / webapp-backend / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4
5 <![CDATA[
6 ========================LICENSE_START=================================
7 O-RAN-SC
8 %%
9 Copyright (C) 2019 AT&T Intellectual Property
10 %%
11 Licensed under the Apache License, Version 2.0 (the "License");
12 you may not use this file except in compliance with the License.
13 You may obtain a copy of the License at
14
15      http://www.apache.org/licenses/LICENSE-2.0
16
17 Unless required by applicable law or agreed to in writing, software
18 distributed under the License is distributed on an "AS IS" BASIS,
19 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 See the License for the specific language governing permissions and
21 limitations under the License.
22 ========================LICENSE_END===================================
23 ]]>-->
24 <project
25     xmlns="http://maven.apache.org/POM/4.0.0"
26     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
27         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
28     <modelVersion>4.0.0</modelVersion>
29     <parent>
30         <groupId>org.o-ran-sc.nonrt.ric-dashboard</groupId>
31         <artifactId>ric-dash-parent</artifactId>
32         <version>1.0.1-SNAPSHOT</version>
33     </parent>
34     <artifactId>ric-dash-be</artifactId>
35     <name>NonRT RIC Dashboard Webapp backend</name>
36     <properties>
37         <springfox.version>2.9.2</springfox.version>
38         <immutable.version>2.7.1</immutable.version>
39         <formatter-maven-plugin.version>2.8.1</formatter-maven-plugin.version>
40         <spotless-maven-plugin.version>1.18.0</spotless-maven-plugin.version>
41         <!-- Set by Jenkins -->
42         <build.number>0</build.number>
43     </properties>
44     <repositories>
45         <repository>
46             <id>onap-releases</id>
47             <name>ONAP - Release Repository</name>
48             <url>https://nexus.onap.org/content/repositories/releases</url>
49         </repository>
50     </repositories>
51     <dependencies>
52         <!-- Platform components -->
53         <dependency>
54             <groupId>org.onap.portal.sdk</groupId>
55             <artifactId>epsdk-fw</artifactId>
56             <version>2.6.0</version>
57             <exclusions>
58                 <exclusion>
59                     <groupId>commons-logging</groupId>
60                     <artifactId>commons-logging</artifactId>
61                 </exclusion>
62                 <exclusion>
63                     <groupId>log4j</groupId>
64                     <artifactId>log4j</artifactId>
65                 </exclusion>
66                 <exclusion>
67                     <groupId>log4j</groupId>
68                     <artifactId>apache-log4j-extras</artifactId>
69                 </exclusion>
70                 <exclusion>
71                     <groupId>org.slf4j</groupId>
72                     <artifactId>slf4j-log4j12</artifactId>
73                 </exclusion>
74                 <exclusion>
75                     <groupId>junit</groupId>
76                     <artifactId>junit</artifactId>
77                 </exclusion>
78                 <exclusion>
79                     <groupId>commons-fileupload</groupId>
80                     <artifactId>commons-fileupload</artifactId>
81                 </exclusion>
82                 <exclusion>
83                     <groupId>commons-beanutils</groupId>
84                     <artifactId>commons-beanutils</artifactId>
85                 </exclusion>
86                 <!-- EELF omits "test" scope on this dependency -->
87                 <exclusion>
88                     <groupId>org.powermock</groupId>
89                     <artifactId>powermock-module-junit4</artifactId>
90                 </exclusion>
91                 <!-- EELF omits "test" scope on this dependency -->
92                 <exclusion>
93                     <groupId>org.powermock</groupId>
94                     <artifactId>powermock-api-mockito</artifactId>
95                 </exclusion>
96             </exclusions>
97         </dependency>
98         <dependency>
99             <groupId>org.springframework.boot</groupId>
100             <artifactId>spring-boot-starter-security</artifactId>
101         </dependency>
102         <dependency>
103             <groupId>org.springframework.boot</groupId>
104             <artifactId>spring-boot-starter-web</artifactId>
105         </dependency>
106         <dependency>
107             <groupId>org.slf4j</groupId>
108             <artifactId>slf4j-api</artifactId>
109         </dependency>
110         <!-- Bridge uses of Apache commons logging, like EPSDK-FW -->
111         <dependency>
112             <groupId>org.slf4j</groupId>
113             <artifactId>jcl-over-slf4j</artifactId>
114         </dependency>
115         <dependency>
116             <groupId>ch.qos.logback</groupId>
117             <artifactId>logback-classic</artifactId>
118         </dependency>
119         <dependency>
120             <groupId>ch.qos.logback</groupId>
121             <artifactId>logback-core</artifactId>
122         </dependency>
123         <dependency>
124             <groupId>io.springfox</groupId>
125             <artifactId>springfox-swagger2</artifactId>
126             <version>${springfox.version}</version>
127         </dependency>
128         <dependency>
129             <groupId>io.springfox</groupId>
130             <artifactId>springfox-swagger-ui</artifactId>
131             <version>${springfox.version}</version>
132         </dependency>
133         <dependency>
134             <groupId>org.immutables</groupId>
135             <artifactId>value</artifactId>
136             <version>${immutable.version}</version>
137             <scope>provided</scope>
138         </dependency>
139         <dependency>
140             <groupId>org.immutables</groupId>
141             <artifactId>gson</artifactId>
142             <version>${immutable.version}</version>
143         </dependency>
144         <!-- Test dependencies -->
145         <!-- Mockito supports development, not just testing -->
146         <dependency>
147             <groupId>org.mockito</groupId>
148             <artifactId>mockito-core</artifactId>
149             <scope>test</scope>
150         </dependency>
151         <dependency>
152             <groupId>org.springframework.boot</groupId>
153             <artifactId>spring-boot-starter-test</artifactId>
154             <scope>test</scope>
155         </dependency>
156         <dependency>
157             <groupId>org.junit.jupiter</groupId>
158             <artifactId>junit-jupiter-api</artifactId>
159             <scope>test</scope>
160         </dependency>
161         <dependency>
162             <groupId>org.junit.jupiter</groupId>
163             <artifactId>junit-jupiter-engine</artifactId>
164             <scope>test</scope>
165         </dependency>
166         <dependency>
167             <groupId>org.junit.platform</groupId>
168             <artifactId>junit-platform-launcher</artifactId>
169             <scope>test</scope>
170         </dependency>
171     </dependencies>
172     <build>
173         <plugins>
174             <plugin>
175                 <groupId>org.springframework.boot</groupId>
176                 <artifactId>spring-boot-maven-plugin</artifactId>
177             </plugin>
178             <plugin>
179                 <groupId>net.revelc.code.formatter</groupId>
180                 <artifactId>formatter-maven-plugin</artifactId>
181                 <version>${formatter-maven-plugin.version}</version>
182                 <configuration>
183                     <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
184                 </configuration>
185                 <!-- https://code.revelc.net/formatter-maven-plugin/ use
186                     mvn formatter:format spotless:apply process-sources -->
187             </plugin>
188             <plugin>
189                 <groupId>com.diffplug.spotless</groupId>
190                 <artifactId>spotless-maven-plugin</artifactId>
191                 <version>${spotless-maven-plugin.version}</version>
192                 <configuration>
193                     <java>
194                         <removeUnusedImports />
195                         <importOrder>
196                             <order>com,java,javax,org</order>
197                         </importOrder>
198                     </java>
199                 </configuration>
200                 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven
201                     use mvn spotless:apply to rewrite source files use mvn spotless:check to
202                     validate source files -->
203             </plugin>
204             <plugin>
205                 <!-- Most configuration and all execution is inherited -->
206                 <groupId>org.codehaus.mojo</groupId>
207                 <artifactId>license-maven-plugin</artifactId>
208                 <configuration>
209                     <roots>
210                         <root>src</root>
211                     </roots>
212                     <excludes>
213                         <exclude>**/*.json</exclude>
214                     </excludes>
215                 </configuration>
216             </plugin>
217             <!-- Add the build number to the jar manifest. Spring-Boot uses a complex 
218                                 packaging process that makes access to the original Manifest.MF very difficult. 
219                                 However, Java provides access to the implementation version for a package, 
220                                 so cram the build number into there. -->
221             <plugin>
222                 <groupId>org.apache.maven.plugins</groupId>
223                 <artifactId>maven-jar-plugin</artifactId>
224                 <configuration>
225                     <archive>
226                         <manifest>
227                             <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
228                         </manifest>
229                         <manifestEntries>
230                             <Implementation-Version>${project.version}-b${build.number}</Implementation-Version>
231                         </manifestEntries>
232                     </archive>
233                 </configuration>
234             </plugin>
235             <plugin>
236                 <artifactId>maven-resources-plugin</artifactId>
237                 <executions>
238                     <execution>
239                         <id>copy-resources</id>
240                         <phase>validate</phase>
241                         <goals>
242                             <goal>copy-resources</goal>
243                         </goals>
244                         <configuration>
245                             <outputDirectory>${project.build.directory}/classes/resources/</outputDirectory>
246                             <resources>
247                                 <resource>
248                                     <directory>${project.parent.basedir}/webapp-frontend/dist/dashApp/</directory>
249                                 </resource>
250                             </resources>
251                         </configuration>
252                     </execution>
253                 </executions>
254             </plugin>
255             <!-- do not deploy a jar or pom file -->
256             <plugin>
257                 <groupId>org.apache.maven.plugins</groupId>
258                 <artifactId>maven-deploy-plugin</artifactId>
259                 <configuration>
260                     <skip>true</skip>
261                 </configuration>
262             </plugin>
263             <plugin>
264                 <groupId>org.jacoco</groupId>
265                 <artifactId>jacoco-maven-plugin</artifactId>
266                 <version>0.8.4</version>
267                 <executions>
268                     <execution>
269                         <id>default-prepare-agent</id>
270                         <goals>
271                             <goal>prepare-agent</goal>
272                         </goals>
273                     </execution>
274                     <execution>
275                         <id>default-report</id>
276                         <phase>prepare-package</phase>
277                         <goals>
278                             <goal>report</goal>
279                         </goals>
280                     </execution>
281                 </executions>
282             </plugin>
283             <!-- https://stackoverflow.com/questions/39126226/fabric8-springboot-full-example -->
284             <plugin>
285                 <groupId>io.fabric8</groupId>
286                 <artifactId>docker-maven-plugin</artifactId>
287                 <version>0.30.0</version>
288                 <configuration>
289                     <verbose>true</verbose>
290                     <!-- environment variables supplied by Jenkins -->
291                     <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
292                     <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
293                     <images>
294                         <image>
295                             <!-- Specify a tag to avoid default tag "latest" -->
296                             <!-- Avoid maven artifact name here -->
297                             <name>o-ran-sc/nonrtric-dashboard:${project.version}</name>
298                             <build>
299                                 <from>openjdk:11-jre-slim</from>
300                                 <tags>
301                                     <!-- Add tag with build number -->
302                                     <tag>${project.version}</tag>
303                                 </tags>
304                                 <assembly>
305                                     <descriptorRef>artifact</descriptorRef>
306                                 </assembly>
307                                 <runCmds>
308                                     <!-- Ensure logs dir exists and is world writable -->
309                                     <runCmd>mkdir /logs</runCmd>
310                                     <runCmd>chmod -R 777 /logs</runCmd>
311                                 </runCmds>
312                                 <cmd>
313                                     <!-- Include maven dir on classpath for prop files -->
314                                     <exec>
315                                         <arg>java</arg>
316                                         <arg>-Xms128m</arg>
317                                         <arg>-Xmx256m</arg>
318                                         <arg>-cp</arg>
319                                         <arg>maven:maven/${project.artifactId}-${project.version}.${project.packaging}</arg>
320                                         <arg>-Dloader.main=org.oransc.ric.portal.dashboard.DashboardApplication</arg>
321                                         <arg>-Djava.security.egd=file:/dev/./urandom</arg>
322                                         <arg>org.springframework.boot.loader.PropertiesLauncher</arg>
323                                     </exec>
324                                 </cmd>
325                             </build>
326                         </image>
327                     </images>
328                 </configuration>
329                 <!-- build Docker images in install phase, push in deploy phase -->
330                 <executions>
331                     <execution>
332                         <goals>
333                             <goal>build</goal>
334                             <goal>push</goal>
335                         </goals>
336                     </execution>
337                 </executions>
338             </plugin>
339         </plugins>
340     </build>
341 </project>