-
Notifications
You must be signed in to change notification settings - Fork 10
/
pom.xml
456 lines (437 loc) · 19.7 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
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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
<?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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.authorization.life</groupId>
<artifactId>authorization-life</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
<name>authorization-life</name>
<description>Authorization Engineering</description>
<properties>
<!--当前工程中的所有模块,版本统一进行控制-->
<revision>1.0.0</revision>
<!-- resource.delimiter 标签参考:https://www.jianshu.com/p/4410613bb36f -->
<resource.delimiter>@</resource.delimiter>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<!--
spring-cloud 官网版本对应关系:
https://spring.io/projects/spring-cloud#learn
-->
<spring-cloud.version>2023.0.3</spring-cloud.version>
<spring-boot.version>3.2.7</spring-boot.version>
<!--
spring-cloud-alibaba:
官网:
https://sca.aliyun.com/
官网发布版本对应关系: https://sca.aliyun.com/docs/2023/overview/version-explain/
spring.io 对应官网地址: https://spring.io/projects/spring-cloud-alibaba#overview
-->
<spring-cloud-alibaba.version>2023.0.1.2</spring-cloud-alibaba.version>
<dubbo.version>3.2.15</dubbo.version>
<jackson-bom.version>2.17.2</jackson-bom.version>
<knife4j.version>4.5.0</knife4j.version>
<!--权限认证依赖-->
<spring-security.version>6.3.1</spring-security.version>
<authorization-server.version>1.3.1</authorization-server.version>
<nimbus-jwt.version>9.39.3</nimbus-jwt.version>
<!--数据库依赖-->
<mysql.version>9.0.0</mysql.version>
<mybatis-plus.version>3.5.7</mybatis-plus.version>
<mybatis-spring.version>3.0.4</mybatis-spring.version>
<pagehelper.version>2.1.0</pagehelper.version>
<!--工具依赖-->
<slf4j-api.version>2.0.13</slf4j-api.version>
<hutool.version>5.8.29</hutool.version>
<guava.version>33.2.1-jre</guava.version>
<commons-lang3.version>3.17.0</commons-lang3.version>
<orika.version>1.5.4</orika.version>
<mapstruct.version>1.5.5.Final</mapstruct.version>
<jasypt.version>3.0.5</jasypt.version>
<transmittable-thread-local.version>2.14.5</transmittable-thread-local.version>
</properties>
<modules>
<module>life-start-parent</module>
<module>life-base</module>
<module>life-remote-api</module>
<module>life-gateway</module>
<module>life-authserver</module>
<module>life-system</module>
</modules>
<!--将规定默认引入的依赖有哪些-->
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!-- 自动配置依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<!-- 面向切面变成 aop -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!-- 配置类处理器 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
</dependency>
<!--加载 bootstrap.yml 中的信息 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>life-utils</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>life-common</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>life-core</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>mybatis-start-life</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>redis-start-life</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>knife4j-start-life</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>valid-start-life</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>mail-start-life</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>dubbo-start-life</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>lov-start-life</artifactId>
<version>${revision}</version>
</dependency>
<!--对于api工程可以在各个子服务工程中引入并设置版本号-start-->
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>authserver-remote-api</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.authorization.life</groupId>
<artifactId>system-remote-api</artifactId>
<version>${revision}</version>
</dependency>
<!--对于api工程可以在各个子服务工程中引入并设置版本号-end-->
<!--以上为工程内部的子工程-->
<!-- 日志门面单独引入 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<!--hutool工具类-->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<!--bean之间的转换-->
<dependency>
<groupId>ma.glasnost.orika</groupId>
<artifactId>orika-core</artifactId>
<version>${orika.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<!--配置文件中字段的加解密-->
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>${jasypt.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>${transmittable-thread-local.version}</version>
</dependency>
<!--以上为工具包依赖-->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>${mysql.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>${mybatis-spring.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.version}</version>
</dependency>
<!--以上为数据库连接-->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-authorization-server</artifactId>
<version>${authorization-server.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<!-- 此处的版本号与 spring-security-oauth2-authorization-server 依赖的版本号一致 -->
<version>${nimbus-jwt.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-bom</artifactId>
<version>${spring-security.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--以上为security+oauth2-->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-dependencies</artifactId>
<version>${knife4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-bom</artifactId>
<version>${dubbo.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring-cloud-alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--以上为基础的导入依赖-->
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>nexus</id>
<name>nexus</name>
<!--仓库地址 仅仅是 需要拉取jar包, 这个即可使用 -->
<url>http://127.0.0.1:18081/repository/maven-central/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<!--
<distributionManagement>
<!– 如果需要上传jar包, 需要配置此标签 –>
<repository>
<!– 上传稳定版本的jar包 –>
<id>releases</id>
<url>http://127.0.0.1:18081/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<!–上传快照–>
<id>snapshots</id>
<url>http://127.0.0.1:18081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<pluginRepositories>
<pluginRepository>
<!–插件地址–>
<id>nexus</id>
<url>http://127.0.0.1:8181/repository/maven-public/</url>
</pluginRepository>
</pluginRepositories>
-->
<build>
<finalName>${project.artifactId}</finalName>
<pluginManagement>
<plugins>
<!--maven-compiler-plugin插件可以指定项目源码的jdk版本,编译后的jdk版本,以及编码。-->
<!-- 参考: https://blog.csdn.net/liupeifeng3514/article/details/80236077 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<testSource>${java.version}</testSource>
<testTarget>${java.version}</testTarget>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!--maven-source-plugin 这个插件专门负责将项目源文件打成包的-->
<!--参考: https://blog.csdn.net/liaowenxiong/article/details/124879376 -->
<!--提供项目自动将源码打包并发布的功能, maven会自动将source install到repository -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<!-- 执行生命周期阶段 verify 时会调用该插件的目标 jar-no-fork,该目标会将 jar 文件安装到本地的 Maven 仓库中。 -->
<phase>verify</phase>
<goals>
<!--在生命周期后执行绑定的source插件的goals -->
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<!-- 生成的jar中,包含pom.xml和pom.properties这两个文件 -->
<addMavenDescriptor>true</addMavenDescriptor>
<!-- 生成MANIFEST.MF的设置 -->
<manifest>
<!--这个属性特别关键,如果没有这个属性,有时候我们引用的包maven库
下面可能会有多个包,并且只有一个是正确的,其余的可能是带时间戳的,
此时会在classpath下面把那个带时间戳的给添加上去,
然后我们 在依赖打包的时候,打的是正确的,所以两头会对不上,报错。 -->
<useUniqueVersions>false</useUniqueVersions>
<!-- 为依赖包添加路径, 这些路径会写在MANIFEST文件的Class-Path下 -->
<addClasspath>true</addClasspath>
<!-- 这个jar所依赖的jar包添加classPath的时候的前缀,如果这个jar本身
和依赖包在同一级目录,则不需要添加 -->
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
<!--springboot启动类的jar包-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<!--
配置参考:
https://blog.csdn.net/tian830937/article/details/119525273
-->
<configuration>
<addResources>true</addResources>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>