<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://maven.apache.org/POM/4.0.0"
    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>cc.csln.so</groupId>
    <artifactId>c-delay-queue</artifactId>
    <version>1.0.0</version>

    <name>Delay Queue</name>
    <description>Delay Queue</description>
    <url>https://gitee.com/cusalt/c-delay-queue</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <lombok.version>1.18.36</lombok.version>
        <jakarta.annotation-api.version>3.0.0</jakarta.annotation-api.version>
        <spring-boot-dependencies.version>3.5.6</spring-boot-dependencies.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!--
            https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies -->
            <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.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- 依赖声明 -->
    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
            <scope>compile</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/jakarta.annotation/jakarta.annotation-api -->
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <version>${jakarta.annotation-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <!-- SLF4J Simple for test logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- JUnit 5 for tests -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>public</id>
            <name>aliyun nexus</name>
            <url>https://maven.aliyun.com/repository/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>public</id>
            <name>aliyun nexus</name>
            <url>https://maven.aliyun.com/repository/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.2.2</version>
                <configuration>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                    <systemPropertyVariables>
                        <file.encoding>UTF-8</file.encoding>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <!-- Attach sources jar for repository deployment -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Attach javadoc jar for repository deployment -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.6.3</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Copy & rename POM and POM.asc into target -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>copy-pom</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <mkdir dir="${project.build.directory}" />
                                <copy file="${basedir}/pom.xml"
                                    tofile="${project.build.directory}/${project.artifactId}-${project.version}.pom"
                                    overwrite="true" />
                            </target>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-pom-asc</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <!-- If pom.xml.asc exists (from gpg-plugin), rename to
                                artifact-version.pom.asc -->
                                <copy todir="${project.build.directory}">
                                    <fileset dir="${basedir}">
                                        <include name="pom.xml.asc" />
                                    </fileset>
                                    <mapper type="glob" from="pom.xml.asc"
                                        to="${project.artifactId}-${project.version}.pom.asc" />
                                </copy>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Generate MD5/SHA1 checksums for artifacts and POM -->
            <plugin>
                <groupId>net.nicoulaj.maven.plugins</groupId>
                <artifactId>checksum-maven-plugin</artifactId>
                <version>1.11</version>
                <executions>
                    <execution>
                        <id>gen-artifact-checksums</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>artifacts</goal>
                        </goals>
                        <configuration>
                            <failOnError>false</failOnError>
                            <algorithms>
                                <algorithm>md5</algorithm>
                                <algorithm>sha1</algorithm>
                            </algorithms>
                        </configuration>
                    </execution>
                    <execution>
                        <id>gen-pom-checksums</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>files</goal>
                        </goals>
                        <configuration>
                            <failOnError>false</failOnError>
                            <fileSets>
                                <fileSet>
                                    <directory>${project.build.directory}</directory>
                                    <includes>
                                        <include>${project.artifactId}-${project.version}.pom</include>
                                        <include>${project.artifactId}-${project.version}.pom.asc</include>
                                    </includes>
                                </fileSet>
                            </fileSets>
                            <algorithms>
                                <algorithm>md5</algorithm>
                                <algorithm>sha1</algorithm>
                            </algorithms>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Assemble repository-style directory: artifactId/version/... -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <id>make-repo-dir</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <outputDirectory>${project.build.directory}/repository/cc/csln/so</outputDirectory>
                            <finalName>${project.artifactId}</finalName>
                            <descriptors>
                                <descriptor>src/assembly/repo.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.9.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- 许可证信息 -->
    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <!--   开发人员信息  -->
    <developers>
        <developer>
            <name>Cusalt</name>
            <organization>CSLN</organization>
            <email>cusalt@csln.cc</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://gitee.com/cusalt/c-delay-queue.git</connection>
        <developerConnection>scm:git:git@gitee.com:cusalt/c-delay-queue.git</developerConnection>
        <url>https://gitee.com/cusalt/c-delay-queue</url>
    </scm>

</project>