<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>
  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-dependencies</artifactId>
    <version>2.6.2</version>
  </parent>

  <groupId>cn.fntop</groupId>
  <artifactId>open-api-spring-boot-starter</artifactId>
  <version>2.0.2</version>
  <packaging>jar</packaging>

  <name>open-api-spring-boot-starter</name>
  <!--项目URL-->
  <url>https://gitee.com/FnTop/fn-open-util.git</url>
  <description>快速封装企业接口组件，以供外部调用</description>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://gitee.com/FnTop/fn-open-util/blob/master/LICENSE</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>fn</name>
      <email>442232278@qq.com</email>
      <url>https://www.fntop.cn</url>
      <organization>cn.fntop</organization>
      <organizationUrl>https://blog.fntop.cn</organizationUrl>
    </developer>
  </developers>
  <scm>
    <!--源码URL-->
    <url>https://gitee.com/FnTop/fn-open-util.git</url>
  </scm>
  <properties>
    <!--项目编译JDK版本-->
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
    <java.version>1.8</java.version>
    <!--项目编码-->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <!--插件版本-->
    <maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
    <maven-release-plugin.version>3.0.0-M1</maven-release-plugin.version>
    <maven-source-plugin.version>2.1.2</maven-source-plugin.version>
    <maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
    <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
    <spring-boot.version>2.6.2</spring-boot.version>
    <gpt.server.version>0.12.0</gpt.server.version>
    <hutool-all.version>5.8.11</hutool-all.version>
  </properties>
  <dependencies>
    <!-- hutool 的依赖配置-->
    <dependency>
      <groupId>cn.hutool</groupId>
      <artifactId>hutool-all</artifactId>
      <version>${hutool-all.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.theokanning.openai-gpt3-java</groupId>
      <artifactId>service</artifactId>
      <version>${gpt.server.version}</version>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-configuration-processor</artifactId>
      <optional>true</optional>
    </dependency>


  </dependencies>
  <profiles>
    <!--release-->
    <profile>
      <id>release</id>
      <build>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <plugins>
          <!--打包去掉jar包内的配置文件-->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
              <excludes>
                <!-- 不需要进包里的配置文件的名字 默认位置是resource 下的-->
                <exclude>**/application.yml</exclude>
                <exclude>**/OpenApiApplication.class</exclude>
              </excludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven-compiler-plugin.version}</version>
            <configuration>
              <target>${maven.compiler.target}</target>
              <source>${maven.compiler.source}</source>
              <encoding>${project.build.sourceEncoding}</encoding>
              <!-- 解决打包生成BOOT-INF问题 -->
              <skip>true</skip>
              <compilerArgs>
                <arg>-parameters</arg>
              </compilerArgs>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>${maven-deploy-plugin.version}</version>
          </plugin>
          <!-- Source -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven-source-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven-javadoc-plugin.version}</version>
            <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
              <encoding>${project.build.sourceEncoding}</encoding>
              <failOnError>false</failOnError>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>ossrh</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>${nexus-staging-maven-plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>sonatype-release</serverId>
              <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <snapshotRepository>
          <id>sonatype-snapshots</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>
    </profile>
  </profiles>
</project>
