<?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>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>cn.vorbote</groupId>
    <artifactId>vorbote-framework</artifactId>
    <version>2023.05.a00</version>
    <packaging>pom</packaging>
    <name>VorBotE :: Framework</name>
    <description>The root module for all opensource framework.</description>

    <modules>
        <module>vorbote-core</module>
        <module>vorbote-ical</module>
        <module>vorbote-simple-jwt</module>
        <module>vorbote-webdev</module>
        <module>vorbote-webdev-spring-boot-starter</module>
        <module>vorbote-webdev-spring-boot-autoconfigure</module>
        <module>vorbote-message-sender-api</module>
        <module>vorbote-message-sender-aliyun</module>
        <module>vorbote-message-sender-tencent</module>
        <module>vorbote-msgsender-spring-boot-autoconfigure</module>
        <module>vorbote-msgsender-spring-boot-starter</module>
    </modules>

    <developers>
        <developer>
            <name>Theodore Hills</name>
            <email>xinke.shao@outlook.com</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>The Apache Software License, Version2.0</name>
            <url>https://www.apache.org/licenses/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/zihluwang/vorbote-framework</url>
        <connection>git@github.com:zihluwang/vorbote-framework.git</connection>
        <developerConnection>https://github.com/zihluwang</developerConnection>
    </scm>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <spring.boot.version>3.0.6</spring.boot.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>

        <!--*********************-->
        <!--       logback       -->
        <!--*********************-->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>1.4.5</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.4.5</version>
        </dependency>

        <!--********************-->
        <!--        Lombok      -->
        <!--********************-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.24</version>
        </dependency>

        <!--********************-->
        <!--        Slf4j       -->
        <!--********************-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.36</version>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!-- In-Project Dependencies -->
            <dependency>
                <groupId>cn.vorbote</groupId>
                <artifactId>vorbote-core</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>cn.vorbote</groupId>
                <artifactId>vorbote-simple-jwt</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>cn.vorbote</groupId>
                <artifactId>vorbote-webdev</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>cn.vorbote</groupId>
                <artifactId>vorbote-message-sender-api</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>cn.vorbote</groupId>
                <artifactId>vorbote-message-sender-aliyun</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>cn.vorbote</groupId>
                <artifactId>vorbote-message-sender-tencent</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>cn.vorbote</groupId>
                <artifactId>vorbote-webdev-spring-boot-autoconfigure</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>cn.vorbote</groupId>
                <artifactId>vorbote-msgsender-spring-boot-autoconfigure</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- Third-Party Utility -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>com.auth0</groupId>
                <artifactId>java-jwt</artifactId>
                <version>3.19.2</version>
            </dependency>

            <dependency>
                <groupId>jakarta.servlet</groupId>
                <artifactId>jakarta.servlet-api</artifactId>
                <version>6.0.0</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.13.4.1</version>
            </dependency>

            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp</artifactId>
                <version>4.10.0</version>
            </dependency>

            <dependency>
                <groupId>jakarta.xml.bind</groupId>
                <artifactId>jakarta.xml.bind-api</artifactId>
                <version>4.0.0</version>
            </dependency>

            <!-- Spring -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-autoconfigure</artifactId>
                <version>${spring.boot.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-logging</artifactId>
                <version>${spring.boot.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-configuration-processor</artifactId>
                <version>${spring.boot.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <scope>test</scope>
                <version>${spring.boot.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Javadoc -->
                    <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>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>*.xml</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>snapshot</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>release</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>

        <!--
            If you are not going to deploy this jar file to maven central repo, you need add `-P snapshot` arguments in
            your command such as `mvn install -P snapshot`
         -->
        <profile>
            <id>snapshot</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <locale>en_GB</locale>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>*.xml</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>