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