<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.5.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <groupId>io.gitee.zero-wsh</groupId>
    <artifactId>zero-utils</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>

    <!-- 都是必不可少的，其中url为自己的github的项目位置 -->
    <name>PreviewFile</name>
    <description>For easy Preview</description>
    <url>https://gitee.com/zero-wsh/zero-utils</url>
    <!-- 配置developers  -->
    <developers>
        <developer>
            <name>zero</name>
            <email>15397608105@163.com</email>
        </developer>
    </developers>
    <!-- 将其改为自己的github项目即可-->
    <scm>
        <connection>scm:git:git://gitee.com/zero-wsh/zero-utils.git</connection>
        <developerConnection>
            scm:git:ssh://gitee.com/zero-wsh/zero-utils.git
        </developerConnection>
        <url>http://gitee.com/zero-wsh/zero-utils</url>
    </scm>
    <!-- 配置Licenses  -->
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <!-- 解决将依赖包也一并打入jar包  <finalName>preview-officefile-1.0</finalName>-->
    <!--<profiles>-->

    <!--<profile>-->
    <!--<id>release</id>    &lt;!&ndash; 使用该id后之后maven部署命令需加 -P release &ndash;&gt;-->
    <!--<build>-->

    <!--<plugins>-->

    <!--&lt;!&ndash; 安装源码到本地仓库 &ndash;&gt;-->
    <!--<plugin>-->
    <!--<groupId>org.apache.maven.plugins</groupId>-->
    <!--<artifactId>maven-source-plugin</artifactId>-->
    <!--<version>2.1.2</version>-->
    <!--<executions>-->
    <!--<execution>-->
    <!--<id>attach-sources</id>-->
    <!--<phase>verify</phase>-->
    <!--<goals>-->
    <!--<goal>jar-no-fork</goal>-->
    <!--</goals>-->
    <!--</execution>-->
    <!--</executions>-->
    <!--</plugin>-->
    <!--<plugin>-->
    <!--<groupId>org.apache.maven.plugins</groupId>-->
    <!--<artifactId>maven-javadoc-plugin</artifactId>-->
    <!--<version>2.10.4</version>-->
    <!--<configuration>-->
    <!--&lt;!&ndash; 解决 java8 下发布到 maven 中心库时，生成 doc 的异常 &ndash;&gt;-->
    <!--<additionalparam>-Xdoclint:none</additionalparam>-->
    <!--<encoding>${project.build.sourceEncoding}</encoding>-->
    <!--</configuration>-->
    <!--<executions>-->
    <!--<execution>-->
    <!--<id>attach-javadocs</id>-->
    <!--<goals>-->
    <!--<goal>jar</goal>-->
    <!--</goals>-->
    <!--</execution>-->
    <!--</executions>-->
    <!--</plugin>-->
    <!--&lt;!&ndash; maven GPG用于加密等配置 &ndash;&gt;-->
    <!--<plugin>-->
    <!--<groupId>org.apache.maven.plugins</groupId>-->
    <!--<artifactId>maven-gpg-plugin</artifactId>-->
    <!--<version>1.5</version>-->
    <!--<executions>-->
    <!--<execution>-->
    <!--<id>sign-artifacts</id>-->
    <!--<phase>verify</phase>-->
    <!--<goals>-->
    <!--<goal>sign</goal>-->
    <!--</goals>-->
    <!--</execution>-->
    <!--</executions>-->
    <!--</plugin>-->


    <!--</plugins>-->

    <!--</build>-->
    <!--</profile>-->
    <!--</profiles>-->


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jdk.version>1.8</jdk.version>
        <knife4j.version>3.0.2</knife4j.version>
        <easyexcel.version>2.1.6</easyexcel.version>
        <shiro.version>1.7.1</shiro.version>
        <jwt.version>3.14.0</jwt.version>
        <UserAgent.version>1.21</UserAgent.version>
        <querydsl.version>4.4.0</querydsl.version>
    </properties>
    <dependencies>
        <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.5</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
            <version>5.6.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>knife4j-spring-boot-starter</artifactId>
            <version>${knife4j.version}</version>
        </dependency>
        <!-- reids -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>easyexcel</artifactId>
            <version>${easyexcel.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.querydsl</groupId>
            <artifactId>querydsl-apt</artifactId>
            <version>${querydsl.version}</version>
            <!--            <exclusions>-->
            <!--                <exclusion>-->
            <!--                    <artifactId>guava</artifactId>-->
            <!--                    <groupId>com.google.guava</groupId>-->
            <!--                </exclusion>-->
            <!--                <exclusion>-->
            <!--                    <artifactId>javassist</artifactId>-->
            <!--                    <groupId>org.javassist</groupId>-->
            <!--                </exclusion>-->
            <!--            </exclusions>-->
            <!--就是你在把这个项目打成war包时，scope=provided的jar包，不会出现在WEB-INFO/lib目录下，而scope=compile的jar包，会放到WEB-INFO/lib目录-->
            <!--<scope>provided</scope>-->
        </dependency>

        <dependency>
            <groupId>com.querydsl</groupId>
            <artifactId>querydsl-jpa</artifactId>
            <version>${querydsl.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>guava</artifactId>
                    <groupId>com.google.guava</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-spring</artifactId>
            <version>${shiro.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.auth0</groupId>
            <artifactId>java-jwt</artifactId>
            <version>${jwt.version}</version>
            <scope>provided</scope>
        </dependency>

        <!--获取浏览器/操作系统/设备类型等信息-->
        <dependency>
            <groupId>eu.bitwalker</groupId>
            <artifactId>UserAgentUtils</artifactId>
            <version>${UserAgent.version}</version>
            <!--<scope>provided</scope>-->
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>com.mysema.maven</groupId>
                <artifactId>apt-maven-plugin</artifactId>
                <version>1.1.3</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target/generated-sources/java</outputDirectory>
                            <processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
                        </configuration>
                    </execution>
                </executions>
            </plugin>


            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.2</version>
                <executions>
                    <execution>
                        <id>default-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <!-- 解决 java8 下发布到 maven 中心库时，生成 doc 的异常 -->
                    <additionalparam>-Xdoclint:none</additionalparam>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <excludePackageNames>com.zero.utils</excludePackageNames>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- 安装源码到本地仓库 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <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>

            <!--<plugin>-->
                <!--<groupId>org.sonatype.plugins</groupId>-->
                <!--<artifactId>nexus-staging-maven-plugin</artifactId>-->
                <!--<version>1.6.8</version>-->
                <!--<extensions>true</extensions>-->
                <!--<configuration>-->
                    <!--&lt;!&ndash; 对应 maven settings.xml 中的 server 配置 &ndash;&gt;-->
                    <!--<serverId>ossrh</serverId>-->
                    <!--<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>-->
                    <!--<autoReleaseAfterClose>true</autoReleaseAfterClose>-->
                <!--</configuration>-->
            <!--</plugin>-->
        </plugins>
    </build>

    <!-- 下方url一般都是如此，从官方文档中也能看到 -->
    <distributionManagement>
        <repository>
            <id>ossrh</id>  <!-- 即可maven setting.xml配置的id -->
            <name>Stage repository</name>
            <url>
                https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
            </url>
        </repository>

        <snapshotRepository>
            <id>ossrh</id>
            <name>Snapshots repository</name>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>

    </distributionManagement>
</project>
