<?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>fun.fengwk.convention4j</groupId>
    <artifactId>convention4j-parent</artifactId>
    <version>1.2.1</version>
    <packaging>pom</packaging>

    <name>${project.artifactId}</name>
    <description>Convention For Java</description>
    <url>https://github.com/fengwk/convention4j</url>
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <scm>
        <url>git@github.com:fengwk/convention4j.git</url>
        <connection>scm:git:git@github.com:fengwk/convention4j.git</connection>
        <developerConnection>scm:git:git@github.com:fengwk/convention4j.git</developerConnection>
    </scm>
    <developers>
        <developer>
            <name>fengwk</name>
            <email>759543714@qq.com</email>
            <url>https://github.com/fengwk</url>
        </developer>
    </developers>

    <modules>
        <module>convention4j-api</module>
        <module>convention4j-common</module>
        <module>convention4j-ai</module>
        <module>convention4j-agent</module>
        <module>convention4j-tracer</module>
        <module>convention4j-tracer-reactor</module>
        <module>convention4j-spring-boot-starter-test</module>
        <module>convention4j-spring-boot-starter</module>
        <module>convention4j-spring-boot-starter-datasource-multi</module>
        <module>convention4j-spring-boot-starter-web</module>
        <module>convention4j-spring-boot-starter-webflux</module>
        <module>convention4j-oauth2</module>
        <module>convention4j-example</module>
        <module>convention4j-archetype</module>
        <module>convention4j-spring-cloud-starter</module>
        <module>convention4j-spring-cloud-starter-gateway</module>
        <module>convention4j-spring-boot-starter-xxljob</module>
        <module>convention4j-comfyui</module>
    </modules>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>utf-8</project.reporting.outputEncoding>
        <convention4j.version>1.2.1</convention4j.version>
        <springdoc-openapi-starter-webmvc-ui.version>2.8.13</springdoc-openapi-starter-webmvc-ui.version>
        <auto-mapper.version>0.0.48</auto-mapper.version>
        <spring-boot-dependencies.version>3.5.0</spring-boot-dependencies.version>
        <spring-cloud-dependencies.version>2025.0.0</spring-cloud-dependencies.version>
        <spring-cloud-alibaba-dependencies.version>2023.0.1.2</spring-cloud-alibaba-dependencies.version>
        <mybatis-spring-boot-starter.version>3.0.5</mybatis-spring-boot-starter.version>
        <spring-ai.version>1.1.2</spring-ai.version>
        <mysql-connector-java.version>5.1.49</mysql-connector-java.version>
        <resteasy-jaxrs.version>3.15.6.Final</resteasy-jaxrs.version>
        <jakarta.el.version>5.0.0-M1</jakarta.el.version>
        <jwt4j.version>0.0.4</jwt4j.version>
        <redisson.version>3.35.0</redisson.version>
        <embedded-redis.version>0.6</embedded-redis.version>
        <json-path.version>2.9.0</json-path.version>
        <ognl.version>3.4.7</ognl.version>
        <mapstruct.version>1.6.3</mapstruct.version>
        <auto-service.version>1.1.1</auto-service.version>
        <transmittable-thread-local.version>2.14.5</transmittable-thread-local.version>
        <bcprov-jdk18on.version>1.81</bcprov-jdk18on.version>
        <opentracing.version>0.33.0</opentracing.version>
        <groovy.version>4.0.22</groovy.version>
        <tika.version>3.2.1</tika.version>
        <rocketmq-client.version>5.0.7</rocketmq-client.version>
        <jtokkit.version>1.1.0</jtokkit.version>
        <maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-api</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-common</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-ai</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-agent</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-tracer</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-tracer-reactor</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-spring-boot-starter-test</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-spring-boot-starter</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-spring-boot-starter-datasource-multi</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-spring-boot-starter-web</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-spring-boot-starter-webflux</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-spring-cloud-starter</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-spring-cloud-starter-gateway</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-spring-boot-starter-xxljob</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-oauth2-share</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-oauth2-server</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-oauth2-infra</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-example</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.convention4j</groupId>
                <artifactId>convention4j-comfyui</artifactId>
                <version>${convention4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
                <version>${springdoc-openapi-starter-webmvc-ui.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.auto-mapper</groupId>
                <artifactId>auto-mapper-parent</artifactId>
                <version>${auto-mapper.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot-dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud-dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.alibaba.cloud</groupId>
                <artifactId>spring-cloud-alibaba-dependencies</artifactId>
                <version>${spring-cloud-alibaba-dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.ai</groupId>
                <artifactId>spring-ai-bom</artifactId>
                <version>${spring-ai.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.mybatis.spring.boot</groupId>
                <artifactId>mybatis-spring-boot-starter</artifactId>
                <version>${mybatis-spring-boot-starter.version}</version>
            </dependency>
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>${mysql-connector-java.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-jaxrs</artifactId>
                <version>${resteasy-jaxrs.version}</version>
                <exclusions>
                    <!-- 该库与spring-jcl冲突 -->
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>jakarta.el</artifactId>
                <version>${jakarta.el.version}</version>
            </dependency>
            <dependency>
                <groupId>fun.fengwk.jwt4j</groupId>
                <artifactId>jwt4j</artifactId>
                <version>${jwt4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.redisson</groupId>
                <artifactId>redisson</artifactId>
                <version>${redisson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.redisson</groupId>
                <artifactId>redisson-spring-data</artifactId>
                <version>${redisson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.redisson</groupId>
                <artifactId>redisson-spring-boot-starter</artifactId>
                <version>${redisson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.kstyrc</groupId>
                <artifactId>embedded-redis</artifactId>
                <version>${embedded-redis.version}</version>
            </dependency>
            <dependency>
                <groupId>com.jayway.jsonpath</groupId>
                <artifactId>json-path</artifactId>
                <version>${json-path.version}</version>
            </dependency>
            <dependency>
                <groupId>ognl</groupId>
                <artifactId>ognl</artifactId>
                <version>${ognl.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct</artifactId>
                <version>${mapstruct.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct-processor</artifactId>
                <version>${mapstruct.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.auto.service</groupId>
                <artifactId>auto-service</artifactId>
                <version>${auto-service.version}</version>
            </dependency>
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>transmittable-thread-local</artifactId>
                <version>${transmittable-thread-local.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>${bcprov-jdk18on.version}</version>
            </dependency>
            <dependency>
                <groupId>io.opentracing</groupId>
                <artifactId>opentracing-api</artifactId>
                <version>${opentracing.version}</version>
            </dependency>
            <dependency>
                <groupId>io.opentracing</groupId>
                <artifactId>opentracing-noop</artifactId>
                <version>${opentracing.version}</version>
            </dependency>
            <dependency>
                <groupId>io.opentracing</groupId>
                <artifactId>opentracing-util</artifactId>
                <version>${opentracing.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-bom</artifactId>
                <version>${tika.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.rocketmq</groupId>
                <artifactId>rocketmq-client-java</artifactId>
                <version>${rocketmq-client.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.rocketmq</groupId>
                <artifactId>rocketmq-client-apis</artifactId>
                <version>${rocketmq-client.version}</version>
<!--                <exclusions>-->
<!--                    <exclusion>-->
<!--                        <groupId>com.google.guava</groupId>-->
<!--                        <artifactId>guava</artifactId>-->
<!--                    </exclusion>-->
<!--                </exclusions>-->
            </dependency>
            <dependency>
                <groupId>com.knuddels</groupId>
                <artifactId>jtokkit</artifactId>
                <version>${jtokkit.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- 必须优先加载lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct-processor</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>fun.fengwk.auto-mapper</groupId>
            <artifactId>auto-mapper-processor</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.auto.service</groupId>
            <artifactId>auto-service</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- 携带参数名进行编译 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <!-- 显示指定surefire版本，防止低版本的maven工具使用低版本的surefire插件导致无法兼容junit5 -->
            <!-- https://stackoverflow.com/questions/49441049/junit-5-does-not-execute-method-annotated-with-beforeeach -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.7.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <centralSnapshotsUrl>https://central.sonatype.com/repository/maven-snapshots/</centralSnapshotsUrl>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.8.11</version>
                        <executions>
                            <execution>
                                <id>prepare-agent</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>central-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.1.2</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>2.7</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <!-- 忽略没有注释的javadoc -->
                                    <additionalparam>-Xdoclint:none</additionalparam>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
