-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
235 lines (217 loc) · 11.1 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
<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>
<groupId>com.github.blankhang</groupId>
<artifactId>iptool</artifactId>
<version>1.1.0</version>
<packaging>pom</packaging>
<name>iptool</name>
<url>https://github.com/blankhang/iptool</url>
<description>ip locating agent tool</description>
<licenses>
<license>
<name>Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</name>
<url>https://creativecommons.org/licenses/by-sa/4.0/</url>
<distribution>repo</distribution>
<comments>Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</comments>
</license>
<license>
<name>GeoLite2 End User License Agreement</name>
<url>https://www.maxmind.com/en/geolite2/eula</url>
<distribution>repo</distribution>
<comments>GeoLite2 End User License Agreement</comments>
</license>
</licenses>
<scm>
<url>https://github.com/blankhang/iptool</url>
<connection>scm:git:https://github.com/blankhang/iptool.git</connection>
<developerConnection>scm:git:https://github.com/blankhang/iptool.git</developerConnection>
</scm>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<!-- <maven.deploy.skip>true</maven.deploy.skip>-->
</properties>
<developers>
<developer>
<name>blankhang</name>
<id>blankhang</id>
<email>blankhang@gmail.com</email>
<organizationUrl>https://blankhang.com</organizationUrl>
<roles>
<role>Developer</role>
</roles>
<timezone>+8</timezone>
</developer>
</developers>
<modules>
<module>common</module>
</modules>
<!-- 使用个人资料:由于生成javadoc和源jar以及使用GPG签署组件是一个相当耗时的过程,因此这些执行通常与正常的构建配置隔离并移动到配置文件中。然后,在通过激活配置文件执行部署时,将使用此配置文件。 -->
<profiles>
<!--release-->
<!--mvn clean deploy -P release -Dmaven.test.skip=true -->
<profile>
<id>release</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<!-- 将工程发布到 github release -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<!-- 这里的id必须要和 maven 配置文件[C:\Users\(username)\.m2\settings.xml] servers-server-id[oss.sonatype.org的账号密码对应的server-id] 一致 -->
<serverId>release</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<!-- 如果希望发布后自动执行close和release操作,此处可以调整为true -->
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<nonFilteredFileExtensions>
<!-- 排除过滤2进制文件扩展-->
<nonFilteredFileExtension>mmdb</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<!-- 要生成Javadoc和Source jar文件,您必须配置javadoc和源Maven插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<!-- <configuration>-->
<!-- <doclint>none</doclint>-->
<!-- </configuration>-->
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 必须配置GPG插件用于使用以下配置对组件进行签名 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 将工程发布到 github release -->
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<!-- 自动更新子版本号-->
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>@{project.version}</tagNameFormat>
<releaseProfiles>release</releaseProfiles>
<localCheckout>true</localCheckout>
<checkModificationExcludes>
<checkModificationExclude>.project</checkModificationExclude>
<checkModificationExclude>.classpath</checkModificationExclude>
</checkModificationExcludes>
</configuration>
</plugin>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-scm-publish-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<scmBranch>master</scmBranch>
</configuration>
</plugin>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-deploy-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-project-info-reports-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
<resources>
<!-- 解决烦人的MVN编译警告 -->
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>src/main/resources/GeoLite2-City.mmdb</exclude>
</excludes>
</resource>
</resources>
</build>
<!-- 【注】snapshotRepository 与 repository 中的 id 一定要与 setting.xml 中 server 的 id 保持一致! -->
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>release</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
<repositories>
<repository>
<!-- 这里的id必须要和maven 的setting.xml中的 <id>maven-releases</id> 一致 -->
<id>release</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<repository>
<id>snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
<!-- 4种频率类型。如果配置间隔时间更新,可以写作 interval:XX (XX是间隔分钟数)。daily配置是默认值。-->
<!-- A. always是每次都去远程仓库查看是否有更新,-->
<!-- B. daily是只在每天第一次的时候查看是否有更新,当天的其它时候则不会查看;-->
<!-- C .interval允许设置一个分钟为单位的间隔时间,在这个间隔时间内只会去远程仓库中查找一次;-->
<!-- D .never是不会去远程仓库中查找(这种就和正式版本的行为一样了)。-->
<updatePolicy>interval:5</updatePolicy>
</snapshots>
</repository>
</repositories>
</project>