1 <?xml version="1.0" encoding="UTF-8"?>
6 ========================LICENSE_START=================================
9 Copyright (C) 2019 AT&T Intellectual Property
10 Modifications Copyright (C) 2020 Nordix Foundation
12 Licensed under the Apache License, Version 2.0 (the "License");
13 you may not use this file except in compliance with the License.
14 You may obtain a copy of the License at
16 http://www.apache.org/licenses/LICENSE-2.0
18 Unless required by applicable law or agreed to in writing, software
19 distributed under the License is distributed on an "AS IS" BASIS,
20 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 See the License for the specific language governing permissions and
22 limitations under the License.
23 ========================LICENSE_END===================================
26 xmlns="http://maven.apache.org/POM/4.0.0"
27 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
28 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
29 <modelVersion>4.0.0</modelVersion>
31 <groupId>org.o-ran-sc.portal.nonrtric.controlpanel</groupId>
32 <artifactId>nonrtric-controlpanel-parent</artifactId>
33 <version>1.0.0-SNAPSHOT</version>
35 <artifactId>nonrtric-controlpanel-be</artifactId>
36 <name>Non-RT RIC Controlpanel Webapp backend</name>
38 <epsdk-fw.version>2.6.0</epsdk-fw.version>
39 <springfox.version>2.9.2</springfox.version>
40 <immutable.version>2.7.1</immutable.version>
41 <apache-axis2.version>1.7.9</apache-axis2.version>
42 <formatter-maven-plugin.version>2.8.1</formatter-maven-plugin.version>
43 <spotless-maven-plugin.version>1.18.0</spotless-maven-plugin.version>
44 <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
45 <docker-maven-plugin.version>0.33.0</docker-maven-plugin.version>
46 <!-- Set by Jenkins -->
47 <build.number>0</build.number>
51 <id>onap-releases</id>
52 <name>ONAP - Release Repository</name>
53 <url>https://nexus.onap.org/content/repositories/releases</url>
57 <!-- Platform components -->
59 <groupId>org.onap.portal.sdk</groupId>
60 <artifactId>epsdk-fw</artifactId>
61 <version>${epsdk-fw.version}</version>
64 <groupId>commons-logging</groupId>
65 <artifactId>commons-logging</artifactId>
68 <groupId>log4j</groupId>
69 <artifactId>log4j</artifactId>
72 <groupId>log4j</groupId>
73 <artifactId>apache-log4j-extras</artifactId>
76 <groupId>org.slf4j</groupId>
77 <artifactId>slf4j-log4j12</artifactId>
80 <groupId>junit</groupId>
81 <artifactId>junit</artifactId>
84 <groupId>commons-fileupload</groupId>
85 <artifactId>commons-fileupload</artifactId>
88 <groupId>commons-beanutils</groupId>
89 <artifactId>commons-beanutils</artifactId>
91 <!-- EELF omits "test" scope on this dependency -->
93 <groupId>org.powermock</groupId>
94 <artifactId>powermock-module-junit4</artifactId>
96 <!-- EELF omits "test" scope on this dependency -->
98 <groupId>org.powermock</groupId>
99 <artifactId>powermock-api-mockito</artifactId>
104 <groupId>org.springframework.boot</groupId>
105 <artifactId>spring-boot-starter-security</artifactId>
108 <groupId>org.springframework.boot</groupId>
109 <artifactId>spring-boot-starter-web</artifactId>
112 <groupId>org.slf4j</groupId>
113 <artifactId>slf4j-api</artifactId>
116 <groupId>org.apache.axis2</groupId>
117 <artifactId>axis2-kernel</artifactId>
118 <version>${apache-axis2.version}</version>
120 <!-- Bridge uses of Apache commons logging, like EPSDK-FW -->
122 <groupId>org.slf4j</groupId>
123 <artifactId>jcl-over-slf4j</artifactId>
126 <groupId>ch.qos.logback</groupId>
127 <artifactId>logback-classic</artifactId>
130 <groupId>ch.qos.logback</groupId>
131 <artifactId>logback-core</artifactId>
134 <groupId>io.springfox</groupId>
135 <artifactId>springfox-swagger2</artifactId>
136 <version>${springfox.version}</version>
139 <groupId>io.springfox</groupId>
140 <artifactId>springfox-swagger-ui</artifactId>
141 <version>${springfox.version}</version>
144 <groupId>org.immutables</groupId>
145 <artifactId>value</artifactId>
146 <version>${immutable.version}</version>
147 <scope>provided</scope>
150 <groupId>org.immutables</groupId>
151 <artifactId>gson</artifactId>
152 <version>${immutable.version}</version>
154 <!-- Test dependencies -->
155 <!-- Mockito supports development, not just testing -->
157 <groupId>org.mockito</groupId>
158 <artifactId>mockito-core</artifactId>
162 <groupId>org.springframework.boot</groupId>
163 <artifactId>spring-boot-starter-test</artifactId>
167 <groupId>org.junit.jupiter</groupId>
168 <artifactId>junit-jupiter-api</artifactId>
172 <groupId>org.junit.jupiter</groupId>
173 <artifactId>junit-jupiter-engine</artifactId>
177 <groupId>org.junit.platform</groupId>
178 <artifactId>junit-platform-launcher</artifactId>
185 <groupId>org.springframework.boot</groupId>
186 <artifactId>spring-boot-maven-plugin</artifactId>
189 <groupId>net.revelc.code.formatter</groupId>
190 <artifactId>formatter-maven-plugin</artifactId>
191 <version>${formatter-maven-plugin.version}</version>
193 <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
195 <!-- https://code.revelc.net/formatter-maven-plugin/ use
196 mvn formatter:format spotless:apply process-sources -->
199 <groupId>com.diffplug.spotless</groupId>
200 <artifactId>spotless-maven-plugin</artifactId>
201 <version>${spotless-maven-plugin.version}</version>
204 <removeUnusedImports />
206 <order>com,java,javax,org</order>
210 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven
211 use mvn spotless:apply to rewrite source files use mvn spotless:check to
212 validate source files -->
215 <!-- Most configuration and all execution is inherited -->
216 <groupId>org.codehaus.mojo</groupId>
217 <artifactId>license-maven-plugin</artifactId>
223 <exclude>**/*.json</exclude>
227 <!-- Add the build number to the jar manifest. Spring-Boot uses a complex
228 packaging process that makes access to the original Manifest.MF very difficult.
229 However, Java provides access to the implementation version for a package,
230 so cram the build number into there. -->
232 <groupId>org.apache.maven.plugins</groupId>
233 <artifactId>maven-jar-plugin</artifactId>
237 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
240 <Implementation-Version>${project.version}-b${build.number}</Implementation-Version>
246 <artifactId>maven-resources-plugin</artifactId>
249 <id>copy-resources</id>
250 <phase>validate</phase>
252 <goal>copy-resources</goal>
255 <outputDirectory>${project.build.directory}/classes/resources/</outputDirectory>
258 <directory>${project.parent.basedir}/webapp-frontend/dist/controlpanelApp/</directory>
265 <!-- do not deploy a jar or pom file -->
267 <groupId>org.apache.maven.plugins</groupId>
268 <artifactId>maven-deploy-plugin</artifactId>
274 <groupId>org.jacoco</groupId>
275 <artifactId>jacoco-maven-plugin</artifactId>
276 <version>${jacoco-maven-plugin.version}</version>
279 <id>default-prepare-agent</id>
281 <goal>prepare-agent</goal>
285 <id>default-report</id>
286 <phase>prepare-package</phase>
293 <!-- https://stackoverflow.com/questions/39126226/fabric8-springboot-full-example -->
295 <groupId>io.fabric8</groupId>
296 <artifactId>docker-maven-plugin</artifactId>
297 <version>${docker-maven-plugin.version}</version>
299 <verbose>true</verbose>
300 <!-- environment variables supplied by Jenkins -->
301 <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
302 <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
305 <!-- Specify a tag to avoid default tag "latest" -->
306 <!-- Avoid maven artifact name here -->
307 <name>o-ran-sc/nonrtric-controlpanel:${project.version}</name>
309 <from>openjdk:11-jre-slim</from>
311 <!-- Add tag with build number -->
312 <tag>${project.version}</tag>
315 <descriptorRef>artifact</descriptorRef>
318 <!-- Ensure logs dir exists and is world writable -->
319 <runCmd>mkdir /logs</runCmd>
320 <runCmd>chmod -R 777 /logs</runCmd>
323 <!-- Include maven dir on classpath for prop files -->
329 <arg>maven:maven/${project.artifactId}-${project.version}.${project.packaging}</arg>
330 <arg>-Dloader.main=org.oransc.portal.nonrtric.controlpanel.ControlpanelApplication</arg>
331 <arg>-Djava.security.egd=file:/dev/./urandom</arg>
332 <arg>org.springframework.boot.loader.PropertiesLauncher</arg>
339 <!-- build Docker images in install phase, push in deploy phase -->