pom.xml 17.1 KB
Newer Older
勤为径苦作舟's avatar
勤为径苦作舟 已提交
1
<?xml version="1.0" encoding="UTF-8"?>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
2
<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">
勤为径苦作舟's avatar
勤为径苦作舟 已提交
3 4
  <modelVersion>4.0.0</modelVersion>

5
  <groupId>top.csaf</groupId>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
6
  <artifactId>ZUtil</artifactId>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
7
  <version>1.11.1</version>
8

9 10 11 12 13 14 15 16 17 18 19
  <name>ZUtil</name>
  <url>https://github.com/duanluan/ZUtil</url>
  <description>Java Util</description>
  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <!-- Software Configuration Management -->
20 21 22 23 24 25
  <scm>
    <url>https://github.com/duanluan/ZUtil</url>
    <connection>scm:git:https://github.com/duanluan/ZUtil.git</connection>
    <developerConnection>scm:git:https://github.com/duanluan/ZUtil.git</developerConnection>
  </scm>

26
  <!-- 开发者信息 -->
27 28 29 30
  <developers>
    <developer>
      <name>duanluan</name>
      <email>duanluan@outlook.com</email>
31
      <organization>计算机科学与艺术基金会(CSAF)</organization>
32
      <organizationUrl>https://github.com/csa-f</organizationUrl>
33
      <timezone>+8</timezone>
34 35
    </developer>
  </developers>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
36 37

  <properties>
38 39
    <java.version>1.8</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
40 41 42 43 44 45
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
46
      <version>1.18.22</version>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
47 48 49 50 51
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
52
      <version>1.7.36</version>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
53
    </dependency>
54 55 56
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
57
      <version>1.7.36</version>
58 59
    </dependency>

勤为径苦作舟's avatar
勤为径苦作舟 已提交
60 61 62 63 64 65 66 67
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.12.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
68
      <version>1.10.0</version>
69 70 71 72 73 74
      <exclusions>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-lang3</artifactId>
        </exclusion>
      </exclusions>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
75 76 77 78 79 80
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-collections4</artifactId>
      <version>4.4</version>
    </dependency>
81 82 83 84 85
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.11.0</version>
    </dependency>
86 87 88 89 90
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.9.4</version>
    </dependency>
91 92 93
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
94
      <version>5.3.21</version>
95
    </dependency>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
96 97 98 99 100 101 102 103 104
    <!-- 加密算法 -->
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcprov-jdk15on</artifactId>
      <version>1.70</version>
    </dependency>
    <!-- HTTP、WebSocket、Stomp 请求 -->
    <dependency>
      <groupId>com.ejlchina</groupId>
105
      <artifactId>okhttps-jackson</artifactId>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
106
      <version>3.5.3</version>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
107 108 109 110 111 112
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.13.2</version>
    </dependency>
113
    <dependency>
114 115 116
      <groupId>com.alibaba.fastjson2</groupId>
      <artifactId>fastjson2</artifactId>
      <version>2.0.4</version>
117
    </dependency>
118
    <dependency>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
119 120 121
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.9.0</version>
122
    </dependency>
123 124 125 126 127 128
    <!-- XML -->
    <dependency>
      <groupId>org.dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <version>2.1.3</version>
    </dependency>
129 130 131 132
    <!-- YAML -->
    <dependency>
      <groupId>org.yaml</groupId>
      <artifactId>snakeyaml</artifactId>
133 134 135 136 137 138 139 140 141 142 143 144
      <version>2.0</version>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>1.4.6</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.4.6</version>
145
    </dependency>
146

147

148
    <!-- JUnit:https://junit.org/junit5/docs/current/api/index.html -->
勤为径苦作舟's avatar
勤为径苦作舟 已提交
149 150
    <dependency>
      <groupId>org.junit.jupiter</groupId>
151
      <artifactId>junit-jupiter</artifactId>
152
      <version>5.8.2</version>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
153 154
      <scope>test</scope>
    </dependency>
155 156 157 158 159 160 161 162 163 164 165 166 167 168
    <!-- JUnit 测试套件 -->
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-suite</artifactId>
      <version>1.8.2</version>
      <scope>test</scope>
    </dependency>
    <!-- Spring Test,此处主要用于调用 private 方法用于覆盖率测试 -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>5.3.19</version>
      <scope>test</scope>
    </dependency>
169 170 171 172 173 174 175 176 177 178 179 180 181
    <!-- JMH -->
    <dependency>
      <groupId>org.openjdk.jmh</groupId>
      <artifactId>jmh-core</artifactId>
      <version>1.34</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.openjdk.jmh</groupId>
      <artifactId>jmh-generator-annprocess</artifactId>
      <version>1.34</version>
      <scope>test</scope>
    </dependency>
182

W
wangjiyang 已提交
183
    <dependency>
184 185
      <groupId>cn.hutool</groupId>
      <artifactId>hutool-all</artifactId>
186
      <version>5.8.11</version>
187
      <scope>test</scope>
188 189 190 191 192 193
    </dependency>
    <dependency>
      <groupId>io.github.biezhi</groupId>
      <artifactId>TinyPinyin</artifactId>
      <version>2.0.3.RELEASE</version>
      <scope>test</scope>
W
wangjiyang 已提交
194
    </dependency>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
195 196 197
    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
198
      <version>1.15.3</version>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
199 200
      <scope>test</scope>
    </dependency>
201 202 203 204 205 206
    <!--<dependency>-->
    <!--  <groupId>com.google.guava</groupId>-->
    <!--  <artifactId>guava</artifactId>-->
    <!--  <version>31.1-jre</version>-->
    <!--  <scope>test</scope>-->
    <!--</dependency>-->
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
    <dependency>
      <groupId>com.esotericsoftware</groupId>
      <artifactId>kryo</artifactId>
      <version>5.5.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.wicketstuff</groupId>
      <artifactId>wicketstuff-serializer-fast2</artifactId>
      <version>9.13.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.caucho</groupId>
      <artifactId>hessian</artifactId>
      <version>4.0.66</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.protostuff</groupId>
      <artifactId>protostuff-core</artifactId>
      <version>1.8.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.protostuff</groupId>
      <artifactId>protostuff-runtime</artifactId>
      <version>1.8.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.dyuproject.protostuff</groupId>
      <artifactId>protostuff-core</artifactId>
      <version>1.3.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.dyuproject.protostuff</groupId>
      <artifactId>protostuff-runtime</artifactId>
      <version>1.3.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.objenesis</groupId>
      <artifactId>objenesis</artifactId>
      <version>3.3</version>
      <scope>test</scope>
    </dependency>
勤为径苦作舟's avatar
勤为径苦作舟 已提交
255 256
  </dependencies>

257
  <build>
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
    <pluginManagement>
      <plugins>
        <!-- Apache Maven Compiler Plugin:配置 compiler:compile、compiler:testCompile https://maven.apache.org/plugins/maven-compiler-plugin/index.html -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.10.1</version>
          <!-- compiler:compile https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html -->
          <configuration>
            <!-- Setting the -source and -target of the Java Compiler https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html -->
            <!-- Java 编译器的 -source 参数 https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#source -->
            <source>${java.version}</source>
            <!-- Java 编译器的 -target 参数 https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#target -->
            <target>${java.version}</target>
            <!-- 显示编译警告 https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#showWarnings -->
            <showWarnings>true</showWarnings>
          </configuration>
        </plugin>
        <!-- Apache Maven Surefire Plugin:配置 test 生命周期阶段 https://maven.apache.org/surefire/maven-surefire-plugin/ -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
          <!-- surefire:test https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html -->
          <configuration>
            <!-- 忽略测试失败 https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#testFailureIgnore -->
            <testFailureIgnore>true</testFailureIgnore>
            <!-- 需排除的测试 https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#excludes -->
            <excludes>
              <!-- JMH 性能测试 -->
              <exclude>**/jmh/**</exclude>
            </excludes>
            <argLine>${jacocoArgLine}</argLine>
          </configuration>
        </plugin>

        <!-- Javadoc and Sources Attachments - The Central Repository Documentation https://central.sonatype.org/publish/publish-maven/#javadoc-and-sources-attachments -->
        <!-- Apache Maven Source Plugin:创建源码 jar https://maven.apache.org/plugins/maven-source-plugin/ -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.1</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <!-- 默认生命周期阶段为 package。其他插件绑定到它的生命周期阶段时,用 jar 会重复打包,jar-no-fork 可以避免 https://stackoverflow.com/a/10568004 -->
                <!-- https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html -->
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- Maven Javadoc Plugin:生成 Javadoc https://maven.apache.org/plugins/maven-javadoc-plugin/ -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.4.1</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <!-- 默认生命周期阶段为 package。用于创建 Javadoc jar https://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html -->
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <!-- GPG Signed Components - The Central Repository Documentation https://central.sonatype.org/publish/publish-maven/#gpg-signed-components -->
        <!-- Apache Maven GPG Plugin:使用 GPG 对项目 Artifacts(发行版文件)进行签名 https://maven.apache.org/plugins/maven-gpg-plugin/ -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
332
          <version>1.6</version>
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
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <goals>
                <!-- 签名项目 Artifact、POM、附加 artifacts(源码、Javadoc、本地 jar 等) https://maven.apache.org/plugins/maven-gpg-plugin/sign-mojo.html -->
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- Nexus Staging Maven Plugin for Deployment and Release - The Central Repository Documentation https://central.sonatype.org/publish/publish-maven/#nexus-staging-maven-plugin-for-deployment-and-release -->
        <!-- Nexus Staging Maven Plugin:Nexus 流程 https://github.com/sonatype/nexus-maven-plugins/tree/main/staging/maven-plugin -->
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.13</version>
          <extensions>true</extensions>
          <configuration>
            <!-- Maven setting.xml 中 <server> 的 ID,用于获取身份验证信息 https://github.com/sonatype/nexus-maven-plugins/tree/main/staging/maven-plugin#configuring-the-plugin -->
            <serverId>ossrh</serverId>
            <!-- 目标 Nexus URL -->
            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
            <!-- deploy、close、rc-close 执行成功后自动 release -->
            <autoReleaseAfterClose>true</autoReleaseAfterClose>
          </configuration>
        </plugin>

        <!--
          JaCoCo https://www.eclemma.org/jacoco/trunk/doc/maven.html
          如果想在覆盖率报告中显示行号,或者突出显示源代码,必须 debug 编译
          使用 maven-surefire-plugin 或 maven-fails-plugin 时,不能将 forkCount 设置为 0 或将 forkMode 设置为 never,因为这将阻止运行测试的 -javaagent 参数,导致无法记录覆盖率
        -->
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.8</version>
          <configuration>
            <!-- 指定包含 JaCoCo 代理的属性名 https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html#propertyName -->
            <!-- 使用 maven-surefire-plugin 时会覆盖 VM 参数,所以需要取名并配置到 maven-surefire-plugin 的 argLine 中 -->
            <propertyName>jacocoArgLine</propertyName>
          </configuration>
          <executions>
            <execution>
              <id>jacoco-initialize</id>
              <goals>
                <!-- 默认生命周期阶段为 initialize。此代理通过 VM 参数传递给测试程序,在执行阶段收集覆盖率信息,在结束时写入文件。https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html -->
                <goal>prepare-agent</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

387 388 389 390 391 392
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
393 394
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
395 396 397 398 399 400 401 402 403 404 405
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>

      <plugin>
406 407
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
408 409 410
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
411
        <artifactId>maven-gpg-plugin</artifactId>
412
      </plugin>
413 414 415 416 417

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
      </plugin>
418 419 420
    </plugins>
  </build>

421
  <!-- id 和 settings.xml 中设置用户名、密码的保持一致 -->
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>huaweicloud</id>
      <url>https://repo.huaweicloud.com/repository/maven/</url>
    </repository>
    <repository>
      <id>aliyunmaven</id>
      <url>https://maven.aliyun.com/repository/public</url>
    </repository>
442 443 444 445 446
    <repository>
      <id>maven_central</id>
      <name>Maven Central</name>
      <url>https://repo.maven.apache.org/maven2/</url>
    </repository>
447 448 449 450 451
    <!-- jitpack -->
    <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
    </repository>
452
  </repositories>
453 454 455 456 457 458 459 460 461 462 463 464 465 466
  <pluginRepositories>
    <pluginRepository>
      <id>huaweicloud</id>
      <url>https://repo.huaweicloud.com/repository/maven/</url>
    </pluginRepository>
    <pluginRepository>
      <id>aliyunmaven</id>
      <url>https://maven.aliyun.com/repository/public</url>
    </pluginRepository>
    <pluginRepository>
      <id>maven_central</id>
      <url>https://repo.maven.apache.org/maven2/</url>
    </pluginRepository>
  </pluginRepositories>
467
</project>