-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
232 lines (216 loc) · 10.8 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.5</version>
</parent>
<groupId>by.dudkin</groupId>
<artifactId>taxi-restapi</artifactId>
<version>1.0</version>
<name>${project.artifactId}</name>
<packaging>pom</packaging>
<modules>
<module>taxi-restapi-passenger-service</module>
<module>taxi-restapi-authentication-server</module>
<module>taxi-restapi-driver-service</module>
<module>taxi-restapi-rides-service</module>
<module>taxi-restapi-common-module</module>
<module>taxi-restapi-discovery-server</module>
<module>taxi-restapi-notification-service</module>
<module>taxi-restapi-payment-service</module>
<module>taxi-restapi-api-gateway</module>
<module>taxi-restapi-promocode-service</module>
</modules>
<properties>
<!-- Versions can be modified later -->
<!-- Third-party libraries -->
<lombok.version>1.18.34</lombok.version>
<spring-cloud.version>2023.0.3</spring-cloud.version>
<spring-doc.version>2.6.0</spring-doc.version>
<spring-boot.version>3.3.5</spring-boot.version>
<mapstruct.version>1.6.0</mapstruct.version>
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
<common-module.version>1.0</common-module.version>
<mockito.version>5.11.0</mockito.version>
<testcontainers.version>1.20.3</testcontainers.version>
<liquibase.version>4.30.0</liquibase.version>
<shedlock.version>6.2.0</shedlock.version>
<logstash-encoder.version>7.2</logstash-encoder.version>
<!-- Maven plugins -->
<java.version>21</java.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<openapi-generator-maven-plugin.version>7.8.0</openapi-generator-maven-plugin.version>
<!-- Docker -->
<docker.image.prefix>rainaddan</docker.image.prefix>
<docker.image.exposed.port>3030</docker.image.exposed.port>
<docker.image.dockerfile.dir>${basedir}</docker.image.dockerfile.dir>
<container.executable>docker</container.executable>
<!-- By default, the OCI image is build for the linux/amd64 platform -->
<!-- For Apple Silicon M2 Chip you have to change it to the linux/arm64 -->
<container.platform>linux/amd64</container.platform>
<!-- The -load option is a shortcut for or -output=type=docker -->
<!-- Could be changed by the -push option !-->
<container.build.extraarg>--load</container.build.extraarg>
</properties>
<dependencyManagement>
<dependencies>
<!-- Spring Cloud -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>${lombok-mapstruct-binding.version}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<arg>-Amapstruct.defaultComponentModel=spring</arg>
</compilerArgs>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>springboot</id>
<activation>
<file>
<!-- Just a way to identify a Spring Boot application -->
<exists>src/main/resources/application.yaml</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
<configuration>
<additionalProperties>
<encoding.source>${project.build.sourceEncoding}</encoding.source>
<encoding.reporting>${project.reporting.outputEncoding}</encoding.reporting>
<java.version>${java.version}</java.version>
</additionalProperties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-java</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<message>
🚫 Java version error: This project requires Java ${java.version} or higher.
Your current Java version is ${java.version}
To fix this:
1. Download and install Java 21 or higher from your preferred vendor
2. Make sure JAVA_HOME points to the new Java installation
3. Verify with 'java -version' command
4. Run the build again
For more information, check the project documentation.
</message>
<version>${java.version}</version>
</requireJavaVersion>
</rules>
<failFast>true</failFast>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>buildDocker</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>docker-build</id>
<phase>install</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${container.executable}</executable>
<workingDirectory>${docker.image.dockerfile.dir}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-f</argument>
<argument>Dockerfile</argument>
<argument>--build-arg</argument>
<argument>ARTIFACT_NAME=${project.build.finalName}</argument>
<argument>--build-arg</argument>
<argument>EXPOSED_PORT=${docker.image.exposed.port}</argument>
<argument>--platform</argument>
<argument>${container.platform}</argument>
<argument>${container.build.extraarg}</argument>
<argument>-t</argument>
<argument>${docker.image.prefix}/${project.artifactId}</argument>
<argument>${project.build.directory}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
</project>