<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
  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>
  <packaging>pom</packaging>
  <modules>
    <module>server</module>
    <module>sdk</module>
    <module>spi</module>
  </modules>
  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.12.RELEASE</version>
    <relativePath />
  </parent>

  <groupId>top.bella</groupId>
  <artifactId>bella-openapi</artifactId>
  <version>1.2.13</version>
  <name>bella-openapi</name>
  <description>Bella OpenAPI SDK</description>
  <url>https://github.com/LianjiaTech/bella-openapi</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    <spring-cloud.version>Hoxton.SR12</spring-cloud.version>
    <ke-infrastructure.version>2.1.28</ke-infrastructure.version>
    <jooq.version>3.14.15</jooq.version>
    <redisson.version>3.9.1</redisson.version>
    <apollo.version>2.1.0</apollo.version>
    <awssdk.version>2.31.65</awssdk.version>
    <bella-openai.version>0.23.86</bella-openai.version>
  </properties>

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

  <developers>
    <developer>
      <name>Bella</name>
      <email>bellatop999@gmail.com</email>
      <organization>Bella</organization>
      <organizationUrl>https://api.bella.top</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/LianjiaTech/bella-openapi.git</connection>
    <developerConnection>scm:git:ssh://github.com:LianjiaTech/bella-openapi.git</developerConnection>
    <url>https://github.com/LianjiaTech/bella-openapi/tree/develop</url>
  </scm>

  <distributionManagement>
    <repository>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://central.sonatype.com/maven/v1</url>
    </repository>
    <snapshotRepository>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://central.sonatype.com/maven/v1</url>
    </snapshotRepository>
  </distributionManagement>


  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${spring-cloud.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>net.bytebuddy</groupId>
        <artifactId>byte-buddy</artifactId>
        <version>1.10.20</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>30.1-jre</version>
      </dependency>
      <dependency>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-stdlib</artifactId>
        <version>1.3.70</version>
      </dependency>
      <dependency>
        <groupId>com.knuddels</groupId>
        <artifactId>jtokkit</artifactId>
        <version>1.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-keyvalue</artifactId>
        <version>2.3.9.RELEASE</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-commons</artifactId>
        <version>2.3.9.RELEASE</version>
      </dependency>
      <dependency>
        <groupId>com.ctrip.framework.apollo</groupId>
        <artifactId>apollo-client</artifactId>
        <version>${apollo.version}</version>
      </dependency>
      <dependency>
        <groupId>top.bella</groupId>
        <artifactId>openai-service</artifactId>
        <version>${bella-openai.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- 源码插件 -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Javadoc插件 -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.3.0</version>
            <configuration>
              <encoding>UTF-8</encoding>
              <charset>UTF-8</charset>
              <docencoding>UTF-8</docencoding>
              <failOnError>false</failOnError>
              <doclint>none</doclint>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- GPG签名插件 -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.0.1</version>
            <configuration>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
              <passphrase>${env.MAVEN_GPG_PASSPHRASE}</passphrase>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- maven deploy插件 -->
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.7.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
              <autoPublish>true</autoPublish>
              <excludeArtifacts>
                <excludeArtifact>server</excludeArtifact>
              </excludeArtifacts>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
