Trigger i-release documentation
[portal/nonrtric-controlpanel.git] / nonrtric-gateway / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 * ========================LICENSE_START=================================
4 * O-RAN-SC
5 * %%
6 * Copyright (C) 2021-2023 Nordix Foundation
7 * Copyright (C) 2023 OpenInfra Foundation Europe
8 * %%
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ========================LICENSE_END===================================
21 -->
22 <project xmlns="http://maven.apache.org/POM/4.0.0"
23     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
24     <modelVersion>4.0.0</modelVersion>
25     <parent>
26         <groupId>org.springframework.boot</groupId>
27         <artifactId>spring-boot-starter-parent</artifactId>
28         <version>3.0.6</version>
29         <relativePath />
30     </parent>
31     <groupId>org.o-ran-sc.nonrtric</groupId>
32     <artifactId>nonrtric-gateway</artifactId>
33     <version>1.3.0-SNAPSHOT</version>
34     <name>Nonrtric Gateway</name>
35     <description>Nonrtric Gateway</description>
36
37     <properties>
38         <java.version>17</java.version>
39         <spring-cloud.version>2022.0.2</spring-cloud.version>
40         <formatter-maven-plugin.version>2.13.0</formatter-maven-plugin.version>
41         <spotless-maven-plugin.version>2.30.0</spotless-maven-plugin.version>
42         <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
43     </properties>
44
45     <dependencies>
46         <dependency>
47             <groupId>org.springframework.cloud</groupId>
48             <artifactId>spring-cloud-starter-gateway</artifactId>
49         </dependency>
50
51         <dependency>
52             <groupId>org.springframework.boot</groupId>
53             <artifactId>spring-boot-starter-test</artifactId>
54             <scope>test</scope>
55         </dependency>
56         <dependency>
57             <groupId>org.springframework.boot</groupId>
58             <artifactId>spring-boot-starter-actuator</artifactId>
59             <scope>runtime</scope>
60         </dependency>
61     </dependencies>
62
63     <dependencyManagement>
64         <dependencies>
65             <dependency>
66                 <groupId>org.springframework.cloud</groupId>
67                 <artifactId>spring-cloud-dependencies</artifactId>
68                 <version>${spring-cloud.version}</version>
69                 <type>pom</type>
70                 <scope>import</scope>
71             </dependency>
72         </dependencies>
73     </dependencyManagement>
74
75     <build>
76         <plugins>
77             <plugin>
78                 <groupId>org.springframework.boot</groupId>
79                 <artifactId>spring-boot-maven-plugin</artifactId>
80             </plugin>
81             <plugin>
82                 <groupId>net.revelc.code.formatter</groupId>
83                 <artifactId>formatter-maven-plugin</artifactId>
84                 <version>${formatter-maven-plugin.version}</version>
85                 <configuration>
86                     <lineEnding>LF</lineEnding>
87                     <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
88                 </configuration>
89                 <!-- Use mvn formatter:format or spotless:apply -->
90             </plugin>
91             <plugin>
92                 <groupId>com.diffplug.spotless</groupId>
93                 <artifactId>spotless-maven-plugin</artifactId>
94                 <version>${spotless-maven-plugin.version}</version>
95                 <configuration>
96                     <lineEndings>UNIX</lineEndings>
97                     <java>
98                         <removeUnusedImports />
99                         <importOrder>
100                             <order>com,java,javax,org</order>
101                         </importOrder>
102                     </java>
103                 </configuration>
104                 <!-- Use mvn spotless:apply to rewrite source files use mvn spotless:check to validate files -->
105             </plugin>
106         </plugins>
107     </build>
108     <profiles>
109         <profile>
110             <id>docker</id>
111             <build>
112                 <plugins>
113                     <plugin>
114                         <groupId>io.fabric8</groupId>
115                         <artifactId>docker-maven-plugin</artifactId>
116                         <version>${docker-maven-plugin.version}</version>
117                         <inherited>false</inherited>
118                         <executions>
119                             <execution>
120                                 <id>generate-nonrtric-gateway-image</id>
121                                 <phase>package</phase>
122                                 <goals>
123                                     <goal>build</goal>
124                                 </goals>
125                                 <configuration>
126                                     <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
127                                     <images>
128                                         <image>
129                                             <name>o-ran-sc/nonrtric-gateway:${project.version}</name>
130                                             <build>
131                                                 <cleanup>try</cleanup>
132                                                 <contextDir>${basedir}</contextDir>
133                                                 <dockerFile>Dockerfile</dockerFile>
134                                                 <filter>false</filter>
135                                                 <args>
136                                                     <JAR>${project.build.finalName}.jar</JAR>
137                                                 </args>
138                                                 <tags>
139                                                     <tag>${project.version}</tag>
140                                                 </tags>
141                                             </build>
142                                         </image>
143                                     </images>
144                                 </configuration>
145                             </execution>
146                             <execution>
147                                 <id>push-nonrtric-gateway-image</id>
148                                 <goals>
149                                     <goal>build</goal>
150                                     <goal>push</goal>
151                                 </goals>
152                                 <configuration>
153                                     <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
154                                     <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
155                                     <images>
156                                         <image>
157                                             <name>o-ran-sc/nonrtric-gateway:${project.version}</name>
158                                             <build>
159                                                 <contextDir>${basedir}</contextDir>
160                                                 <dockerFile>Dockerfile</dockerFile>
161                                                 <filter>false</filter>
162                                                 <args>
163                                                     <JAR>${project.build.finalName}.jar</JAR>
164                                                 </args>
165                                                 <tags>
166                                                     <tag>${project.version}</tag>
167                                                     <tag>latest</tag>
168                                                 </tags>
169                                             </build>
170                                         </image>
171                                     </images>
172                                 </configuration>
173                             </execution>
174                         </executions>
175                     </plugin>
176                 </plugins>
177             </build>
178         </profile>
179     </profiles>
180 </project>