-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
193 lines (193 loc) · 6.81 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
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.daggerok</groupId>
<artifactId>r2dbc-postgres-json</artifactId>
<version>0.0.0-SNAPSHOT</version>
<name>r2dbc-event-store</name>
<description>Spring Boot R2DBC using Postgres</description>
<properties>
<java.version>11</java.version>
<yasson.version>2.0.2</yasson.version>
<jakarta.json.version>2.0.0</jakarta.json.version>
<r2dbc-migrate.version>1.6.1</r2dbc-migrate.version>
<postgres-db>postgres</postgres-db>
<postgres-port>5432</postgres-port>
<postgres-user>postgres</postgres-user>
<postgres-host>postgres</postgres-host>
<postgres-password>postgres</postgres-password>
<docker-repository>daggerok</docker-repository>
<docker-maven-plugin.version>0.35.0</docker-maven-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
<version>${jakarta.json.version}</version>
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${jakarta.json.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<version>${jakarta.json.version}</version>
<classifier>module</classifier>
</dependency>
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>yasson</artifactId>
<version>${yasson.version}</version>
</dependency>
<dependency>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<artifactId>r2dbc-migrate-spring-boot-starter</artifactId>
<version>${r2dbc-migrate.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-r2dbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker-maven-plugin.version}</version>
<configuration>
<follow>false</follow>
<verbose>true</verbose>
<useColor>true</useColor>
<logDate>default</logDate>
<autoPull>always</autoPull>
<keepRunning>false</keepRunning>
<watchInterval>500</watchInterval>
<allContainers>true</allContainers>
<removeVolumes>true</removeVolumes>
<imagePullPolicy>IfNotPresent</imagePullPolicy>
<autoCreateCustomNetworks>true</autoCreateCustomNetworks>
<images>
<image>
<name>${docker-repository}/${postgres-host}</name>
<alias>${postgres-host}</alias>
<build>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
<from>postgres:9.6.21-alpine</from>
<ports>
<port>${postgres-port}</port>
</ports>
<env>
<POSTGRES_DB>${postgres-db}</POSTGRES_DB>
<POSTGRES_USER>${postgres-user}</POSTGRES_USER>
<POSTGRES_PASSWORD>${postgres-password}</POSTGRES_PASSWORD>
<POSTGRES_HOST>${postgres-host}.${project.artifactId}</POSTGRES_HOST>
<POSTGRES_PORT>${postgres-port}</POSTGRES_PORT>
</env>
<healthCheck>
<retries>9</retries>
<timeout>3s</timeout>
<interval>3s</interval>
<startPeriod>3s</startPeriod>
<cmd>pg_isready -h 127.0.0.1 -p ${postgres-port} -d $$POSTGRES_DB -U $$POSTGRES_USER</cmd>
</healthCheck>
</build>
<run>
<autoRemove>false</autoRemove>
<hostname>${postgres-host}</hostname>
<network>
<mode>custom</mode>
<name>${project.artifactId}</name>
<alias>${postgres-host}</alias>
<alias>${postgres-host}.${project.artifactId}</alias>
</network>
<ports>
<port>${postgres-port}:${postgres-port}</port>
</ports>
<wait>
<time>35000</time>
<healthy>true</healthy>
</wait>
</run>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile><!-- ./mvnw -P pg-start -->
<id>pg-start</id>
<build>
<defaultGoal>docker:build docker:start</defaultGoal>
</build>
</profile>
<profile><!-- ./mvnw -P pg-stop -->
<id>pg-stop</id>
<build>
<defaultGoal>docker:stop docker:remove</defaultGoal>
</build>
</profile>
</profiles>
</project>