26d8f8aaf3456f7c1a10458df0f1e272b65e5993
[portal/ric-dashboard.git] / webapp-backend / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--<![CDATA[
3 ========================LICENSE_START=================================
4 ORAN-OSC
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.0.1-SNAPSHOT</version>
29         </parent>
30         <artifactId>ric-dash-be</artifactId>
31         <name>RIC Dashboard Webapp backend</name>
32         <properties>
33                 <java.version>1.8</java.version>
34                 <!-- this is not a library, don't publish javadoc -->
35                 <maven.javadoc.skip>true</maven.javadoc.skip>
36                 <springfox.version>2.9.2</springfox.version>
37         </properties>
38         <dependencies>
39                 <dependency>
40                         <groupId>org.o-ran-sc.ric.a1med.client</groupId>
41                         <artifactId>a1-med-client</artifactId>
42                         <version>0.3.0-SNAPSHOT</version>
43                 </dependency>
44                 <dependency>
45                         <groupId>org.o-ran-sc.ric.e2mgr.client</groupId>
46                         <artifactId>e2-mgr-client</artifactId>
47                         <version>02052019-SNAPSHOT</version>
48                 </dependency>
49                 <dependency>
50                         <groupId>org.o-ran-sc.ric.xappmgr.client</groupId>
51                         <artifactId>xapp-mgr-client</artifactId>
52                         <version>0.0.10-SNAPSHOT</version>
53                 </dependency>
54                 <dependency>
55                         <groupId>org.springframework.boot</groupId>
56                         <artifactId>spring-boot-starter-web</artifactId>
57                 </dependency>
58                 <dependency>
59                         <groupId>org.slf4j</groupId>
60                         <artifactId>slf4j-api</artifactId>
61                 </dependency>
62                 <dependency>
63                         <groupId>ch.qos.logback</groupId>
64                         <artifactId>logback-classic</artifactId>
65                 </dependency>
66                 <dependency>
67                         <groupId>ch.qos.logback</groupId>
68                         <artifactId>logback-core</artifactId>
69                 </dependency>
70                 <dependency>
71                         <groupId>io.springfox</groupId>
72                         <artifactId>springfox-swagger2</artifactId>
73                         <version>${springfox.version}</version>
74                 </dependency>
75                 <dependency>
76                         <groupId>io.springfox</groupId>
77                         <artifactId>springfox-swagger-ui</artifactId>
78                         <version>${springfox.version}</version>
79                 </dependency>
80                 <!-- Mockito supports development, not just testing -->
81                 <dependency>
82                         <groupId>org.mockito</groupId>
83                         <artifactId>mockito-core</artifactId>
84                 </dependency>
85                 <!-- Test dependencies -->
86                 <dependency>
87                         <groupId>org.springframework.boot</groupId>
88                         <artifactId>spring-boot-starter-test</artifactId>
89                         <scope>test</scope>
90                 </dependency>
91         </dependencies>
92         <build>
93                 <plugins>
94                         <!-- do not deploy a jar or pom file -->
95                         <plugin>
96                                 <groupId>org.apache.maven.plugins</groupId>
97                                 <artifactId>maven-deploy-plugin</artifactId>
98                                 <!-- spring sets the <version>2.8</version> -->
99                                 <configuration>
100                                         <skip>true</skip>
101                                 </configuration>
102                         </plugin>
103                         <plugin>
104                                 <groupId>org.codehaus.mojo</groupId>
105                                 <artifactId>license-maven-plugin</artifactId>
106                                 <executions>
107                                         <execution>
108                                                 <goals>
109                                                         <goal>update-file-header</goal>
110                                                 </goals>
111                                                 <phase>process-sources</phase>
112                                                 <configuration>
113                                                         <organizationName>${lmp.organization.name}</organizationName>
114                                                         <inceptionYear>${lmp.inception.year}</inceptionYear>
115                                                         <projectName>${lmp.project.name}</projectName>
116                                                         <licenseName>${lmp.license.name}</licenseName>
117                                                         <processStartTag>${lmp.process.start.tag}</processStartTag>
118                                                         <processEndTag>${lmp.process.end.tag}</processEndTag>
119                                                         <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
120                                                 </configuration>
121                                         </execution>
122                                 </executions>
123                         </plugin>
124                         <plugin>
125                                 <groupId>org.springframework.boot</groupId>
126                                 <artifactId>spring-boot-maven-plugin</artifactId>
127                         </plugin>
128                         <plugin>
129                                 <artifactId>maven-resources-plugin</artifactId>
130                                 <!-- spring-boot sets the <version>3.1.0</version> -->
131                                 <executions>
132                                         <execution>
133                                                 <id>copy-resources</id>
134                                                 <phase>validate</phase>
135                                                 <goals>
136                                                         <goal>copy-resources</goal>
137                                                 </goals>
138                                                 <configuration>
139                                                         <outputDirectory>${project.build.directory}/classes/resources/</outputDirectory>
140                                                         <resources>
141                                                                 <resource>
142                                                                         <directory>${project.parent.basedir}/webapp-frontend/dist/dashApp/</directory>
143                                                                 </resource>
144                                                         </resources>
145                                                 </configuration>
146                                         </execution>
147                                 </executions>
148                         </plugin>
149                         <!-- https://stackoverflow.com/questions/39126226/fabric8-springboot-full-example -->
150                         <plugin>
151                                 <groupId>io.fabric8</groupId>
152                                 <artifactId>docker-maven-plugin</artifactId>
153                                 <version>0.28.0</version>
154                                 <configuration>
155                                         <verbose>true</verbose>
156                                         <!-- environment variables supplied by Jenkins -->
157                                         <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
158                                         <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
159                                         <images>
160                                                 <image>
161                                                         <!-- Specify a tag to avoid default tag "latest" -->
162                                                         <name>${project.artifactId}:${project.version}</name>
163                                                         <build>
164                                                                 <from>openjdk:8-jre-slim</from>
165                                                                 <tags>
166                                                                         <!-- Add tag with build number -->
167                                                                         <tag>${project.version}</tag>
168                                                                 </tags>
169                                                                 <assembly>
170                                                                         <descriptorRef>artifact</descriptorRef>
171                                                                 </assembly>
172                                                                 <runCmds>
173                                                                         <!-- Ensure logs dir exists and is world writable -->
174                                                                         <runCmd>mkdir /maven/logs</runCmd>
175                                                                         <runCmd>chmod -R 777 /maven</runCmd>
176                                                                 </runCmds>
177                                                                 <cmd>
178                                                                         <!-- CDATA prevents Eclipse formatter from breaking line -->
179                                                                         <shell><![CDATA[cd /maven; java -Xms128m -Xmx1024m -Djava.security.egd=file:/dev/./urandom -jar ${project.artifactId}-${project.version}.${project.packaging}]]></shell>
180                                                                 </cmd>
181                                                         </build>
182                                                 </image>
183                                         </images>
184                                 </configuration>
185                                 <!-- build Docker images in install phase, push in deploy phase -->
186                                 <executions>
187                                         <execution>
188                                                 <goals>
189                                                         <goal>build</goal>
190                                                         <goal>push</goal>
191                                                 </goals>
192                                         </execution>
193                                 </executions>
194                         </plugin>
195                 </plugins>
196         </build>
197 </project>