<?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>
  <packaging>pom</packaging>

  <modules>
    <module>panda-gateway-core</module>
    <module>panda-gateway-servlet</module>
    <module>panda-gateway-webflux</module>
    <module>panda-gateway-samples</module>
    <module>panda-gateway-bom</module>
  </modules>

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.1</version>
    <relativePath/>
  </parent>

  <groupId>com.lzhpo</groupId>
  <artifactId>panda-gateway</artifactId>
  <version>${revision}</version>
  <name>${project.groupId} ::: ${project.artifactId}</name>
  <url>https://github.com/lzhpo/panda-gateway</url>
  <description>panda gateway</description>

  <properties>
    <server.id>ossrh</server.id>
    <java.version>1.8</java.version>
    <hutool.version>5.8.4</hutool.version>
    <guava.version>31.1-jre</guava.version>
    <maven.gpg.version>1.6</maven.gpg.version>
    <commons-io.version>2.11.0</commons-io.version>
    <maven.source.version>3.0.1</maven.source.version>
    <maven.javadoc.version>3.0.1</maven.javadoc.version>
    <spring-cloud.version>2021.0.1</spring-cloud.version>
    <fmt-maven-plugin.version>2.19</fmt-maven-plugin.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <scm>
    <url>git@github.com:lzhpo/panda-gateway.git</url>
    <connection>scm:git@github.com:lzhpo/panda-gateway.git</connection>
    <developerConnection>scm:git@github.com:lzhpo/panda-gateway.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <!-- https://www.apache.org/licenses/LICENSE-2.0, https://www.apache.org/licenses/LICENSE-2.0.txt -->
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>lzhpo</id>
      <name>lzhpo</name>
      <email>lzhpo1024@gmail.com</email>
      <organizationUrl>http://www.lzhpo.com</organizationUrl>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>+8</timezone>
    </developer>
  </developers>

  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>cn.hutool</groupId>
      <artifactId>hutool-all</artifactId>
      <version>${hutool.version}</version>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commons-io.version}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-bootstrap</artifactId>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.lzhpo</groupId>
        <artifactId>panda-gateway-bom</artifactId>
        <version>${revision}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>

      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${spring-cloud.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>com.spotify.fmt</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>${fmt-maven-plugin.version}</version>
        <executions>
          <execution>
            <goals>
              <!-- format/check -->
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- Source -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven.source.version}</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>${maven.javadoc.version}</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <locale>en_US</locale>
                  <encoding>UTF-8</encoding>
                  <charset>UTF-8</charset>
                  <doclint>none</doclint>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <!-- GPG -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven.gpg.version}</version>
            <executions>
              <execution>
                <id>gpg</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

      <distributionManagement>
        <snapshotRepository>
          <id>${server.id}</id>
          <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
          <id>${server.id}</id>
          <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
    </profile>
  </profiles>
</project>
