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