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