-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
309 lines (291 loc) · 13.6 KB
/
Copy pathpom.xml
File metadata and controls
309 lines (291 loc) · 13.6 KB
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<?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>
<!--
Flydb 根 POM
设计依据:docs/design/01-modules.md
- 统一版本由 revision 属性管理(CI-friendly),flatten-maven-plugin 处理发布
- Maven 坐标 namespace 为 io.github.zzxcoding(Central Portal 经 GitHub 验证);
Java 包名保持 com.flydb.*,两者相互独立
- core/cli/starter-2 编译目标 Java 8;starter-3、integration-tests 目标 Java 17
- enforcer 在 flydb-core 强制"零非 test 运行时依赖"
- JaCoCo 行覆盖率 ≥80% 构建门禁(integration-tests 除外)
-->
<groupId>io.github.zzxcoding</groupId>
<artifactId>flydb-parent</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
<name>Flydb Parent</name>
<description>面向各类 JDBC 数据库、以国产信创数据库支持为特色的 Schema 版本化迁移工具</description>
<url>https://github.com/zzxCoding/Flydb</url>
<licenses>
<license>
<name>Apache License 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<name>zzxcoding</name>
<url>https://github.com/zzxCoding</url>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/zzxCoding/Flydb.git</connection>
<developerConnection>scm:git:ssh://git@github.com/zzxCoding/Flydb.git</developerConnection>
<url>https://github.com/zzxCoding/Flydb/tree/main</url>
<tag>HEAD</tag>
</scm>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/zzxCoding/Flydb/issues</url>
</issueManagement>
<ciManagement>
<system>GitHub Actions</system>
<url>https://github.com/zzxCoding/Flydb/actions</url>
</ciManagement>
<properties>
<revision>0.2.1</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Java 8 字节码基线(core/cli/starter-2)。JDK 9+ 通过下方 profile 切换到更严格的 release。 -->
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<argLine></argLine>
<!-- 依赖版本(仅测试期) -->
<junit.version>5.10.2</junit.version>
<assertj.version>3.25.3</assertj.version>
<spring-boot-2.version>2.7.18</spring-boot-2.version>
<spring-boot-3.version>3.5.16</spring-boot-3.version>
<h2.version>2.1.214</h2.version>
<mysql.driver.version>8.2.0</mysql.driver.version>
<slf4j-1.version>1.7.36</slf4j-1.version>
<!-- 插件版本 -->
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
<maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version>
<maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>
<jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
<maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.10.1</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
<central-publishing-maven-plugin.version>0.11.0</central-publishing-maven-plugin.version>
</properties>
<modules>
<module>flydb-core</module>
<module>flydb-cli</module>
<module>flydb-spring-boot-2-starter</module>
<module>flydb-spring-boot-3-starter</module>
<module>examples/boot2-demo</module>
<module>examples/boot3-demo</module>
<module>flydb-integration-tests</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<argLine>@{argLine} -Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${flatten-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central-publishing-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- 根级环境约束:Maven 3.6.3+ / JDK 8+ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
<executions>
<execution>
<id>enforce-build-env</id>
<goals><goal>enforce</goal></goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.6.3,)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>[1.8,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!-- 处理 ${revision} 等 CI-friendly 属性,发布时写入扁平 pom -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals><goal>flatten</goal></goals>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
</configuration>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals><goal>clean</goal></goals>
</execution>
</executions>
</plugin>
<!-- 发布演练与正式发布都附带可追溯的源码和 API 文档。 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>package</phase>
<goals><goal>jar-no-fork</goal></goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>none</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>package</phase>
<goals><goal>jar</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!--
JDK 9+ 上启用 release 8 交叉编译(更严格:防止误用 Java 9+ API)。
JDK 8 上回退到 source/target 8(此时可用 API 本就只有 Java 8,等价安全)。
参见 docs/design/01-modules.md §1。
-->
<profile>
<id>cross-compile-release</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<maven.compiler.release>8</maven.compiler.release>
</properties>
</profile>
<!--
Maven Central 发布(Sonatype Central Portal,OSSRH 已于 2025-06 停用)。
仅在发布流程(.github/workflows/release.yml,-Pcentral)激活;
未激活时默认 deploy 行为不变,CI 的本地 staging 演练不受影响。
凭据约定(写入 ~/.m2/settings.xml):
- server id "central":Central Portal user token(username/password)
- server id "gpg.passphrase":GPG 私钥口令
-->
<profile>
<id>central</id>
<build>
<plugins>
<!-- 签名所有产物(jar/sources/javadoc/zip 逐个生成 .asc),Central 强制要求 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals><goal>sign</goal></goals>
</execution>
</executions>
</plugin>
<!--
extensions=true 接管默认 deploy;发布范围遵循设计 01 §1:
parent/core/cli(jar+zip)/两 starter;demo 与 integration-tests 排除
(它们同时设置了 maven.deploy.skip=true,双保险)。
-->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
<excludeArtifacts>
<artifact>flydb-boot2-demo</artifact>
<artifact>flydb-boot3-demo</artifact>
<artifact>flydb-integration-tests</artifact>
</excludeArtifacts>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>