<?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>club.javafamily</groupId>
    <artifactId>notification-manager-bom</artifactId>
    <version>2.3.2-beta.13</version>
    <packaging>pom</packaging>

    <name>${project.artifactId}</name>
    <description>Bom 版本管理</description>
    <url>https://github.com/JavaFamilyClub/notification-manager</url>

    <properties>
        <notification.manager.version>2.3.2-beta.13</notification.manager.version>
    </properties>

    <!-- 许可证信息 -->
    <licenses>
        <!-- Apache许可证 -->
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <!-- SCM信息 -> git在github上托管 -->
    <scm>
        <url>https://github.com/JavaFamilyClub/notification-manager/tree/main/notification-manager-bom</url>
        <connection>scm:git:git://github.com/JavaFamilyClub/notification-manager.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/JavaFamilyClub/notification-manager.git</developerConnection>
    </scm>

    <!-- 开发者信息 -->
    <developers>
        <developer>
            <name>JavaFamily</name>
            <email>javafamily.club@outlook.com</email>
            <organization>JavaFamily</organization>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>javafamily-central-snapshot</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>javafamily-central-release</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>javafamily-central-snapshot</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
                <updatePolicy>always</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>club.javafamily</groupId>
                <artifactId>feishu-notification-spring-boot-starter</artifactId>
                <version>${notification.manager.version}</version>
            </dependency>

            <dependency>
                <groupId>club.javafamily</groupId>
                <artifactId>dingtalk-notification-spring-boot-starter</artifactId>
                <version>${notification.manager.version}</version>
            </dependency>

            <dependency>
                <groupId>club.javafamily</groupId>
                <artifactId>ucloud-sms-notification-spring-boot-starter</artifactId>
                <version>${notification.manager.version}</version>
            </dependency>

            <dependency>
                <groupId>club.javafamily</groupId>
                <artifactId>tencent-sms-notification-spring-boot-starter</artifactId>
                <version>${notification.manager.version}</version>
            </dependency>

            <dependency>
                <groupId>club.javafamily</groupId>
                <artifactId>email-notification-spring-boot-starter</artifactId>
                <version>${notification.manager.version}</version>
            </dependency>

            <dependency>
                <groupId>club.javafamily</groupId>
                <artifactId>notification-manager-all</artifactId>
                <version>${notification.manager.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <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>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <source>${java.version}</source>
                    <additionalJOption>-Xdoclint:none</additionalJOption>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <!-- autoReleaseAfterClose的值为true，则脚本会自动完成在平台上close、release的操作，至此你将成功发布了 -->
                <extensions>true</extensions>
                <configuration>
                    <serverId>javafamily-central-release</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>

            <!--  必须配置GPG插件用于使用以下配置对组件进行签名 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
