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