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