<?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.tannn.cat</groupId>
    <artifactId>tfiles</artifactId>
    <version>0.0.6</version>
    <packaging>pom</packaging>
    <name>tfiles</name>
    <description>文件上传下载</description>
    <url>https://gitee.com/tanoo/tfiles.git</url>

    <organization>
        <name>tan</name>
        <url>https://t.tannn.cn/</url>
    </organization>

    <!-- 开源许可证 -->
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>


    <!-- 开源地址 -->
    <scm>
        <!-- 发布分支 -->
        <tag>master</tag>
        <url>https://gitee.com/tanoo/tfiles.git</url>
        <connection>https://gitee.com/tanoo/tfiles.git</connection>
        <developerConnection>https://gitee.com/tanoo/tfiles.git</developerConnection>
    </scm>

    <!-- 开发者信息 -->
    <developers>
        <developer>
            <id>tanning</id>
            <name>tanning</name>
            <email>1445763190@qq.com</email>
            <organization>cn.tannn.cat</organization>
            <url>https://t.tannn.cn/</url>
            <roles>
                <role>author</role>
            </roles>
        </developer>
    </developers>

    <modules>
        <!-- 预备暴露的rpc接口-->
        <module>file-api</module>
        <!-- 文件业务服务 -->
        <module>file-server</module>
        <!-- sdk 同时供给 -->
        <module>file-sdk</module>
    </modules>



    <properties>
        <file.serve.version>${project.version}</file.serve.version>
        <!-- spring  -->
        <spring.boot.version>3.2.7</spring.boot.version>
        <spring-cloud-openfeign.version>4.1.3</spring-cloud-openfeign.version>

        <openfeign.version>13.2.1</openfeign.version>
        <servlet.api.version>6.1.0</servlet.api.version>
        <swagger.v3.version>2.2.22</swagger.v3.version>
        <lombok.version>1.18.28</lombok.version>
        <lang3.version>3.12.0</lang3.version>
        <minio.version>8.5.2</minio.version>
        <qiniu.version>7.9.5</qiniu.version>

        <!-- 编译 -->
        <java.version>17</java.version>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <flatten_maven.version>1.6.0</flatten_maven.version>
        <maven-lombok-plugin.version>1.18.20.0</maven-lombok-plugin.version>
    </properties>

    <!-- 配置pom ali镜像 -->
<!--    <repositories>-->
<!--        <repository>-->
<!--            <id>public</id>-->
<!--            <name>aliyun nexus</name>-->
<!--            <url>https://maven.aliyun.com/repository/public</url>-->
<!--            <releases>-->
<!--                <enabled>true</enabled>-->
<!--            </releases>-->
<!--        </repository>-->
<!--    </repositories>-->


    <build>
    <plugins>
        <!-- 编译的时候指定JDK和编码 ,-->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>${java.version}</source> <!-- 源代码使用的JDK版本 -->
                <target>${java.version}</target> <!-- 需要生成的目标class文件的编译版本 -->
                <encoding>${project.build.sourceEncoding}</encoding> <!-- 字符集编码 -->
                <showWarnings>true</showWarnings><!--设置为true以显示编译警告-->
            </configuration>
        </plugin>
        <!-- 将源码一并打包 -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.1.0</version>
            <inherited>true</inherited>
            <executions>
                <execution>
                    <id>attach-sources</id>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <excludeResources>true</excludeResources>
                <useDefaultExcludes>true</useDefaultExcludes>
            </configuration>
        </plugin>
        <!-- Javadoc -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.6.3</version>
            <inherited>true</inherited>
            <configuration>
                <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
                <reportOutputDirectory>${project.reporting.outputDirectory}/apidocs</reportOutputDirectory>
                <maxmemory>1024</maxmemory>
                <encoding>${project.build.sourceEncoding}</encoding>
                <charset>${project.build.sourceEncoding}</charset>
                <docencoding>${project.build.sourceEncoding}</docencoding>
                <show>protected</show>
                <notree>true</notree>
                <failOnError>false</failOnError>
                <doclint>none</doclint>
                <tags>
                    <tag>
                        <name>description</name>
                        <placement>a</placement>
                        <head>描述: </head>
                    </tag>
                    <tag>
                        <name>return</name>
                        <placement>a</placement>
                        <head>return: </head>
                    </tag>
                    <tag>
                        <name>ClassName</name>
                        <placement>a</placement>
                        <head>类名: </head>
                    </tag>
                    <tag>
                        <name>link</name>
                        <placement>a</placement>
                        <head>外链: </head>
                    </tag>
                    <tag>
                        <head>参数</head>
                        <name>param: </name>
                        <placement>a</placement>
                    </tag>
                    <tag>
                        <name>date</name>
                        <placement>a</placement>
                        <head>时间: </head>
                    </tag>
                    <tag>
                        <name>author</name>
                        <placement>a</placement>
                        <head>作者: </head>
                    </tag>
                </tags>
            </configuration>
            <executions>
                <execution>
                    <id>bundle-sources</id>
                    <phase>package</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
    </build>


    <!--定义项目的分发管理，会在执行 deploy 命令时使用-->
    <distributionManagement>
        <snapshotRepository>
            <id>snapshots</id>
            <url>https://nexus.tannn.cn/repository/maven-snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://repo1.maven.org/maven2</url>
        </repository>

    </distributionManagement>


    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- 中央仓库 https://central.sonatype.org/publish/publish-portal-maven/ -->
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.4.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <tokenAuth>true</tokenAuth>
                            <!-- 自动提交 ，不写就自己去web手动点击-->
                            <autoPublish>true</autoPublish>
                            <deploymentName>${project.artifactId}</deploymentName>
                            <!-- 不发布的模块 -->
                            <excludeArtifacts>
                                <excludeArtifact>file-api</excludeArtifact>
                                <excludeArtifact>file-server</excludeArtifact>
                            </excludeArtifacts>
                        </configuration>
                    </plugin>
                    <!-- gpg -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
