e96777fe847a1c164e4187951ba1a08a2ce08593
[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         <dependencies>
38                 <!-- xApps -->
39                 <dependency>
40                         <groupId>org.o-ran-sc.ric.xapp.anr.client</groupId>
41                         <artifactId>anr-xapp-client</artifactId>
42                         <version>0.0.8-SNAPSHOT</version>
43                 </dependency>
44                 <!-- Platform components -->
45                 <dependency>
46                         <groupId>org.o-ran-sc.ric.plt.a1med.client</groupId>
47                         <artifactId>a1-med-client</artifactId>
48                         <version>0.4.0-SNAPSHOT</version>
49                 </dependency>
50                 <dependency>
51                         <groupId>org.o-ran-sc.ric.plt.appmgr.client</groupId>
52                         <artifactId>app-mgr-client</artifactId>
53                         <version>0.1.5-SNAPSHOT</version>
54                 </dependency>
55                 <dependency>
56                         <groupId>org.o-ran-sc.ric.plt.e2mgr.client</groupId>
57                         <artifactId>e2-mgr-client</artifactId>
58                         <version>20190703-SNAPSHOT</version>
59                 </dependency>
60                 <dependency>
61                         <groupId>org.springframework.boot</groupId>
62                         <artifactId>spring-boot-starter-web</artifactId>
63                 </dependency>
64                 <dependency>
65                         <groupId>org.slf4j</groupId>
66                         <artifactId>slf4j-api</artifactId>
67                 </dependency>
68                 <dependency>
69                         <groupId>ch.qos.logback</groupId>
70                         <artifactId>logback-classic</artifactId>
71                 </dependency>
72                 <dependency>
73                         <groupId>ch.qos.logback</groupId>
74                         <artifactId>logback-core</artifactId>
75                 </dependency>
76                 <dependency>
77                         <groupId>io.springfox</groupId>
78                         <artifactId>springfox-swagger2</artifactId>
79                         <version>${springfox.version}</version>
80                 </dependency>
81                 <dependency>
82                         <groupId>io.springfox</groupId>
83                         <artifactId>springfox-swagger-ui</artifactId>
84                         <version>${springfox.version}</version>
85                 </dependency>
86                 <!-- Test dependencies -->
87                 <!-- Mockito supports development, not just testing -->
88                 <dependency>
89                         <groupId>org.mockito</groupId>
90                         <artifactId>mockito-core</artifactId>
91                         <scope>test</scope>
92                 </dependency>
93                 <dependency>
94                         <groupId>org.springframework.boot</groupId>
95                         <artifactId>spring-boot-starter-test</artifactId>
96                         <scope>test</scope>
97                 </dependency>
98                 <dependency>
99                         <groupId>org.junit.jupiter</groupId>
100                         <artifactId>junit-jupiter-api</artifactId>
101                         <scope>test</scope>
102                 </dependency>
103                 <dependency>
104                         <groupId>org.junit.jupiter</groupId>
105                         <artifactId>junit-jupiter-engine</artifactId>
106                         <scope>test</scope>
107                 </dependency>
108                 <dependency>
109                         <groupId>org.junit.platform</groupId>
110                         <artifactId>junit-platform-launcher</artifactId>
111                         <scope>test</scope>
112                 </dependency>
113         </dependencies>
114         <build>
115                 <plugins>
116                         <plugin>
117                                 <groupId>org.springframework.boot</groupId>
118                                 <artifactId>spring-boot-maven-plugin</artifactId>
119                         </plugin>
120                         <plugin>
121                                 <groupId>org.codehaus.mojo</groupId>
122                                 <artifactId>license-maven-plugin</artifactId>
123                                 <executions>
124                                         <execution>
125                                                 <goals>
126                                                         <goal>update-file-header</goal>
127                                                 </goals>
128                                                 <phase>process-sources</phase>
129                                                 <configuration>
130                                                         <organizationName>${lmp.organization.name}</organizationName>
131                                                         <inceptionYear>${lmp.inception.year}</inceptionYear>
132                                                         <projectName>${lmp.project.name}</projectName>
133                                                         <licenseName>${lmp.license.name}</licenseName>
134                                                         <processStartTag>${lmp.process.start.tag}</processStartTag>
135                                                         <processEndTag>${lmp.process.end.tag}</processEndTag>
136                                                         <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
137                                                 </configuration>
138                                         </execution>
139                                 </executions>
140                         </plugin>
141                         <!-- Add the build number to the jar manifest. Spring-Boot uses a complex 
142                                 packaging process that makes access to the original Manifest.MF very difficult. 
143                                 However, Java provides access to the implementation version for a package, 
144                                 so cram the build number into there. -->
145                         <plugin>
146                                 <groupId>org.apache.maven.plugins</groupId>
147                                 <artifactId>maven-jar-plugin</artifactId>
148                                 <configuration>
149                                         <archive>
150                                                 <manifest>
151                                                         <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
152                                                 </manifest>
153                                                 <manifestEntries>
154                                                         <Implementation-Version>${project.version}-b${build.number}</Implementation-Version>
155                                                 </manifestEntries>
156                                         </archive>
157                                 </configuration>
158                         </plugin>
159                         <plugin>
160                                 <artifactId>maven-resources-plugin</artifactId>
161                                 <executions>
162                                         <execution>
163                                                 <id>copy-resources</id>
164                                                 <phase>validate</phase>
165                                                 <goals>
166                                                         <goal>copy-resources</goal>
167                                                 </goals>
168                                                 <configuration>
169                                                         <outputDirectory>${project.build.directory}/classes/resources/</outputDirectory>
170                                                         <resources>
171                                                                 <resource>
172                                                                         <directory>${project.parent.basedir}/webapp-frontend/dist/dashApp/</directory>
173                                                                 </resource>
174                                                         </resources>
175                                                 </configuration>
176                                         </execution>
177                                 </executions>
178                         </plugin>
179                         <!-- do not deploy a jar or pom file -->
180                         <plugin>
181                                 <groupId>org.apache.maven.plugins</groupId>
182                                 <artifactId>maven-deploy-plugin</artifactId>
183                                 <configuration>
184                                         <skip>true</skip>
185                                 </configuration>
186                         </plugin>
187                         <plugin>
188                                 <groupId>org.jacoco</groupId>
189                                 <artifactId>jacoco-maven-plugin</artifactId>
190                                 <version>0.8.4</version>
191                                 <executions>
192                                         <execution>
193                                                 <id>default-prepare-agent</id>
194                                                 <goals>
195                                                         <goal>prepare-agent</goal>
196                                                 </goals>
197                                         </execution>
198                                         <execution>
199                                                 <id>default-report</id>
200                                                 <phase>prepare-package</phase>
201                                                 <goals>
202                                                         <goal>report</goal>
203                                                 </goals>
204                                         </execution>
205                                 </executions>
206                         </plugin>
207                         <!-- https://stackoverflow.com/questions/39126226/fabric8-springboot-full-example -->
208                         <plugin>
209                                 <groupId>io.fabric8</groupId>
210                                 <artifactId>docker-maven-plugin</artifactId>
211                                 <version>0.28.0</version>
212                                 <configuration>
213                                         <verbose>true</verbose>
214                                         <!-- environment variables supplied by Jenkins -->
215                                         <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
216                                         <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
217                                         <images>
218                                                 <image>
219                                                         <!-- Specify a tag to avoid default tag "latest" -->
220                                                         <!-- Avoid maven artifact name here -->
221                                                         <name>ric-dashboard:${project.version}</name>
222                                                         <build>
223                                                                 <from>openjdk:11-jre-slim</from>
224                                                                 <tags>
225                                                                         <!-- Add tag with build number -->
226                                                                         <tag>${project.version}</tag>
227                                                                 </tags>
228                                                                 <assembly>
229                                                                         <descriptorRef>artifact</descriptorRef>
230                                                                 </assembly>
231                                                                 <runCmds>
232                                                                         <!-- Ensure logs dir exists and is world writable -->
233                                                                         <runCmd>mkdir /maven/logs</runCmd>
234                                                                         <runCmd>chmod -R 777 /maven</runCmd>
235                                                                 </runCmds>
236                                                                 <cmd>
237                                                                         <!-- CDATA prevents Eclipse formatter from breaking line -->
238                                                                         <shell><![CDATA[cd /maven; java -Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom -jar ${project.artifactId}-${project.version}.${project.packaging}]]></shell>
239                                                                 </cmd>
240                                                         </build>
241                                                 </image>
242                                         </images>
243                                 </configuration>
244                                 <!-- build Docker images in install phase, push in deploy phase -->
245                                 <executions>
246                                         <execution>
247                                                 <goals>
248                                                         <goal>build</goal>
249                                                         <goal>push</goal>
250                                                 </goals>
251                                         </execution>
252                                 </executions>
253                         </plugin>
254                 </plugins>
255         </build>
256 </project>