<?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>cn.slibs</groupId>
    <artifactId>slibs-base</artifactId>
    <version>0.2.3</version>

    <packaging>jar</packaging>
    <name>A Java base library</name>
    <description>A Java base library</description>
    <url>https://github.com/super-libraries/slibs-base</url>

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

        <functional.version>0.6.0</functional.version>
        <falcon.version>0.6.0</falcon.version>

        <lombok.version>1.18.38</lombok.version>
        <swagger-v3.version>2.2.37</swagger-v3.version>
        <swagger-v2.version>1.6.16</swagger-v2.version>

        <jackson.version>2.19.2</jackson.version>
        <junit5.version>5.10.1</junit5.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.iofairy</groupId>
            <artifactId>functional</artifactId>
            <version>${functional.version}</version>
        </dependency>
        <dependency>
            <groupId>com.iofairy</groupId>
            <artifactId>falcon</artifactId>
            <version>${falcon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>

        <!--
        =============================
        ****** swagger注解依赖包 ******
        =============================
        -->
        <!--
        对于io.swagger.core.v3来说：
        其实swagger-annotations与swagger-annotations-jakarta没有任何区别（内部包与类完全一致），只是为了和io.swagger.core.v3中的其他组件命名保持一致而已。
        ======
        这里引用最新的带 -jakarta 标准的包。
        如果其他项目引用了 io.swagger.core.v3:swagger-annotations，最好排除掉一个，避免内部包名冲突。
        -->
        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-annotations-jakarta</artifactId>
            <version>${swagger-v3.version}</version>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
            <version>${swagger-v2.version}</version>
        </dependency>


        <!--
        ======================
        ****** 测试依赖包 ******
        ======================
        -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit5.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>slibs</name>
            <email>super_libraries@163.com</email>
        </developer>
    </developers>


    <scm>
        <url>https://github.com/super-libraries/slibs-base</url>
        <connection>scm:git:https://github.com/super-libraries/slibs-base.git</connection>
        <developerConnection>scm:git:git@github.com:super-libraries/slibs-base.git</developerConnection>
    </scm>


    <build>
        <plugins>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.8.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                </configuration>
            </plugin>

            <!-- compiler -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>        <!--3.8.1 更新于：2019-05-02 -->
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>

                    <compilerArgs>
                        <!-- 解决编译提示 “有关详细信息, 请使用 -Xlint:deprecation 重新编译” ，主要是检查哪些地方使用过时的API等-->
                        <arg>-Xlint:deprecation</arg>
                    </compilerArgs>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.5.2</version>            <!--2.5.2 更新于：Aug, 2014 -->
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>            <!--2.8.2 更新于：Aug, 2014 -->
            </plugin>
            <!-- Source -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.1.0</version>    <!--3.1.0版本：2019.05-->
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.1.0</version>    <!--3.1.0版本：2019.03-->
                <configuration>
                    <show>private</show>
                    <nohelp>true</nohelp>
                    <charset>${project.build.sourceEncoding}</charset>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <docencoding>${project.build.sourceEncoding}</docencoding>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- GPG -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>  <!--1.6版本：2015.01-->
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.2.3</version>
                <!--<version>2.22.2</version>-->
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <targetPath>/META-INF</targetPath>
            </resource>
        </resources>
    </build>


</project>