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