<?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">

  <url>https://gitee.com/faith-zac/faith-tool</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <scm>
    <url>https://gitee.com/faith-zac/faith-tool</url>
    <connection>https://gitee.com/faith-zac/faith-tool.git</connection>
    <developerConnection>https://gitee.com/faith-zac/faith-tool.git</developerConnection>
  </scm>
  <developers>
    <developer>
      <name>atfaith</name>
      <email>xx@xx.com</email>
    </developer>
  </developers>

  <modelVersion>4.0.0</modelVersion>

  <groupId>cc.zhaoac</groupId>
  <artifactId>faith-tool</artifactId>
  <version>1.0.1</version>
  <packaging>pom</packaging>
  <name>faith-tool</name>
  <description>
    springboot综合工具包: 包含launch, log, mybatis, swagger, secure(进行中)
  </description>

  <modules>
    <module>faith-core-mybatis</module>
    <module>faith-core-launch</module>
    <module>faith-core-secure</module>
    <module>faith-core-boot</module>
    <module>faith-core-swagger</module>
    <module>faith-core-tool</module>
    <module>faith-core-log</module>
  </modules>

  <properties>
    <faith.tool.version>1.0.1</faith.tool.version>

    <java.version>1.8</java.version>
    <maven.plugin.version>3.8.1</maven.plugin.version>

    <knife4j.version>4.3.0</knife4j.version>
    <mybatis.plus.version>3.5.3.1</mybatis.plus.version>
    <mybatis.plus.generator.version>3.5.3.1</mybatis.plus.generator.version>
    <blade-core-tool.version>3.7.0</blade-core-tool.version>
    <guava.version>31.1-jre</guava.version>


    <spring.version>5.3.27</spring.version>
    <spring.boot.version>2.7.10</spring.boot.version>
    <spring.boot.admin.version>2.7.10</spring.boot.admin.version>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-framework-bom</artifactId>
        <version>${spring.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring.boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.github.xiaoymin</groupId>
        <artifactId>knife4j-dependencies</artifactId>
        <version>${knife4j.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-aop</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-configuration-processor</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.retry</groupId>
      <artifactId>spring-retry</artifactId>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate.validator</groupId>
      <artifactId>hibernate-validator</artifactId>
      <version>6.0.0.Final</version>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <finalName>${project.name}</finalName>
        <resources>
          <resource>
            <directory>src/main/resources</directory>
          </resource>
          <resource>
            <directory>src/main/java</directory>
            <includes>
              <include>**/*.properties</include>
              <include>**/*.sample</include>
            </includes>
          </resource>
        </resources>
        <plugins>
          <!-- Source -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.1</version>
            <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>2.9.1</version>
            <configuration>
              <show>private</show>
              <nohelp>true</nohelp>
              <charset>UTF-8</charset>
              <encoding>UTF-8</encoding>
              <docencoding>UTF-8</docencoding>
              <additionalparam>-Xdoclint:none</additionalparam>
            </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>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!--Compiler -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.0</version>
            <configuration>
              <source>1.8</source>
              <target>1.8</target>
              <fork>true</fork>
              <verbose>true</verbose>
              <encoding>UTF-8</encoding>
              <showWarnings>false</showWarnings>
            </configuration>
          </plugin>
          <!--Release -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.5.1</version>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <!-- 这里的id oss需要和setting.xml里面server节点配置的id一致-->
        <snapshotRepository>
          <id>oss</id>
          <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
          <id>oss</id>
          <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
    </profile>
  </profiles>

</project>