simple-starter/simple-starter-dependencies/pom.xml
2026-11-24 20:45:25 +08:00

764 lines
34 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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>
<groupId>reliable.simple.starter</groupId>
<artifactId>simple-starter-dependencies</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>Simple Starter 依赖模块</description>
<!-- ==================== 发布元数据 ====================
Maven Central 强制要求以下四段;内部私服发布同样建议保留。
发布到 Maven Central 时,需将 url / scm 替换为可公网访问的真实地址。 -->
<url>https://git.xcynet.com/pangu/simple-starter</url>
<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>
<developers>
<developer>
<id>pangu</id>
<name>Simple Starter Team</name>
<email>dev@xcynet.com</email>
<organization>XCYNet</organization>
<organizationUrl>https://www.xcynet.com</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://git.xcynet.com/pangu/simple-starter.git</connection>
<developerConnection>scm:git:ssh://git@git.xcynet.com/pangu/simple-starter.git</developerConnection>
<url>https://git.xcynet.com/pangu/simple-starter</url>
<tag>HEAD</tag>
</scm>
<!-- ==================== 发布目标仓库(阿里云云效制品仓库) ====================
仓库名为 simple-starter,模式为 Hybrid(Release + Snapshot 同一仓库),
因此 repository 与 snapshotRepository 使用同一个 URL。
<id> 必须与 ~/.m2/settings.xml 中 <server> 的 id 逐字符一致,否则 deploy 报 401。
该 id 取自云效自动生成的 settings.xml,即本仓库的仓库 ID。 -->
<distributionManagement>
<repository>
<id>xcynet-simple-starter</id>
<name>Alyun Devops Maven Repository</name>
<url>https://packages.aliyun.com/6916925f9add35de197b8556/maven/repo-mtndz</url>
</repository>
<snapshotRepository>
<id>xcynet-simple-starter</id>
<name>Alyun Devops Maven Repository</name>
<url>https://packages.aliyun.com/6916925f9add35de197b8556/maven/repo-mtndz</url>
</snapshotRepository>
</distributionManagement>
<properties>
<!-- Project Version -->
<revision>2.7.1</revision>
<!-- Core Framework Versions -->
<spring-boot.version>4.1.2</spring-boot.version>
<spring-cloud.version>2025.1.4</spring-cloud.version>
<!-- Cache and Storage Versions -->
<redisson.version>4.8.0</redisson.version>
<jetcache.version>2.7.9</jetcache.version>
<caffeine.version>3.3.1</caffeine.version>
<!-- Security and Authentication Versions -->
<sa-token.version>1.46.0</sa-token.version>
<justauth.version>1.16.7</justauth.version>
<!-- Database and ORM Versions -->
<mybatis-plus.version>3.5.18.1</mybatis-plus.version>
<dynamic-datasource.version>4.6.0</dynamic-datasource.version>
<p6spy.version>3.9.1</p6spy.version>
<!-- ID Generator and Job Scheduler Versions -->
<cosid.version>4.1.1</cosid.version>
<simple-job.version>1.2.0</simple-job.version>
<!-- Messaging and Notification Versions -->
<sms4j.version>3.3.5</sms4j.version>
<aws-sdk.version>2.59.1</aws-sdk.version>
<aws-crt.version>0.50.0</aws-crt.version>
<!-- Captcha Versions -->
<aj-captcha.version>2.0.0</aj-captcha.version>
<easy-captcha.version>1.6.2</easy-captcha.version>
<!-- Excel Processing Versions -->
<fesod.version>2.0.2-incubating</fesod.version>
<poi.version>5.5.1</poi.version>
<!-- File Storage Versions -->
<thumbnails.version>0.4.21</thumbnails.version>
<!-- Validation and Response Processing Versions -->
<graceful-response.version>5.0.5-boot3</graceful-response.version>
<spel-validator.version>0.7.0</spel-validator.version>
<!-- API Documentation Versions -->
<nextdoc4j.version>1.4.1</nextdoc4j.version>
<springdoc.version>3.1.0</springdoc.version>
<!-- Compression Versions -->
<zip4j.version>2.11.6</zip4j.version>
<swagger.version>2.2.55</swagger.version>
<!-- gRPC and Service Discovery Versions -->
<jetcd.version>0.8.8</jetcd.version>
<opentelemetry.version>1.62.0</opentelemetry.version>
<!-- Service Governance Versions -->
<sentinel.version>1.8.10</sentinel.version>
<nimbus-jose-jwt.version>10.10</nimbus-jose-jwt.version>
<tink.version>1.24.0</tink.version>
<!-- HTTP Client and Utilities Versions -->
<okhttp.version>5.5.1</okhttp.version>
<okio.version>3.18.2</okio.version>
<ttl.version>2.14.5</ttl.version>
<ip2region.version>3.5.7</ip2region.version>
<hutool.version>5.8.48</hutool.version>
<nashorn.version>15.7</nashorn.version>
<!-- Security Vulnerability Fix Versions -->
<commons-beanutils.version>1.11.0</commons-beanutils.version>
<commons-io.version>2.22.0</commons-io.version>
<commons-compress.version>1.28.0</commons-compress.version>
<!-- Maven Plugin Versions -->
<flatten.version>1.8.0</flatten.version>
<spotless.version>3.9.0</spotless.version>
<sonar.version>5.7.0.6970</sonar.version>
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
<maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
<xml-maven-plugin.version>1.1.0</xml-maven-plugin.version>
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- Spring Boot(由 Pivotal 团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程)-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Spring Cloud(由 Pivotal 团队提供的微服务解决方案) -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Redisson(不仅仅是一个 Redis Java 客户端) -->
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
<version>${redisson.version}</version>
</dependency>
<!-- JetCache(基于 Java 的缓存系统封装,提供统一的 API 和注解来简化缓存的使用。提供了比 SpringCache 更加强大的注解,可以原生的支持 TTL、两级缓存、分布式自动刷新,还提供了 Cache 接口用于手工缓存操作) -->
<dependency>
<groupId>com.alicp.jetcache</groupId>
<artifactId>jetcache-bom</artifactId>
<version>${jetcache.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Sa-Token(轻量级 Java 权限认证框架,让鉴权变得简单、优雅) -->
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-bom</artifactId>
<version>${sa-token.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Just Auth(开箱即用的整合第三方登录的开源组件,脱离繁琐的第三方登录 SDK,让登录变得 So easy!) -->
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>${justauth.version}</version>
</dependency>
<!-- MyBatis Plus(MyBatis 的增强工具,在 MyBatis 的基础上只做增强不做改变,简化开发、提高效率) -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-bom</artifactId>
<version>${mybatis-plus.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Dynamic Datasource(基于 Spring Boot 的快速集成多数据源的启动器) -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot4-starter</artifactId>
<version>${dynamic-datasource.version}</version>
</dependency>
<!-- P6Spy(SQL 性能分析组件) -->
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
<version>${p6spy.version}</version>
</dependency>
<!-- CosId(通用、灵活、高性能的分布式 ID 生成器) -->
<dependency>
<groupId>me.ahoo.cosid</groupId>
<artifactId>cosid-bom</artifactId>
<version>${cosid.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- SnailJob(灵活,可靠和快速的分布式任务重试和分布式任务调度平台) -->
<dependency>
<groupId>xcynet.schedule</groupId>
<artifactId>simple-job-client-starter</artifactId>
<version>${simple-job.version}</version>
</dependency>
<dependency>
<groupId>xcynet.schedule</groupId>
<artifactId>simple-job-client-retry-core</artifactId>
<version>${simple-job.version}</version>
</dependency>
<dependency>
<groupId>xcynet.schedule</groupId>
<artifactId>simple-job-client-job-core</artifactId>
<version>${simple-job.version}</version>
</dependency>
<!-- SMS4J(短信聚合框架,轻松集成多家短信服务,解决接入多个短信 SDK 的繁琐流程) -->
<dependency>
<groupId>org.dromara.sms4j</groupId>
<artifactId>sms4j-spring-boot-starter</artifactId>
<version>${sms4j.version}</version>
</dependency>
<!-- Apache Fesod(原 FastExcel,基于 Java 的快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
<dependency>
<groupId>org.apache.fesod</groupId>
<artifactId>fesod-sheet</artifactId>
<version>${fesod.version}</version>
</dependency>
<!-- Apache POI(适用于 Microsoft 文档的 Java API) -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi.version}</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Amazon SDK v2(Amazon Simple Storage Service,亚马逊简单存储服务,通用存储协议 S3,兼容主流云厂商对象存储) -->
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>${aws-sdk.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- 使用 AWS 基于 CRT 的 S3 客户端 -->
<dependency>
<groupId>software.amazon.awssdk.crt</groupId>
<artifactId>aws-crt</artifactId>
<version>${aws-crt.version}</version>
</dependency>
<!-- Thumbnailator(缩略图生成库) -->
<dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
<version>${thumbnails.version}</version>
</dependency>
<!-- Graceful Response(一个Spring Boot技术栈下的优雅响应处理组件,可以帮助开发者完成响应数据封装、异常处理、错误码填充等过程,提高开发效率,提高代码质量) -->
<dependency>
<groupId>com.feiniaojin</groupId>
<artifactId>graceful-response</artifactId>
<version>${graceful-response.version}</version>
</dependency>
<!-- SpEL Validator(基于 SpEL 的 jakarta.validation-api 扩展增强包) -->
<dependency>
<groupId>cn.sticki</groupId>
<artifactId>spel-validator-jakarta</artifactId>
<version>${spel-validator.version}</version>
</dependency>
<!-- NextDoc4j (现代化 API 文档 UI 工具,全面替代 Swagger UI) -->
<dependency>
<groupId>top.nextdoc4j</groupId>
<artifactId>nextdoc4j-bom</artifactId>
<version>${nextdoc4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- SpringDoc(OpenAPI 3 集成框架) -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>${springdoc.version}</version>
</dependency>
<!-- Swagger 注解 -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations-jakarta</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- Tracing:TLog 已移除,链路追踪改用 Micrometer Tracing + OpenTelemetry(版本由 spring-boot-dependencies BOM 管理) -->
<!-- Zip4j (开源的 Java 处理 zip 压缩文件的开发包) -->
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>${zip4j.version}</version>
</dependency>
<!-- OkHTTP 5.x(Kotlin multiplatform,JVM 项目使用 okhttp-jvm artifact) -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-jvm</artifactId>
<version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<version>${okio.version}</version>
</dependency>
<!-- TTL(线程间传递 ThreadLocal,异步执行时上下文传递的解决方案) -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>${ttl.version}</version>
</dependency>
<!-- 第三方封装 Ip2region(离线 IP 数据管理框架和定位库,支持亿级别的数据段,10 微秒级别的查询性能,提供了许多主流编程语言的 xdb 数据管理引擎的实现) -->
<dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-ip2region</artifactId>
<version>${ip2region.version}</version>
</dependency>
<!-- Hutool(小而全的 Java 工具类库,通过静态方法封装,降低相关 API 的学习成本,提高工作效率,使 Java 拥有函数式语言般的优雅,让 Java 语言也可以“甜甜的”) -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-bom</artifactId>
<version>${hutool.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- JS 引擎(纯编译的 JavaScript 引擎) -->
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
<version>${nashorn.version}</version>
</dependency>
<!-- AJ-Captcha(行为验证码,包含滑动拼图、文字点选两种方式) -->
<dependency>
<groupId>com.anji-plus</groupId>
<artifactId>captcha</artifactId>
<version>${aj-captcha.version}</version>
</dependency>
<!-- Easy Captcha(图形验证码,支持 gif、中文、算术等类型) -->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>
<version>${easy-captcha.version}</version>
</dependency>
<!-- 解决部分传递依赖漏洞问题 -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${commons-beanutils.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${commons-compress.version}</version>
</dependency>
<!-- jetcd:etcd 官方 Java 客户端,支持 lease/keepalive/watch -->
<dependency>
<groupId>io.etcd</groupId>
<artifactId>jetcd-core</artifactId>
<version>${jetcd.version}</version>
</dependency>
<!-- OpenTelemetry SDK AutoConfig(gRPC 链路追踪) -->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
<version>${opentelemetry.version}</version>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk</artifactId>
<version>${opentelemetry.version}</version>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-extension-autoconfigure</artifactId>
<version>${opentelemetry.version}</version>
</dependency>
<!-- Sentinel 限流熔断 -->
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-core</artifactId>
<version>${sentinel.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-transport-common</artifactId>
<version>${sentinel.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-parameter-flow-control</artifactId>
<version>${sentinel.version}</version>
</dependency>
<!-- Ed25519 JWS token 签发/验签 -->
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>${nimbus-jose-jwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.crypto.tink</groupId>
<artifactId>tink</artifactId>
<version>${tink.version}</version>
</dependency>
<dependency>
<groupId>reliable.simple.starter</groupId>
<artifactId>simple-starter-bom</artifactId>
<version>${revision}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<!-- 统一版本号插件 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<!-- Create an effective POM (with versions expanded) for the CLI and documentation -->
<id>flatten-effective-pom</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
<configuration>
<updatePomFile>false</updatePomFile>
<outputDirectory>${project.build.directory}/effective-pom</outputDirectory>
<flattenedPomFilename>simple-starter-dependencies.xml</flattenedPomFilename>
<flattenMode>oss</flattenMode>
<pomElements>
<dependencyManagement>expand</dependencyManagement>
<pluginManagement>expand</pluginManagement>
<properties>remove</properties>
<repositories>remove</repositories>
</pomElements>
</configuration>
</execution>
<execution>
<!-- Flatten and simplify our own POM for install/deploy -->
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>bom</flattenMode>
<pomElements>
<parent>expand</parent>
<properties>keep</properties>
<pluginManagement>keep</pluginManagement>
<repositories>remove</repositories>
<!-- bom 模式默认删除 distributionManagement,会导致本 POM 自身无法 deploy -->
<distributionManagement>keep</distributionManagement>
</pomElements>
</configuration>
</execution>
<execution>
<id>flatten-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<!-- Cleanup the effective POM -->
<id>post-process-effective-pom</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${project.build.directory}/effective-pom</dir>
<outputDir>${project.build.directory}/effective-pom</outputDir>
<stylesheet>src/main/xslt/post-process-flattened-pom.xsl</stylesheet>
<outputProperties>
<outputProperty>
<name>indent</name>
<value>yes</value>
</outputProperty>
</outputProperties>
</transformationSet>
</transformationSets>
</configuration>
</execution>
<execution>
<!-- Cleanup the flattened project POM -->
<id>post-process-flattened-pom</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${project.basedir}</dir>
<outputDir>${project.basedir}</outputDir>
<includes>.flattened-pom.xml</includes>
<stylesheet>src/main/xslt/post-process-flattened-pom.xsl</stylesheet>
<outputProperties>
<outputProperty>
<name>indent</name>
<value>yes</value>
</outputProperty>
</outputProperties>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<!-- Attach effective POM -->
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/effective-pom/simple-starter-dependencies.xml
</file>
<type>effective-pom</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!-- Maven 编译器插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<!-- Maven 测试插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<!-- Maven 依赖分析插件(用于解析 byte-buddy-agent 路径,配置 Mockito Java Agent) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
</plugin>
<!-- XML 处理插件 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>${xml-maven-plugin.version}</version>
</plugin>
<!-- Build Helper 插件 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
</plugin>
<!-- 统一版本号插件 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${flatten.version}</version>
</plugin>
<!-- 代码格式化插件 -->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
</plugin>
<!-- Sonar 代码质量分析插件 -->
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<!-- 内部发布(云效私服):产出 sources/javadoc 包,便于同事在 IDE 中查看源码。
不签名、不发布到 Maven Central。使用方式:mvn -Prelease -Drevision=x.y.z deploy -->
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- 关闭 doclint 的 HTML/语法强校验:部分注释含未转义 <T> 或未闭合 <code>,
会生成 error 并导致该模块缺失 -javadoc.jar -->
<doclint>none</doclint>
<additionalJOption>-Xdoclint:none</additionalJOption>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- 发布到 Maven Central:需同时激活 -Prelease,central,并事先配置 GPG 密钥与 Sonatype Token。
单独使用 -Prelease 时不会触发本 profile,因此内部发布不受影响。 -->
<profile>
<id>central</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.4.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<tokenAuth>true</tokenAuth>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>