-
Notifications
You must be signed in to change notification settings - Fork 7
/
pom.xml
280 lines (273 loc) · 11.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
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
<?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>com.tomato</groupId>
<artifactId>tomato-bom</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>tomato-bom/pom.xml</relativePath>
</parent>
<artifactId>tomato-platform</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>tomato-module</module>
<module>tomato-framework</module>
<module>tomato-book</module>
<module>tomato-gateway</module>
<module>tomato-example</module>
</modules>
<name>${project.artifactId}</name>
<!-- ${basedir} 项目根目录 -->
<!-- ${project.build.directory} 构建目录,默认target -->
<!-- ${project.build.outputDirectory} 构建过程输出目录,默认target/classes -->
<!-- ${project.build.finalName} 名称,默认${project.artifactId}-${revision} -->
<!-- ${project.packaging} 打包类型,默认jar -->
<!-- ${project.xxx} 当前pom文件的任意节点的内容 如project.artifactId -->
<properties>
<!-- Maven 相关配置 -->
<java.version>17</java.version> <!-- java 版本管理 -->
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <!-- 用于生成 Maven 项目报告的编码 -->
<!-- 主要用于 构建插件的配置,放在这里会造成和猪POM不一致的问题,TODO -->
<!-- spring boot 版本管理 -->
<spring.boot.version>3.3.1</spring.boot.version>
<!-- docker 相关配置 -->
<docker.plugin.version>0.32.0</docker.plugin.version>
<docker.host>http://xxx.xxx.x.xxxx:xxxx</docker.host>
<docker.registry>xxx.xxx.x.xxxx</docker.registry>
<docker.namespace>xxxxxx</docker.namespace>
<docker.username>username</docker.username>
<docker.password>password</docker.password>
</properties>
<dependencyManagement>
<dependencies>
</dependencies>
</dependencyManagement>
<build>
<!-- 构建后的最终文件名 -->
<finalName>${project.name}</finalName>
<resources>
<resource>
<!-- 配置了资源文件的处理,指定了资源文件的目录 -->
<directory>src/main/resources</directory>
<!-- 是否过滤资源文件,如果过滤,会将资源文件中的占位符替换为具体的值,如${project.version} -->
<filtering>true</filtering>
</resource>
</resources>
<!-- 子项目中通过显式的配置plugin和execution元素来使用插件。-->
<pluginManagement>
<plugins>
<!-- spring boot 默认插件 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- <configuration>-->
<!-- <!– 最终构建文件名 –>-->
<!-- <finalName>${project.build.finalName}</finalName>-->
<!-- <!– 开启分层jar的构建 –>-->
<!-- <layers>-->
<!-- <enabled>true</enabled>-->
<!-- </layers>-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <goals>-->
<!-- <!– 在package阶段执行repackage目标,解决jar中没有主清单属性 –>-->
<!-- <goal>repackage</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
</plugin>
<!-- Git信息记录插件 -->
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<configuration>
<skip>${skip.build.git.commit.info}</skip>
<!-- 检查的仓库根目录,${project.basedir}:项目根目录,即包含pom.xml文件的目录 -->
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<!-- 生成git属性文件,默认false:不生成 -->
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat>
<gitDescribe>
<skip>false</skip>
<always>false</always>
<dirty>-dirty</dirty>
</gitDescribe>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<!-- 默认构建插件 -->
<plugins>
<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>
<encoding>${project.build.sourceEncoding}</encoding>
<!-- 启用unchecked警告,这样在编译时就可以发现未进行泛型检查的地方 -->
<compilerArgument>-Xlint:unchecked</compilerArgument>
<!-- 是否显示编译警告信息 -->
<showWarnings>true</showWarnings>
<!-- 跳过测试 -->
<skip>true</skip>
<!-- 用于指定 Maven 构建过程中所需的注解处理器路径,以便在编译时自动调用这些处理器生成额外的代码。 -->
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>${mapstruct-plus.lombok.version}</version>
</path>
<path>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-processor</artifactId>
<version>${mybatis-flex.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<propertiesEncoding>${project.build.sourceEncoding}</propertiesEncoding>
</configuration>
</plugin>
<!-- spring 代码格式插件 ./mvnw spring-javaformat:apply 或 mvn spring-javaformat:apply -->
<!-- IDEA 插件: https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-intellij-idea-plugin -->
<plugin>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
<version>${spring.checkstyle.plugin}</version>
<executions>
<execution>
<phase>validate</phase>
<inherited>true</inherited>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<properties>
<!-- 环境标识,需要与配置文件的名称相对应 -->
<profiles.active>dev</profiles.active>
<nacos.username>nacos</nacos.username>
<nacos.password>nacos</nacos.password>
<!--代码构建控制-->
<!--跳过构建源代码包-->
<skip.build.source.package>false</skip.build.source.package>
<!--不copy代码包到docker构建目录-->
<skip.copy.docker.resource>false</skip.copy.docker.resource>
<!--不执行git commit 构建-->
<skip.build.git.commit.info>false</skip.build.git.commit.info>
</properties>
<activation>
<!--默认激活配置-->
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
<!-- maven 依赖的下载是从 repositories 中获取的 -->
<repositories>
<repository>
<id>ali-repository</id> <!-- 阿里远程仓库唯一标识符 -->
<url>https://maven.aliyun.com/repository/public/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>tencent-repository</id> <!-- 腾讯远程仓库唯一标识符 -->
<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>huawei-repository</id> <!-- 华为远程仓库唯一标识符 -->
<url>https://repo.huaweicloud.com/repository/maven/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<!-- 远程仓库唯一标识符 -->
<id>spring-milestones</id>
<!--描述 -->
<name>Spring Milestones</name>
<!--远程仓库url -->
<url>https://repo.spring.io/milestone</url>
<!-- 禁止从公共仓库下载snapshot构件 -->
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<!-- 禁止从公共仓库下载releases构件 -->
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<!-- mvn clean install site 命令能够成功处理 -->
<pluginRepositories>
<pluginRepository>
<id>aliyun-repository</id>
<url>https://maven.aliyun.com/repository/public/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>tencent-repository</id>
<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>huawei-repository</id>
<url>https://repo.huaweicloud.com/repository/maven/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</project>