Initial commit of RIC Dashboard webapp
[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.oranosc.ric.portal.dashboard</groupId>
27                 <artifactId>ric-dash-parent</artifactId>
28                 <version>1.0.0-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                 <docker.push.registry>${env.NEXUS3_PUSH_REGISTRY}</docker.push.registry>
36         </properties>
37         <dependencies>
38                 <dependency>
39                         <groupId>${project.groupId}</groupId>
40                         <artifactId>xapp-mgr-client</artifactId>
41                         <version>0.0.10-SNAPSHOT</version>
42                 </dependency>
43                 <dependency>
44                         <groupId>org.springframework.boot</groupId>
45                         <artifactId>spring-boot-starter-web</artifactId>
46                 </dependency>
47                 <dependency>
48                         <groupId>org.springframework.boot</groupId>
49                         <artifactId>spring-boot-starter-test</artifactId>
50                         <scope>test</scope>
51                 </dependency>
52                 <dependency>
53                         <groupId>org.slf4j</groupId>
54                         <artifactId>slf4j-api</artifactId>
55                         <!-- Spring-boot sets the version -->
56                 </dependency>
57                 <dependency>
58                         <groupId>ch.qos.logback</groupId>
59                         <artifactId>logback-classic</artifactId>
60                         <!-- Spring-boot sets the version -->
61                 </dependency>
62                 <dependency>
63                         <groupId>ch.qos.logback</groupId>
64                         <artifactId>logback-core</artifactId>
65                         <!-- Spring-boot sets the version -->
66                 </dependency>
67                 <dependency>
68                         <groupId>io.springfox</groupId>
69                         <artifactId>springfox-swagger2</artifactId>
70                         <version>${springfox.version}</version>
71                 </dependency>
72                 <dependency>
73                         <groupId>io.springfox</groupId>
74                         <artifactId>springfox-swagger-ui</artifactId>
75                         <version>${springfox.version}</version>
76                 </dependency>
77         </dependencies>
78         <build>
79                 <plugins>
80                         <!-- do not deploy a jar or pom file -->
81                         <plugin>
82                                 <groupId>org.apache.maven.plugins</groupId>
83                                 <artifactId>maven-deploy-plugin</artifactId>
84                                 <!-- spring sets the <version>2.8</version> -->
85                                 <configuration>
86                                         <skip>true</skip>
87                                 </configuration>
88                         </plugin>
89                         <plugin>
90                                 <groupId>org.codehaus.mojo</groupId>
91                                 <artifactId>license-maven-plugin</artifactId>
92                                 <executions>
93                                         <execution>
94                                                 <goals>
95                                                         <goal>update-file-header</goal>
96                                                 </goals>
97                                                 <phase>process-sources</phase>
98                                                 <configuration>
99                                                         <organizationName>${lmp.organization.name}</organizationName>
100                                                         <inceptionYear>${lmp.inception.year}</inceptionYear>
101                                                         <projectName>${lmp.project.name}</projectName>
102                                                         <licenseName>${lmp.license.name}</licenseName>
103                                                         <processStartTag>${lmp.process.start.tag}</processStartTag>
104                                                         <processEndTag>${lmp.process.end.tag}</processEndTag>
105                                                         <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
106                                                 </configuration>
107                                         </execution>
108                                 </executions>
109                         </plugin>
110                         <plugin>
111                                 <groupId>org.springframework.boot</groupId>
112                                 <artifactId>spring-boot-maven-plugin</artifactId>
113                         </plugin>
114                         <plugin>
115                                 <artifactId>maven-resources-plugin</artifactId>
116                                 <!-- spring-boot sets the <version>3.1.0</version> -->
117                                 <executions>
118                                         <execution>
119                                                 <id>copy-resources</id>
120                                                 <phase>validate</phase>
121                                                 <goals>
122                                                         <goal>copy-resources</goal>
123                                                 </goals>
124                                                 <configuration>
125                                                         <outputDirectory>${project.build.directory}/classes/resources/</outputDirectory>
126                                                         <resources>
127                                                                 <resource>
128                                                                         <directory>${project.parent.basedir}/webapp-frontend/dist/dashApp/</directory>
129                                                                 </resource>
130                                                         </resources>
131                                                 </configuration>
132                                         </execution>
133                                 </executions>
134                         </plugin>
135                         <!-- https://stackoverflow.com/questions/39126226/fabric8-springboot-full-example -->
136                         <plugin>
137                                 <groupId>io.fabric8</groupId>
138                                 <artifactId>docker-maven-plugin</artifactId>
139                                 <version>0.28.0</version>
140                                 <configuration>
141                                         <verbose>true</verbose>
142                                         <!-- Not supplied to all jobs; e.g., Javadoc -->
143                                         <docker.pull.registry>nexus3.oran-osc.org:10001</docker.pull.registry>
144                                         <pushRegistry>${docker.push.registry}</pushRegistry>
145                                         <images>
146                                                 <image>
147                                                         <!-- Specify a tag to avoid default tag "latest" -->
148                                                         <name>${project.artifactId}:${project.version}</name>
149                                                         <build>
150                                                                 <from>openjdk:8-jre-slim</from>
151                                                                 <tags>
152                                                                         <!-- Add tag with build number -->
153                                                                         <tag>${project.version}</tag>
154                                                                 </tags>
155                                                                 <assembly>
156                                                                         <descriptorRef>artifact</descriptorRef>
157                                                                 </assembly>
158                                                                 <runCmds>
159                                                                         <!-- Ensure logs dir exists and is world writable -->
160                                                                         <runCmd>mkdir /maven/logs</runCmd>
161                                                                         <runCmd>chmod -R 777 /maven</runCmd>
162                                                                 </runCmds>
163                                                                 <cmd>
164                                                                         <!-- CDATA prevents Eclipse formatter from breaking line -->
165                                                                         <shell><![CDATA[cd /maven; java -Xms128m -Xmx1024m -Djava.security.egd=file:/dev/./urandom -jar ${project.artifactId}-${project.version}.${project.packaging}]]></shell>
166                                                                 </cmd>
167                                                         </build>
168                                                 </image>
169                                         </images>
170                                 </configuration>
171                                 <!-- build Docker images in install phase, push in deploy phase -->
172                                 <executions>
173                                         <execution>
174                                                 <goals>
175                                                         <goal>build</goal>
176                                                         <goal>push</goal>
177                                                 </goals>
178                                         </execution>
179                                 </executions>
180                         </plugin>
181                 </plugins>
182         </build>
183 </project>