-
Notifications
You must be signed in to change notification settings - Fork 6
/
pom.xml
299 lines (272 loc) · 14.4 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
<?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">
<groupId>cn.itlym</groupId>
<artifactId>shoulder-framework</artifactId>
<version>0.8.1</version><!-- shoulder-version -->
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<!-- mvn versions:set -DnewVersion=1.0.1-RELEASE、mvn versions:commit、mvn versions:revert -->
<!-- 简介: 方便统一编译打包发布的模块,仅配置无代码 -->
<name>shoulder Build</name>
<description>Modules to centralize common resources and configuration for shoulder Maven builds.</description>
<url>https://github.com/ChinaLym/shoulder-framework</url>
<!-- 开源组织 -->
<organization>
<name>ChinaLym</name>
<url>https://github.com/ChinaLym</url>
</organization>
<!-- 模块 -->
<modules>
<!-- 依赖管理 -->
<module>shoulder-dependencies</module>
<!-- 各模块通用配置 -->
<module>shoulder-parent</module>
<!-- 基础模块 -->
<module>shoulder-build</module>
<!-- 骨架工程 -->
<module>shoulder-archetype-simple</module>
</modules>
<properties>
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
<versions-maven-plugin.version>2.7</versions-maven-plugin.version>
<license-maven-plugin.version>2.2.0</license-maven-plugin.version>
<clirr-maven-plugin.version>2.8</clirr-maven-plugin.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
<!--发布前检查编译测试无用依赖 mvn dependency:analyze-->
<!--发布前检查依赖是否有新版本 mvn dependency:analyze-->
<!-- 开发者 -->
<developers>
<developer>
<id>ChinaLym</id>
<name>cnlym</name>
<email>[email protected]</email>
<organization>shoulder.</organization>
<organizationUrl>coming soon</organizationUrl>
<roles>
<role>CAFE BABE</role>
</roles>
<timezone>+8</timezone>
</developer>
</developers>
<!-- 版本控制,供其他插件使用 -->
<scm>
<connection>scm:[email protected]:ChinaLym/shoulder-framework.git</connection>
<developerConnection>scm:[email protected]:ChinaLym/shoulder-framework.git</developerConnection>
<url>[email protected]:ChinaLym/shoulder-framework.git</url>
</scm>
<!--开源许可协议采用 Apache 2.0 协议-->
<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>
<!-- 阿里云仓库,国内会快很多 -->
<!--<repositories>
<repository>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<!– 阿里云仓库,国内会快很多 –>
<pluginRepositories>
<pluginRepository>
<id>aliyun-plugin</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>-->
<distributionManagement>
<repository>
<id>oss</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<id>oss</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<!--<profiles>
<profile>
<id>release</id>-->
<build>
<pluginManagement>
<plugins>
<!-- GPG 发布插件 【注意:发布时要改成 verify 才能在发布前执行签名】 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>deploy</phase><!-- ACTIVE_WITH_verify -->
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- 测试覆盖率统计工具 -->
<!-- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<format>html</format>
<encoding>utf-8</encoding>
<instrumentation>
</instrumentation>
</configuration>
</plugin>-->
<!-- maven 发布插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<!-- 检测依赖库的开源许可协议,遵守开源协议 mvn license:aggregate-add-third-party -->
<!--官网:http://www.mojohaus.org/license-maven-plugin/examples/example-thirdparty.html#Merge_licenses-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
<!--<executions>
<execution>
<phase>test</phase>
<goals>
<!– license-list 列出可用的 license –>
<!– add-third-party 检测单个项目中的 license –>
<!– aggregate-add-third-party 检测多模块项目的 license –>
<goal>aggregate-add-third-party</goal>
</goals>
</execution>
</executions>-->
<!-- 修改默认配置(可选) -->
<configuration>
<!-- 设置检测结果文件的存放目录 -->
<outputDirectory>${basedir}/target/generated-sources/license</outputDirectory>
<!-- 设置检测结果文件,默认是 txt 文件 -->
<thirdPartyFilename>LICENSE_THIRD_PARTY.csv</thirdPartyFilename>
<!-- 设置检测结果文件样式。默认 txt 不方便查看,csv 文件的样式可 Excel 中进行分析;模板为 FreeMarker -->
<fileTemplate>E:/files/code/git/shoulder/shoulder-framework/third-party-file.ftl</fileTemplate>
<!-- mvn 命令会下载 license 文件,国内经常会出现请求超时,默认超时时间是 5 秒,改为 10 秒 -->
<connectionRequestTimeout>10000</connectionRequestTimeout>
<connectTimeout>10000</connectTimeout>
<socketTimeout>10000</socketTimeout>
<!-- 有些依赖可能检测不到 license、或有误,或需要对某些模块的 license 自己指定,将该配置设置为 true -->
<!-- 默认配置在 ${basedir}/src/license/THIRD-PARTY.properties 文件中 -->
<useMissingFile>false</useMissingFile>
<!-- 跳过某些 groupId 的检测,如本项目的各个模块 -->
<excludedGroups>cn\.itlym</excludedGroups>
<!-- 由于不同依赖中使用的 license 名称不同,为便于分类管理,将同类合并。如将 Apache 系列的 license 都合并为 Apache -->
<licenseMerges>
<licenseMerge>Apache 2.0|ASL, version
2|http://www.apache.org/licenses/LICENSE-2.0.txt|http://asm.ow2.org/license.html|The
Apache License, Version 2.0|Apache License|Apache License Version 2|Apache License
Version 2.0|Apache Software License - Version 2.0|Apache 2.0 License|Apache License
2.0|ASL|Apache 2|Apache-2.0|the Apache License, ASL Version 2.0|The Apache Software
License, Version 2.0|Apache License, Version 2.0|Apache Public License 2.0
</licenseMerge>
<licenseMerge>BSD|The BSD 3-Clause License|The BSD License|Modified BSD License|New BSD
License|New BSD license|Two-clause BSD-style license|BSD licence|BSD New|The New BSD
License|BSD 3-Clause|BSD 3-clause
</licenseMerge>
<licenseMerge>MIT|MIT License|The MIT License</licenseMerge>
<licenseMerge>LGPL|LGPL, version 2.1|GNU Library or Lesser General Public License (LGPL)
V2.1|GNU Lesser General Public License (LGPL), Version 2.1|GNU Lesser General Public
License, Version 2.1|LGPL 2.1
</licenseMerge>
<licenseMerge>CDDL|CDDL+GPL|CDDL+GPL License|CDDL + GPLv2 with classpath exception|CDDL
License|CDDL 1.0|CDDL 1.1|COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version
1.0|Common Development and Distribution License (CDDL) v1.0
</licenseMerge>
<licenseMerge>EPL|Eclipse Public License - Version 1.0</licenseMerge>
<licenseMerge>GPL|GPL2 w/ CPE|GPLv2+CE|GNU General Public Library</licenseMerge>
<licenseMerge>MPL|MPL 1.1</licenseMerge>
<licenseMerge>Public Domain</licenseMerge>
<licenseMerge>Common Public License|Common Public License Version 1.0</licenseMerge>
<licenseMerge>CC0|CC0 1.0 Universal|Public Domain, per Creative Commons CC0</licenseMerge>
<licenseMerge>Unknown License|Unknown license</licenseMerge>
</licenseMerges>
<!-- failIfWarning 配合这两个属性使用 <includedLicenses> <excludedLicenses> -->
<!-- <includedLicenses> 表示白名单,license 一定要在这个列表中 -->
<!-- <excludedLicenses> 表示黑名单,这个列表中的 license 一定不能出现 -->
<!-- 设为 true。license 不在白名单中、或在黑名单中,将构建失败。结合这个功能,非常方便看出项目中是否有非法 license -->
<failIfWarning>true</failIfWarning>
</configuration>
</plugin>
<!-- dependency-mediator-maven-plugin 依赖冲突检查 -->
<!-- 接口兼容性检测,避免发布接口的与之前版本不兼容 clirr:check 检查上个版本 -->
<!-- 用来检查版本兼容性 https://www.mojohaus.org/clirr-maven-plugin/ 列出方法的参数类型和返回类型和类字段的删除 -->
<!--不支持JDK8以上的版本 clirr failed: Invalid byte tag in constant pool: 18-->
<!--<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
<version>${clirr-maven-plugin.version}</version>
</plugin>-->
<!-- 修改父模块的版本之后,进入父模块的pom所在路径执行mvn命令:mvn -N versions:update-child-modules,即可自动修改所有子模块中的版本号 -->
<!--<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions-maven-plugin.version}</version>
<configuration>
<generateBackupPoms>false</generateBackupPoms>
</configuration>
</plugin>-->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>oss</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<!--国内发布网络容易超时,设置长一点,1小时-->
<stagingProgressTimeoutMinutes>60</stagingProgressTimeoutMinutes>
<stagingDescription>preRelease</stagingDescription>
<!-- 目标仓库 -->
<!--<stagingRepositoryId>1078</stagingRepositoryId>-->
<!--<stagingDescription>preRelease</stagingDescription>-->
</configuration>
</plugin>
</plugins>
</build>
<!-- 发布仓库 -->
<!--<distributionManagement>
<snapshotRepository>
<id>nexus</id>
<url>http://mvn.itlym.cn/repository/maven-snapshots/</url>
</snapshotRepository>
<repository>
<id>nexus</id>
<url>http://mvn.itlym.cn/repository/maven-releases/</url>
</repository>
</distributionManagement>-->
<!--</profile>
</profiles>-->
</project>