<?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>

  <groupId>xyz.srclab.dependencies</groupId>
  <artifactId>srclab-dependencies</artifactId>
  <version>0.0.0</version>
  <packaging>pom</packaging>

  <name>SrcLab Dependencies</name>
  <description>Dependencies Management for SrcLab</description>
  <url>https://github.com/srclab-projects/srclab-dependencies</url>
  <inceptionYear>2020</inceptionYear>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>

  <scm>
    <url>https://github.com/srclab-projects/srclab-dependencies</url>
    <connection>scm:git:https://github.com/srclab-projects/srclab-dependencies.git</connection>
    <developerConnection>scm:git:https://github.com/srclab-projects/srclab-dependencies.git</developerConnection>
  </scm>

  <developers>
    <developer>
      <id>fredsuvn</id>
      <name>孙谦</name>
      <email>fredsuvn@163.com</email>
      <url>https://github.com/fredsuvn</url>
    </developer>
    <developer>
      <id>SrcLab</id>
      <name>SrcLab Team</name>
      <email>srclab@163.com</email>
      <organization>SrcLab</organization>
      <organizationUrl>https://github.com/srclab-projects</organizationUrl>
    </developer>
  </developers>

  <properties>
    <main.basedir>${project.basedir}</main.basedir>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <encoding>UTF-8</encoding>

    <!-- Versions of build plugin -->
    <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
    <maven.source.plugin.version>3.2.1</maven.source.plugin.version>
    <maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
    <maven.release.plugin.version>2.5.3</maven.release.plugin.version>

    <!-- Version of third party projects -->
    <!-- Kotlin -->
    <kotlin.version>1.4.32</kotlin.version>
    <!-- Annotations -->
    <!-- JetBrains annotations -->
    <jetbrains.annotations.version>20.1.0</jetbrains.annotations.version>
    <!-- jsr305 -->
    <jsr305.version>3.0.2</jsr305.version>
    <!-- Spring -->
    <spring.version>2.4.5</spring.version>
    <!-- Commons -->
    <!-- Apache commons -->
    <commons.lang3.version>3.12.0</commons.lang3.version>
    <commons.collections4.version>4.4</commons.collections4.version>
    <commons.beanutils.version>1.9.4</commons.beanutils.version>
    <commons.codec.version>1.15</commons.codec.version>
    <commons.io.version>2.8.0</commons.io.version>
    <!-- Guava -->
    <guava.version>30.1.1-jre</guava.version>
    <!-- Cache -->
    <!-- Caffeine -->
    <caffeine.version>2.9.1</caffeine.version>
    <!-- Bytecode -->
    <!-- cglib -->
    <cglib.version>3.3.0</cglib.version>
    <!-- Cryptos -->
    <!-- Bouncy Castle Crypto -->
    <bcprov.jdk15on.version>1.68</bcprov.jdk15on.version>
    <!-- Java JWT -->
    <java.jwt.version>3.15.0</java.jwt.version>
    <!-- Test -->
    <!-- TestNG -->
    <testng.version>7.4.0</testng.version>
    <!-- JMH -->
    <jmh.version>1.30</jmh.version>
    <!-- Netty -->
    <netty.version>4.1.63.Final</netty.version>
    <!-- gRPC -->
    <protobuf.version>3.16.0</protobuf.version>
    <grpc.version>1.37.0</grpc.version>
    <jackson.datatype.protobuf.version>0.9.12</jackson.datatype.protobuf.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- Kotlin -->
      <dependency>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-bom</artifactId>
        <version>${kotlin.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Annotations -->
      <!-- JetBrains annotations -->
      <dependency>
        <groupId>org.jetbrains</groupId>
        <artifactId>annotations</artifactId>
        <version>${jetbrains.annotations.version}</version>
      </dependency>
      <!-- JSR305 -->
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>${jsr305.version}</version>
      </dependency>

      <!-- Spring -->
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>${spring.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Commons -->
      <!-- Apache commons -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons.lang3.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>${commons.collections4.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>${commons.beanutils.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>${commons.codec.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons.io.version}</version>
      </dependency>
      <!-- Guava -->
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>

      <!-- Cache -->
      <!-- Caffeine -->
      <dependency>
        <groupId>com.github.ben-manes.caffeine</groupId>
        <artifactId>caffeine</artifactId>
        <version>${caffeine.version}</version>
      </dependency>

      <!-- Bytecode -->
      <!-- cglib -->
      <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>${cglib.version}</version>
      </dependency>

      <!-- Cryptos -->
      <!-- Bouncy Castle Crypto -->
      <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk15on</artifactId>
        <version>${bcprov.jdk15on.version}</version>
      </dependency>
      <!-- Java JWT -->
      <dependency>
        <groupId>com.auth0</groupId>
        <artifactId>java-jwt</artifactId>
        <version>${java.jwt.version}</version>
      </dependency>

      <!-- Test -->
      <!-- TestNG -->
      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>${testng.version}</version>
      </dependency>
      <!-- JMH -->
      <dependency>
        <groupId>org.openjdk.jmh</groupId>
        <artifactId>jmh-core</artifactId>
        <version>${jmh.version}</version>
      </dependency>
      <dependency>
        <groupId>org.openjdk.jmh</groupId>
        <artifactId>jmh-generator-annprocess</artifactId>
        <version>${jmh.version}</version>
      </dependency>

      <!-- Netty -->
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>${netty.version}</version>
      </dependency>

      <!-- gRPC -->
      <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>${protobuf.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java-util</artifactId>
        <version>${protobuf.version}</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-all</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>com.hubspot.jackson</groupId>
        <artifactId>jackson-datatype-protobuf</artifactId>
        <version>${jackson.datatype.protobuf.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>gpg</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven.gpg.plugin.version}</version>
            <configuration>
              <keyname>1BCF94DF</keyname>
            </configuration>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.compiler.plugin.version}</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven.source.plugin.version}</version>
        <configuration>
          <attach>true</attach>
        </configuration>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven.release.plugin.version}</version>
        <configuration>
          <goals>deploy</goals>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <repository>
      <id>ali-central</id>
      <url>https://maven.aliyun.com/repository/central</url>
    </repository>
    <repository>
      <id>central</id>
      <url>https://repo1.maven.org/maven2/</url>
    </repository>
  </repositories>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-snapshot</id>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-release</id>
      <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
  </distributionManagement>
</project>