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