-
-
Notifications
You must be signed in to change notification settings - Fork 125
/
pom.xml
576 lines (574 loc) · 24.9 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
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright (c) 2022-2024 KCloud-Platform-IoT Author or Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
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>
<groupId>org.laokou</groupId>
<artifactId>KCloud-Platform-IoT</artifactId>
<version>3.4.1</version>
<packaging>pom</packaging>
<modules>
<module>laokou-common</module>
<module>laokou-cloud</module>
<module>laokou-service</module>
<module>laokou-tool</module>
<module>laokou-cola</module>
<module>laokou-sample</module>
<module>laokou-test</module>
</modules>
<name>KCloud-Platform-IoT</name>
<description>一个企业级微服务架构的云服务多租户IoT平台</description>
<url>https://koushenhai.github.io/KCloud-Platform-IoT</url>
<developers>
<developer>
<name>laokou</name>
<email>[email protected]</email>
<organization>https://github.com/KouShenhai</organization>
</developer>
</developers>
<scm>
<tag>kcloud-platform-iot-3.4.1.RELEASE</tag>
<url>https://github.com/KouShenhai/KCloud-Platform-IoT</url>
<connection>scm:git:https://github.com/KouShenhai/KCloud-Platform-IoT.git</connection>
<developerConnection>scm:git:https://github.com/KouShenhai/KCloud-Platform-IoT.git</developerConnection>
</scm>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<properties>
<laokou.version>3.4.1</laokou.version>
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<spring-boot-maven-plugin.version>3.4.1</spring-boot-maven-plugin.version>
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
<!--spring-boot版本-->
<spring-boot.version>3.4.1</spring-boot.version>
<!--spring-cloud版本-->
<spring-cloud.version>2024.0.0</spring-cloud.version>
<!--spring-framework版本-->
<spring-framework.version>6.2.1</spring-framework.version>
<!--cloud-alibaba版本-->
<spring-cloud-alibaba.version>2023.0.3.2</spring-cloud-alibaba.version>
<!--springdoc-openapi版本-->
<springdoc-openapi.version>2.7.0</springdoc-openapi.version>
<docker.host>tcp://127.0.0.1:2375</docker.host>
<docker.registry>registry.cn-shenzhen.aliyuncs.com</docker.registry>
<docker.namespace>koushenhai</docker.namespace>
<docker.username>username</docker.username>
<docker.password>password</docker.password>
<docker-maven-plugin.version>0.45.1</docker-maven-plugin.version>
<maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
<native-maven-plugin.version>0.10.4</native-maven-plugin.version>
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
<spring-asciidoctor-backends.version>0.0.7</spring-asciidoctor-backends.version>
<asciidoctor-maven-plugin.version>3.1.1</asciidoctor-maven-plugin.version>
<spring-javaformat-maven-plugin.version>0.0.43</spring-javaformat-maven-plugin.version>
<maven-archetype-plugin.version>3.3.1</maven-archetype-plugin.version>
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- 定义 common 版本 -->
<dependency>
<groupId>org.laokou</groupId>
<artifactId>laokou-common-bom</artifactId>
<version>${laokou.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- 定义 spring boot 版本 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- 定义 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>
<!-- 定义 spring cloud alibaba 版本 -->
<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>
<!-- 定义spring framework 版本 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${spring-framework.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- 定义 springdoc openapi 版本 -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi</artifactId>
<version>${springdoc-openapi.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>tencent-cloud-mirror</id>
<name>TenantCloud Maven Central</name>
<url>https://mirrors.cloud.tencent.com/nexus/repository/maven-public</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>tencent-mirror</id>
<name>Tenant Maven Central</name>
<url>https://mirrors.tencent.com/nexus/repository/maven-public</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>maven-central</id>
<name>Maven Central</name>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>spring-release</id>
<name>Spring Release</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>spring-milestone</id>
<name>Spring Milestone</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<profiles>
<!-- 开发环境 -->
<profile>
<id>dev</id>
<properties>
<DATASOURCE-USERNAME-NACOS>root</DATASOURCE-USERNAME-NACOS>
<DATASOURCE-PASSWORD-NACOS>laokou123</DATASOURCE-PASSWORD-NACOS>
<DATASOURCE-USERNAME-SNAIL-JOB>root</DATASOURCE-USERNAME-SNAIL-JOB>
<DATASOURCE-PASSWORD-SNAIL-JOB>laokou123</DATASOURCE-PASSWORD-SNAIL-JOB>
<DATASOURCE-HOST>postgresql</DATASOURCE-HOST>
<DATASOURCE-PARAM-NACOS>tcpKeepAlive=true&reWriteBatchedInserts=true&ApplicationName=laokou-nacos&useSSL=false&reWriteBatchedInserts=true&stringtype=unspecified</DATASOURCE-PARAM-NACOS>
<DATASOURCE-PARAM-SNAIL-JOB>tcpKeepAlive=true&reWriteBatchedInserts=true&ApplicationName=laokou-snail-job&useSSL=false&reWriteBatchedInserts=true&stringtype=unspecified</DATASOURCE-PARAM-SNAIL-JOB>
<DATASOURCE-PORT>5432</DATASOURCE-PORT>
<DATASOURCE-DRIVER-CLASS-NAME>org.postgresql.Driver</DATASOURCE-DRIVER-CLASS-NAME>
<DATASOURCE-PLATFORM>postgresql</DATASOURCE-PLATFORM>
<DATASOURCE-DB-NACOS>kcloud_platform_nacos</DATASOURCE-DB-NACOS>
<DATASOURCE-DB-SNAIL-JOB>kcloud_platform_snail_job</DATASOURCE-DB-SNAIL-JOB>
<NACOS-NAMESPACE>0dac1a68-2f01-40df-bd26-bf0cb199057a</NACOS-NAMESPACE>
<NACOS-DISCOVERY-ADDRESS>127.0.0.1:8848</NACOS-DISCOVERY-ADDRESS>
<NACOS-CONFIG-ADDRESS>127.0.0.1:8848</NACOS-CONFIG-ADDRESS>
<NACOS-GROUP>LAOKOU_GROUP</NACOS-GROUP>
<NACOS-USERNAME>nacos</NACOS-USERNAME>
<NACOS-PASSWORD>nacos</NACOS-PASSWORD>
<NACOS-CLUSTER-NAME>laokou-cluster</NACOS-CLUSTER-NAME>
<SENTINEL-USERNAME>sentinel</SENTINEL-USERNAME>
<SENTINEL-PASSWORD>sentinel</SENTINEL-PASSWORD>
<PROFILE-ACTIVE>dev</PROFILE-ACTIVE>
<SSL-ENABLED>false</SSL-ENABLED>
<JASYPT-ENCRYPTOR-PASSWORD>5201314wumeihua</JASYPT-ENCRYPTOR-PASSWORD>
<SEATA-GROUP>SEATA_GROUP</SEATA-GROUP>
<SEATA-USERNAME>seata</SEATA-USERNAME>
<SEATA-PASSWORD>seata</SEATA-PASSWORD>
<SEATA-LOG-PATH>./logs/seata</SEATA-LOG-PATH>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
</profile>
<!-- 测试环境 -->
<profile>
<id>test</id>
<properties>
<DATASOURCE-USERNAME-NACOS>ENC(aEwhK+oj5wQ/pJfRcfwXAw==)</DATASOURCE-USERNAME-NACOS>
<DATASOURCE-PASSWORD-NACOS>ENC(gruSGjDZ03lAN3qyE5UisGE2tvN3gS3Y)</DATASOURCE-PASSWORD-NACOS>
<DATASOURCE-USERNAME-SNAIL-JOB>
ENC(4pcvkMAYo/eI8yyOWMkKrZ5ULU2ITC7V9wivUEe9F99Phsh/FJeP+WxZB+wxBgjm)
</DATASOURCE-USERNAME-SNAIL-JOB>
<DATASOURCE-PASSWORD-SNAIL-JOB>
ENC(L22TUOP+1sSFU+2G/O6+/GCGTudE8Gb2Haf+0rlMxohzTd2l5nmdszMg4Me/Ogae)
</DATASOURCE-PASSWORD-SNAIL-JOB>
<DATASOURCE-HOST>postgresql</DATASOURCE-HOST>
<DATASOURCE-PARAM-NACOS>tcpKeepAlive=true&reWriteBatchedInserts=true&ApplicationName=laokou-nacos&useSSL=false&reWriteBatchedInserts=true&stringtype=unspecified</DATASOURCE-PARAM-NACOS>
<DATASOURCE-PARAM-SNAIL-JOB>tcpKeepAlive=true&reWriteBatchedInserts=true&ApplicationName=laokou-snail-job&useSSL=false&reWriteBatchedInserts=true&stringtype=unspecified</DATASOURCE-PARAM-SNAIL-JOB>
<DATASOURCE-PORT>5432</DATASOURCE-PORT>
<DATASOURCE-DRIVER-CLASS-NAME>org.postgresql.Driver</DATASOURCE-DRIVER-CLASS-NAME>
<DATASOURCE-PLATFORM>postgresql</DATASOURCE-PLATFORM>
<DATASOURCE-DB-NACOS>kcloud_platform_nacos</DATASOURCE-DB-NACOS>
<DATASOURCE-DB-SNAIL-JOB>kcloud_platform_snail_job</DATASOURCE-DB-SNAIL-JOB>
<NACOS-NAMESPACE>a61abd4c-ef96-42a5-99a1-616adee531f3</NACOS-NAMESPACE>
<NACOS-DISCOVERY-ADDRESS>https://nacos:8848</NACOS-DISCOVERY-ADDRESS>
<NACOS-CONFIG-ADDRESS>https://nacos:8848</NACOS-CONFIG-ADDRESS>
<NACOS-GROUP>LAOKOU_GROUP</NACOS-GROUP>
<NACOS-USERNAME>nacos</NACOS-USERNAME>
<NACOS-PASSWORD>nacos</NACOS-PASSWORD>
<NACOS-CLUSTER-NAME>laokou-cluster</NACOS-CLUSTER-NAME>
<SENTINEL-USERNAME>sentinel</SENTINEL-USERNAME>
<SENTINEL-PASSWORD>sentinel</SENTINEL-PASSWORD>
<PROFILE-ACTIVE>test</PROFILE-ACTIVE>
<SSL-ENABLED>true</SSL-ENABLED>
<JASYPT-ENCRYPTOR-PASSWORD>5201314wumeihua</JASYPT-ENCRYPTOR-PASSWORD>
<SEATA-GROUP>SEATA_GROUP</SEATA-GROUP>
<SEATA-USERNAME>seata</SEATA-USERNAME>
<SEATA-PASSWORD>seata</SEATA-PASSWORD>
<SEATA-LOG-PATH>./logs/seata</SEATA-LOG-PATH>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 正式环境 -->
<profile>
<id>prod</id>
<properties>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-USERNAME-NACOS>
${DATASOURCE_USERNAME_NACOS:ENC(aEwhK+oj5wQ/pJfRcfwXAw==)}
</DATASOURCE-USERNAME-NACOS>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-PASSWORD-NACOS>
${DATASOURCE_PASSWORD_NACOS:ENC(gruSGjDZ03lAN3qyE5UisGE2tvN3gS3Y)}
</DATASOURCE-PASSWORD-NACOS>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-USERNAME-SNAIL-JOB>
${DATASOURCE_USERNAME_SNAIL_JOB:ENC(4pcvkMAYo/eI8yyOWMkKrZ5ULU2ITC7V9wivUEe9F99Phsh/FJeP+WxZB+wxBgjm)}
</DATASOURCE-USERNAME-SNAIL-JOB>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-PASSWORD-SNAIL-JOB>
${DATASOURCE_PASSWORD_SNAIL_JOB:ENC(L22TUOP+1sSFU+2G/O6+/GCGTudE8Gb2Haf+0rlMxohzTd2l5nmdszMg4Me/Ogae)}
</DATASOURCE-PASSWORD-SNAIL-JOB>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-HOST>${DATASOURCE_HOST:postgresql}</DATASOURCE-HOST>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-PARAM-NACOS>
${DATASOURCE_PARAM_NACOS:tcpKeepAlive=true&reWriteBatchedInserts=true&ApplicationName=laokou-nacos&useSSL=false&reWriteBatchedInserts=true&stringtype=unspecified}
</DATASOURCE-PARAM-NACOS>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-PARAM-SNAIL-JOB>
${DATASOURCE_PARAM_SNAIL_JOB:tcpKeepAlive=true&reWriteBatchedInserts=true&ApplicationName=laokou-snail-job&useSSL=false&reWriteBatchedInserts=true&stringtype=unspecified}
</DATASOURCE-PARAM-SNAIL-JOB>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-PORT>${DATASOURCE_PORT:5432}</DATASOURCE-PORT>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-DRIVER-CLASS-NAME>
${DATASOURCE_DRIVER_CLASS_NAME:org.postgresql.Driver}
</DATASOURCE-DRIVER-CLASS-NAME>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-PLATFORM>${DATASOURCE_PLATFORM:postgresql}</DATASOURCE-PLATFORM>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-DB-NACOS>${DATASOURCE_DB_NACOS:kcloud_platform_nacos}</DATASOURCE-DB-NACOS>
<!--suppress UnresolvedMavenProperty -->
<DATASOURCE-DB-SNAIL-JOB>${DATASOURCE_DB_POWER_JOB:kcloud_platform_snail_job}</DATASOURCE-DB-SNAIL-JOB>
<!--suppress UnresolvedMavenProperty -->
<NACOS-NAMESPACE>${NACOS_NAMESPACE:8140e92b-fb43-48f5-b63b-7506185206a5}</NACOS-NAMESPACE>
<!--suppress UnresolvedMavenProperty -->
<NACOS-DISCOVERY-ADDRESS>${NACOS_DISCOVERY_ADDRESS:https://nacos:8848}</NACOS-DISCOVERY-ADDRESS>
<!--suppress UnresolvedMavenProperty -->
<NACOS-CONFIG-ADDRESS>${NACOS_CONFIG_ADDRESS:https://nacos:8848}</NACOS-CONFIG-ADDRESS>
<!--suppress UnresolvedMavenProperty -->
<NACOS-GROUP>${NACOS_GROUP:LAOKOU_GROUP}</NACOS-GROUP>
<!--suppress UnresolvedMavenProperty -->
<NACOS-USERNAME>${NACOS_USERNAME:nacos}</NACOS-USERNAME>
<!--suppress UnresolvedMavenProperty -->
<NACOS-PASSWORD>${NACOS_PASSWORD:nacos}</NACOS-PASSWORD>
<!--suppress UnresolvedMavenProperty -->
<NACOS-CLUSTER-NAME>${NACOS_CLUSTER_NAME:laokou-cluster}</NACOS-CLUSTER-NAME>
<!--suppress UnresolvedMavenProperty -->
<SENTINEL-USERNAME>${SENTINEL_USERNAME:sentinel}</SENTINEL-USERNAME>
<!--suppress UnresolvedMavenProperty -->
<SENTINEL-PASSWORD>${SENTINEL_PASSWORD:sentinel}</SENTINEL-PASSWORD>
<PROFILE-ACTIVE>prod</PROFILE-ACTIVE>
<SSL-ENABLED>true</SSL-ENABLED>
<!--suppress UnresolvedMavenProperty -->
<JASYPT-ENCRYPTOR-PASSWORD>${JASYPT_ENCRYPTOR_PASSWORD:5201314wumeihua}</JASYPT-ENCRYPTOR-PASSWORD>
<!--suppress UnresolvedMavenProperty -->
<SEATA-GROUP>${SEATA_GROUP:SEATA_GROUP}</SEATA-GROUP>
<!--suppress UnresolvedMavenProperty -->
<SEATA-USERNAME>${SEATA_USERNAME:seata}</SEATA-USERNAME>
<!--suppress UnresolvedMavenProperty -->
<SEATA-PASSWORD>${SEATA_PASSWORD:seata}</SEATA-PASSWORD>
<!--suppress UnresolvedMavenProperty -->
<SEATA-LOG-PATH>${SEATA_LOG_PATH:/opt}</SEATA-LOG-PATH>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
</profile>
</profiles>
<build>
<plugins>
<!--先set后commit【先运行插件,再修改版本】-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions-maven-plugin.version}</version>
<configuration>
<!--备份版本-->
<generateBackupPoms>true</generateBackupPoms>
<newVersion>3.4.2</newVersion>
<oldVersion>3.4.1</oldVersion>
</configuration>
</plugin>
<plugin>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
<version>${spring-javaformat-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<configuration>
<!-- 配置文件路径 -->
<configLocation>checkstyle/checkstyle.xml</configLocation>
<!-- true表示在命令行或控制台输出检查结果,否则结果不会直接在控制台显示 -->
<consoleOutput>true</consoleOutput>
<!-- true表示检查到错误,则整个构建过程失败 -->
<failsOnError>true</failsOnError>
<!-- 是否直接构造失败,true只要任何一个代码规范不通过,从而直接构建失败,false代码检查不通过,不会导致构建失败,但会报告违规情况 -->
<failOnViolation>true</failOnViolation>
<!-- 是否包含测试代码目录,true包含,false不包含,只检查主目录代码 -->
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<!-- 是否跳过代码规范检查,true跳过,false不跳过 -->
<skip>false</skip>
<!-- checkstyle报告是否包含代码引用链接,false不包含,true包含 -->
<linkXRef>false</linkXRef>
</configuration>
<executions>
<!-- 执行mvn install启动代码规范扫描 -->
<execution>
<id>install</id>
<phase>install</phase>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 打包插件,将 Java 源代码编译为字节码(.class 文件) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<compilerArgs>
<!-- 关闭对不推荐使用的编译器选项的警告 -->
<arg>-Xlint:-options</arg>
<!-- 启用对可变参数使用的警告 -->
<arg>-Xlint:varargs</arg>
<!-- 启用对使用原始类型raw types的警告 -->
<arg>-Xlint:rawtypes</arg>
<!-- 启用对未检查的操作的警告,比如未检查的类型转换 -->
<arg>-Xlint:unchecked</arg>
<!-- 启用对使用过时 API 的警告 -->
<arg>-Xlint:deprecation</arg>
<!-- 在编译的字节码中保留方法参数的名称,这对反射或序列化框架非常有用 -->
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>${maven-archetype-plugin.version}</version>
</plugin>
<!-- 执行Docker镜像的构建、推送和运行等操作 -->
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker-maven-plugin.version}</version>
<configuration>
<!--Docker主机-->
<dockerHost>${docker.host}</dockerHost>
<!--Docker私库-->
<registry>${docker.registry}</registry>
<!-- 认证信息-->
<authConfig>
<push>
<username>${docker.username}</username>
<password>${docker.password}</password>
</push>
</authConfig>
<images>
<image>
<!-- 推送仓库/命名空间/仓库名称:镜像版本号-->
<name>${docker.registry}/${docker.namespace}/${project.artifactId}:${project.version}</name>
<build>
<tags>
<tag>${project.version}</tag>
</tags>
<!-- 指定dockerfile文件的位置-->
<dockerFile>${project.basedir}/Dockerfile</dockerFile>
</build>
</image>
</images>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skip>false</skip>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<configuration>
<skip>false</skip>
<destFile>${project.build.directory}/coverage-reports/jacoco-unit.exec</destFile>
<dataFile>${project.build.directory}/coverage-reports/jacoco-unit.exec</dataFile>
</configuration>
<executions>
<execution>
<id>pre-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>post-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>${asciidoctor-maven-plugin.version}</version>
<executions>
<execution>
<id>generate-html-documentation</id>
<phase>prepare-package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>spring-html</backend>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.spring.asciidoctor.backends</groupId>
<artifactId>spring-asciidoctor-backends</artifactId>
<version>${spring-asciidoctor-backends.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
<!-- profile对资源的操作 -->
<resources>
<!-- 打包的时候先去掉所有的配置文件 -->
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>application*.yml</exclude>
<exclude>bootstrap*.yml</exclude>
<exclude>log4j2*.xml</exclude>
<exclude>*.json</exclude>
<exclude>*.properties</exclude>
</excludes>
</resource>
<!-- 添加需要包含的文件 -->
<resource>
<directory>src/main/resources</directory>
<!-- 是否替换yml或者properties里@xx@表示的maven properties属性值 -->
<filtering>true</filtering>
<!-- 在打包的时候,根据-P参数,加上需要的yml配置文件 -->
<includes>
<include>application.yml</include>
<include>application-${PROFILE-ACTIVE}.yml</include>
<include>bootstrap.yml</include>
<include>bootstrap-${PROFILE-ACTIVE}.yml</include>
<include>log4j2.xml</include>
<include>log4j2-${PROFILE-ACTIVE}.xml</include>
<include>init_router.json</include>
<include>log4j2.component.properties</include>
</includes>
</resource>
</resources>
</build>
</project>