<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.gitee.fenghlkevin</groupId>
        <artifactId>april-storage</artifactId>
        <version>1.0.4</version>
    </parent>

    <artifactId>april-storage-webapps</artifactId>
    <name>april-storage-webapps</name>
    <description>storage web module</description>
    <url>https://gitee.com/fenghlkevin/april-storage</url>

    <properties>
        <maven.deploy.skip>true</maven.deploy.skip>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-undertow</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.gitee.fenghlkevin</groupId>
            <artifactId>april-storage-api</artifactId>
        </dependency>

        <dependency>
            <groupId>io.gitee.fenghlkevin</groupId>
            <artifactId>april-storage-core</artifactId>
        </dependency>

        <dependency>
            <groupId>io.gitee.fenghlkevin</groupId>
            <artifactId>april-storage-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>io.gitee.fenghlkevin</groupId>
            <artifactId>april-storage-dao</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>

        <dependency>
            <groupId>org.dromara.x-file-storage</groupId>
            <artifactId>x-file-storage-spring</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
        </dependency>
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>com.alibaba.fastjson2</groupId>
            <artifactId>fastjson2</artifactId>
        </dependency>

        <dependency>
            <groupId>io.gitee.fenghlkevin</groupId>
            <artifactId>april-common</artifactId>
        </dependency>

        <dependency>
            <groupId>io.minio</groupId>
            <artifactId>minio</artifactId>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <classesDirectory>${project.build.outputDirectory}</classesDirectory>
                    <testClassesDirectory>${project.build.testOutputDirectory}</testClassesDirectory>
                    <excludes>
                        <exclude>static/**</exclude>
                        <exclude>templates/**</exclude>
                        <exclude>*.*</exclude>
                        <exclude>mapper/**</exclude>
                        <exclude>i18n/**</exclude>
                        <exclude>lib/**</exclude>
                        <exclude>templates/**</exclude>
                    </excludes>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                            <useUniqueVersions>false</useUniqueVersions>
                            <mainClass>io.gitee.fenghlkevin.storage.SpringFileStorageApplication</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Class-Path>config/</Class-Path>
                        </manifestEntries>
                    </archive>
                    <outputDirectory>${project.build.directory}</outputDirectory>
                    <finalName>${project.artifactId}-${project.version}_${maven.build.timestamp}</finalName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                    <includes>
                                        <include>*.*</include>
                                        <include>static/**</include>
                                        <include>templates/**</include>
                                        <include>mapper/**</include>
                                        <include>i18n/**</include>
                                        <include>templates/**</include>
                                    </includes>
                                </resource>
                            </resources>
                            <outputDirectory>${project.build.directory}/config</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/package.xml</descriptor>
                    </descriptors>
                    <finalName>${artifactId}</finalName>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat>
                    <verbose>false</verbose>
                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
                    <skipPoms>false</skipPoms>
                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
                    <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
                    </generateGitPropertiesFilename>
                    <failOnNoGitDirectory>false</failOnNoGitDirectory>
                    <excludeProperties>
                        <excludeProperty>^git.build.(host|user.email|version)$</excludeProperty>
                        <excludeProperty>git.commit.user.email</excludeProperty>
                        <excludeProperty>git.total.commit.count</excludeProperty>
                        <excludeProperty>git.commit.id</excludeProperty>
                        <excludeProperty>git.commit.id.describe-short</excludeProperty>
                        <excludeProperty>git.commit.message.short</excludeProperty>
                        <excludeProperty>git.local.branch.ahead</excludeProperty>
                        <excludeProperty>git.local.branch.behind</excludeProperty>
                    </excludeProperties>
                    <gitDescribe>
                        <skip>false</skip>
                        <always>false</always>
                        <abbrev>7</abbrev>
                        <dirty>-dirty</dirty>
                        <forceLongFormat>false</forceLongFormat>
                    </gitDescribe>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
