<?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>com.apzda.cloud</groupId>
    <artifactId>apzda-bom</artifactId>
    <version>1.0.5</version>
    <packaging>pom</packaging>
    <name>Apzda Bom</name>
    <description>
        Apzda Official Modules Bom.
    </description>
    <url>https://www.apzda.com/apzda-bom</url>
    <properties>
        <java.version>17</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.release>${java.version}</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven-gpg-plugin.version>3.2.3</maven-gpg-plugin.version>
        <!-- apzda official modules -->
        <apzda.audit.version>1.0.4</apzda.audit.version>
        <apzda.captcha.version>1.0.7</apzda.captcha.version>
        <apzda.config.version>1.0.10</apzda.config.version>
        <apzda.oss.version>1.0.8</apzda.oss.version>
        <apzda.sms.version>1.0.7</apzda.sms.version>
        <apzda.messenger.version>1.0.0</apzda.messenger.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.apzda.cloud</groupId>
                <artifactId>config</artifactId>
                <version>${apzda.config.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <artifactId>oss</artifactId>
                <groupId>com.apzda.cloud</groupId>
                <type>pom</type>
                <scope>import</scope>
                <version>${apzda.oss.version}</version>
            </dependency>
            <dependency>
                <artifactId>captcha</artifactId>
                <groupId>com.apzda.cloud</groupId>
                <type>pom</type>
                <scope>import</scope>
                <version>${apzda.captcha.version}</version>
            </dependency>
            <dependency>
                <artifactId>sms</artifactId>
                <groupId>com.apzda.cloud</groupId>
                <type>pom</type>
                <scope>import</scope>
                <version>${apzda.sms.version}</version>
            </dependency>
            <dependency>
                <artifactId>audit</artifactId>
                <groupId>com.apzda.cloud</groupId>
                <type>pom</type>
                <scope>import</scope>
                <version>${apzda.audit.version}</version>
            </dependency>
            <dependency>
                <groupId>com.apzda.cloud</groupId>
                <artifactId>messenger</artifactId>
                <version>${apzda.messenger.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <issueManagement>
        <system>Github Issue</system>
        <url>https://github.com/apzda/apzda-bom/issues</url>
    </issueManagement>

    <ciManagement>
        <system>Github Actions</system>
        <url>https://github.com/apzda/apzda-bom/actions</url>
    </ciManagement>

    <licenses>
        <license>
            <name>GPLv3</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Ning Guangfeng</name>
            <email>windywany@gmail.com</email>
            <roles>
                <role>Maintainer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/apzda/apzda-bom.git</url>
        <connection>scm:git@github.com:apzda/apzda-bom.git</connection>
        <developerConnection>scm:git:git@github.com:apzda/apzda-bom.git</developerConnection>
        <tag>v1.0.5</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>

        <site>
            <id>apzda-bom</id>
            <name>Apzda Project's Bom</name>
            <url>https://docs.apzda.com/apzda-bom</url>
        </site>
    </distributionManagement>

    <build>
        <pluginManagement>
            <plugins>
                <!-- maven-release-plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <preparationGoals>clean verify</preparationGoals>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <tagNameFormat>v@{project.version}</tagNameFormat>
                        <generateReleasePoms>false</generateReleasePoms>
                        <releaseProfiles>release</releaseProfiles>
                        <arguments>-Dmaven.site.skip=true</arguments>
                        <goals>install</goals>
                    </configuration>
                </plugin>
                <!-- 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>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- maven-javadoc-plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.6.3</version>
                    <configuration>
                        <defaultAuthor>lazybones</defaultAuthor>
                        <charset>${project.build.sourceEncoding}</charset>
                        <additionalJOption>-Xdoclint:none</additionalJOption>
                        <additionalOptions>
                            <option>-Xmaxwarns 3</option>
                            <option>-Xmaxerrs 3</option>
                        </additionalOptions>
                        <quiet>true</quiet>
                        <nohelp>true</nohelp>
                        <tags>
                            <tag>
                                <name>Version</name>
                                <placement>a</placement>
                                <head>版本:</head>
                            </tag>
                            <tag>
                                <name>Author</name>
                                <placement>a</placement>
                                <head>作者:</head>
                            </tag>
                            <tag>
                                <name>Description</name>
                                <placement>a</placement>
                                <head>功能描述:</head>
                            </tag>
                            <tag>
                                <name>description</name>
                                <placement>a</placement>
                                <head>功能描述:</head>
                            </tag>
                            <tag>
                                <name>Date</name>
                                <placement>a</placement>
                                <head>文件创建日期:</head>
                            </tag>
                            <tag>
                                <name>date</name>
                                <placement>a</placement>
                                <head>文件创建日期:</head>
                            </tag>
                        </tags>
                    </configuration>
                </plugin>
                <!-- maven-project-info-reports-plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
                <!-- maven-gpg-plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                            <configuration>
                                <gpgArguments>
                                    <arg>--pinentry-mode</arg>
                                    <arg>loopback</arg>
                                    <arg>--no-tty</arg>
                                </gpgArguments>
                                <passphraseEnvName>GPG_SECURITY_PWD</passphraseEnvName>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <!-- nexus-staging-maven-plugin -->
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.13</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
            <repositories>
                <repository>
                    <id>ossrh</id>
                    <name>OSS Repository Host</name>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                    <layout>default</layout>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                        <updatePolicy>interval:15</updatePolicy>
                        <checksumPolicy>fail</checksumPolicy>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>
</project>