<?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>club.gclmit</groupId>
        <artifactId>sabre-oss-parent</artifactId>
        <version>1.0.0</version>
    </parent>

    <groupId>club.gclmit</groupId>
    <artifactId>httpdoc-spring-boot-starter</artifactId>
    <version>1.0.3</version>
    <packaging>jar</packaging>

    <!-- 设置 jitpack.io 仓库 -->
    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    <dependencies>
        <!-- 添加 HttpDoc 依赖 -->
        <dependency>
            <groupId>com.github.core-lib.httpdoc</groupId>
            <artifactId>httpdoc-spring-boot</artifactId>
            <version>v1.8.1</version>
        </dependency>

        <!-- 添加JDK的tools.jar依赖用于解析源码注释，采用这种方式部署到Tomcat时需要往Tomcat的lib目录增加该tools.jar -->
        <dependency>
            <groupId>com.sun</groupId>
            <artifactId>tools</artifactId>
            <version>1.8</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/tools-1.8.jar</systemPath>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <targetPath>lib/</targetPath>
                <directory>lib/</directory>
                <includes>
                    <include>**/tools-1.8.jar</include>
                </includes>
            </resource>
        </resources>
    </build>

</project>