Add RIC instance list and controller method
[portal/ric-dashboard.git] / webapp-backend / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--<![CDATA[
3 ========================LICENSE_START=================================
4 O-RAN-SC
5 %%
6 Copyright (C) 2019 AT&T Intellectual Property
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 <project xmlns="http://maven.apache.org/POM/4.0.0"
22         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24         <modelVersion>4.0.0</modelVersion>
25         <parent>
26                 <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
27                 <artifactId>ric-dash-parent</artifactId>
28                 <version>2.0.0-SNAPSHOT</version>
29         </parent>
30         <artifactId>ric-dash-be</artifactId>
31         <name>RIC Dashboard Webapp backend</name>
32         <properties>
33                 <springfox.version>2.9.2</springfox.version>
34                 <!-- Set by Jenkins -->
35                 <build.number>0</build.number>
36         </properties>
37         <repositories>
38                 <repository>
39                         <id>onap-releases</id>
40                         <name>ONAP - Release Repository</name>
41                         <url>https://nexus.onap.org/content/repositories/releases</url>
42                 </repository>
43         </repositories>
44         <dependencies>
45                 <!-- xApps -->
46                 <!-- Platform components -->
47                 <dependency>
48                         <groupId>org.o-ran-sc.ric.plt.a1med.client</groupId>
49                         <artifactId>a1-med-client</artifactId>
50                         <version>0.10.3-SNAPSHOT</version>
51                 </dependency>
52                 <dependency>
53                         <groupId>org.o-ran-sc.ric.plt.appmgr.client</groupId>
54                         <artifactId>app-mgr-client</artifactId>
55                         <version>0.1.7-SNAPSHOT</version>
56                 </dependency>
57                 <dependency>
58                         <groupId>org.o-ran-sc.ric.plt.e2mgr.client</groupId>
59                         <artifactId>e2-mgr-client</artifactId>
60                         <version>2.0.5-SNAPSHOT</version>
61                 </dependency>
62                 <dependency>
63                         <groupId>org.onap.portal.sdk</groupId>
64                         <artifactId>epsdk-fw</artifactId>
65                         <version>2.6.0</version>
66                         <exclusions>
67                                 <exclusion>
68                                         <groupId>commons-logging</groupId>
69                                         <artifactId>commons-logging</artifactId>
70                                 </exclusion>
71                                 <exclusion>
72                                         <groupId>log4j</groupId>
73                                         <artifactId>log4j</artifactId>
74                                 </exclusion>
75                                 <exclusion>
76                                         <groupId>log4j</groupId>
77                                         <artifactId>apache-log4j-extras</artifactId>
78                                 </exclusion>
79                                 <exclusion>
80                                         <groupId>org.slf4j</groupId>
81                                         <artifactId>slf4j-log4j12</artifactId>
82                                 </exclusion>
83                                 <exclusion>
84                                         <groupId>junit</groupId>
85                                         <artifactId>junit</artifactId>
86                                 </exclusion>
87                                 <exclusion>
88                                         <groupId>commons-fileupload</groupId>
89                                         <artifactId>commons-fileupload</artifactId>
90                                 </exclusion>
91                                 <exclusion>
92                                         <groupId>commons-beanutils</groupId>
93                                         <artifactId>commons-beanutils</artifactId>
94                                 </exclusion>
95                                 <!-- EELF omits "test" scope on this dependency -->
96                                 <exclusion>
97                                         <groupId>org.powermock</groupId>
98                                         <artifactId>powermock-module-junit4</artifactId>
99                                 </exclusion>
100                                 <!-- EELF omits "test" scope on this dependency -->
101                                 <exclusion>
102                                         <groupId>org.powermock</groupId>
103                                         <artifactId>powermock-api-mockito</artifactId>
104                                 </exclusion>
105                         </exclusions>
106                 </dependency>
107                 <dependency>
108                         <groupId>org.springframework.boot</groupId>
109                         <artifactId>spring-boot-starter-security</artifactId>
110                 </dependency>
111                 <dependency>
112                         <groupId>org.springframework.boot</groupId>
113                         <artifactId>spring-boot-starter-web</artifactId>
114                 </dependency>
115                 <dependency>
116                         <groupId>org.slf4j</groupId>
117                         <artifactId>slf4j-api</artifactId>
118                 </dependency>
119                 <!-- Bridge uses of Apache commons logging, like EPSDK-FW -->
120                 <dependency>
121                         <groupId>org.slf4j</groupId>
122                         <artifactId>jcl-over-slf4j</artifactId>
123                 </dependency>
124                 <dependency>
125                         <groupId>ch.qos.logback</groupId>
126                         <artifactId>logback-classic</artifactId>
127                 </dependency>
128                 <dependency>
129                         <groupId>ch.qos.logback</groupId>
130                         <artifactId>logback-core</artifactId>
131                 </dependency>
132                 <dependency>
133                         <groupId>io.springfox</groupId>
134                         <artifactId>springfox-swagger2</artifactId>
135                         <version>${springfox.version}</version>
136                 </dependency>
137                 <dependency>
138                         <groupId>io.springfox</groupId>
139                         <artifactId>springfox-swagger-ui</artifactId>
140                         <version>${springfox.version}</version>
141                 </dependency>
142                 <!-- Test dependencies -->
143                 <!-- Mockito supports development, not just testing -->
144                 <dependency>
145                         <groupId>org.mockito</groupId>
146                         <artifactId>mockito-core</artifactId>
147                         <scope>test</scope>
148                 </dependency>
149                 <dependency>
150                         <groupId>org.springframework.boot</groupId>
151                         <artifactId>spring-boot-starter-test</artifactId>
152                         <scope>test</scope>
153                 </dependency>
154                 <dependency>
155                         <groupId>org.junit.jupiter</groupId>
156                         <artifactId>junit-jupiter-api</artifactId>
157                         <scope>test</scope>
158                 </dependency>
159                 <dependency>
160                         <groupId>org.junit.jupiter</groupId>
161                         <artifactId>junit-jupiter-engine</artifactId>
162                         <scope>test</scope>
163                 </dependency>
164                 <dependency>
165                         <groupId>org.junit.platform</groupId>
166                         <artifactId>junit-platform-launcher</artifactId>
167                         <!-- Override Spring-Boot choice for Eclipse -->
168                         <version>1.4.2</version>
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                                 <!-- Most configuration and all execution is inherited -->
180                                 <groupId>org.codehaus.mojo</groupId>
181                                 <artifactId>license-maven-plugin</artifactId>
182                                 <configuration>
183                                         <roots>
184                                                 <root>src</root>
185                                         </roots>
186                                         <excludes>
187                                                 <exclude>**/*.json</exclude>
188                                         </excludes>
189                                 </configuration>
190                         </plugin>
191                         <!-- Add the build number to the jar manifest. Spring-Boot uses a complex 
192                                 packaging process that makes access to the original Manifest.MF very difficult. 
193                                 However, Java provides access to the implementation version for a package, 
194                                 so cram the build number into there. -->
195                         <plugin>
196                                 <groupId>org.apache.maven.plugins</groupId>
197                                 <artifactId>maven-jar-plugin</artifactId>
198                                 <configuration>
199                                         <archive>
200                                                 <manifest>
201                                                         <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
202                                                 </manifest>
203                                                 <manifestEntries>
204                                                         <Implementation-Version>${project.version}-b${build.number}</Implementation-Version>
205                                                 </manifestEntries>
206                                         </archive>
207                                 </configuration>
208                         </plugin>
209                         <plugin>
210                                 <artifactId>maven-resources-plugin</artifactId>
211                                 <executions>
212                                         <execution>
213                                                 <id>copy-resources</id>
214                                                 <phase>validate</phase>
215                                                 <goals>
216                                                         <goal>copy-resources</goal>
217                                                 </goals>
218                                                 <configuration>
219                                                         <outputDirectory>${project.build.directory}/classes/resources/</outputDirectory>
220                                                         <resources>
221                                                                 <resource>
222                                                                         <directory>${project.parent.basedir}/webapp-frontend/dist/dashApp/</directory>
223                                                                 </resource>
224                                                         </resources>
225                                                 </configuration>
226                                         </execution>
227                                 </executions>
228                         </plugin>
229                         <!-- do not deploy a jar or pom file -->
230                         <plugin>
231                                 <groupId>org.apache.maven.plugins</groupId>
232                                 <artifactId>maven-deploy-plugin</artifactId>
233                                 <configuration>
234                                         <skip>true</skip>
235                                 </configuration>
236                         </plugin>
237                         <plugin>
238                                 <groupId>org.jacoco</groupId>
239                                 <artifactId>jacoco-maven-plugin</artifactId>
240                                 <version>0.8.4</version>
241                                 <executions>
242                                         <execution>
243                                                 <id>default-prepare-agent</id>
244                                                 <goals>
245                                                         <goal>prepare-agent</goal>
246                                                 </goals>
247                                         </execution>
248                                         <execution>
249                                                 <id>default-report</id>
250                                                 <phase>prepare-package</phase>
251                                                 <goals>
252                                                         <goal>report</goal>
253                                                 </goals>
254                                         </execution>
255                                 </executions>
256                         </plugin>
257                         <!-- https://stackoverflow.com/questions/39126226/fabric8-springboot-full-example -->
258                         <plugin>
259                                 <groupId>io.fabric8</groupId>
260                                 <artifactId>docker-maven-plugin</artifactId>
261                                 <version>0.30.0</version>
262                                 <configuration>
263                                         <verbose>true</verbose>
264                                         <!-- environment variables supplied by Jenkins -->
265                                         <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
266                                         <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
267                                         <images>
268                                                 <image>
269                                                         <!-- Specify a tag to avoid default tag "latest" -->
270                                                         <!-- Avoid maven artifact name here -->
271                                                         <name>o-ran-sc/ric-dashboard:${project.version}</name>
272                                                         <build>
273                                                                 <from>openjdk:11-jre-slim</from>
274                                                                 <tags>
275                                                                         <!-- Add tag with build number -->
276                                                                         <tag>${project.version}</tag>
277                                                                 </tags>
278                                                                 <assembly>
279                                                                         <descriptorRef>artifact</descriptorRef>
280                                                                 </assembly>
281                                                                 <runCmds>
282                                                                         <!-- Ensure logs dir exists and is world writable -->
283                                                                         <runCmd>mkdir /logs</runCmd>
284                                                                         <runCmd>chmod -R 777 /logs</runCmd>
285                                                                 </runCmds>
286                                                                 <cmd>
287                                                                         <!-- Include maven dir on classpath for prop files -->
288                                                                         <exec>
289                                                                                 <arg>java</arg>
290                                                                                 <arg>-Xms128m</arg>
291                                                                                 <arg>-Xmx256m</arg>
292                                                                                 <arg>-cp</arg>
293                                                                                 <arg>maven:maven/${project.artifactId}-${project.version}.${project.packaging}</arg>
294                                                                                 <arg>-Dloader.main=org.oransc.ric.portal.dashboard.DashboardApplication</arg>
295                                                                                 <arg>-Djava.security.egd=file:/dev/./urandom</arg>
296                                                                                 <arg>org.springframework.boot.loader.PropertiesLauncher</arg>
297                                                                         </exec>
298                                                                 </cmd>
299                                                         </build>
300                                                 </image>
301                                         </images>
302                                 </configuration>
303                                 <!-- build Docker images in install phase, push in deploy phase -->
304                                 <executions>
305                                         <execution>
306                                                 <goals>
307                                                         <goal>build</goal>
308                                                         <goal>push</goal>
309                                                 </goals>
310                                         </execution>
311                                 </executions>
312                         </plugin>
313                 </plugins>
314         </build>
315 </project>