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