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