<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright (c) 2018-2023. Chengdu WeiSiFan Technology Co., Ltd.
  ~ Carbon Integration SDK is licensed under Mulan PSL v2.
  ~
  ~ You can use this software according to the terms and conditions of the Mulan PSL v2.
  ~ You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2
  ~
  ~ THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  ~ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  ~ MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  ~ See the Mulan PSL v2 for more details.
  -->

<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>com.zhibaocloud</groupId>
  <artifactId>carbon-integration</artifactId>
  <version>0.0.1</version>
  <packaging>pom</packaging>
  <name>Carbon Integration</name>
  <description>和智保云投保通道进行数据集成的SDK工具包以及演示程序</description>
  <url>https://zhibaocloud.com</url>

  <scm>
    <url>https://github.com/zhibaocloud/carbon-integration</url>
    <connection>scm:git:git://github.com/zhibaocloud/carbon-integration.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/zhibaocloud/carbon-integration.git</developerConnection>
    <tag>HEAD</tag>
  </scm>
  
  <developers>
    <developer>
      <name>zhibaocloud</name>
      <email>conntect@wisefin.tech</email>
      <organization>zhibaocloud</organization>
      <organizationUrl>http://www.zhibaocloud.com</organizationUrl>
    </developer>
  </developers>
  
  <licenses>
    <license>
      <name>木兰宽松许可证，第2版</name>
      <url>http://license.coscl.org.cn/MulanPSL2</url>
    </license>
  </licenses>

  <modules>
    <module>carbon-exchange</module>
    <module>carbon-client-sdk</module>
    <module>carbon-client-spring-boot-starter</module>
    <module>carbon-client-cli</module>
    <module>carbon-mock-server</module>
    <module>carbon-coverage</module>
    <module>carbon-demo-secret</module>
    <module>carbon-server-spring-boot-starter</module>
  </modules>

  <properties>
    <java.version>8</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <project.build.java.source>${java.version}</project.build.java.source>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <httpclient.version>4.5.14</httpclient.version>
    <junit.version>4.13.2</junit.version>
    <lombok.version>1.18.26</lombok.version>
    <jackson.version>2.12.4</jackson.version>
    <javax.annotation.version>1.3.2</javax.annotation.version>
    <swagger.version>2.2.8</swagger.version>
    <spring-boot.version>2.7.10</spring-boot.version>
    <springdoc.version>1.6.15</springdoc.version>
    <bc.version>1.70</bc.version>
    <checkstyle-maven-plugin.version>3.1.2</checkstyle-maven-plugin.version>
    <checkstyle.latest.version>9.2</checkstyle.latest.version>
  </properties>

  <distributionManagement>
    <snapshotRepository>
        <id>ossrh</id>
        <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
        <id>ossrh</id>
        <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>
      <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>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk15on</artifactId>
        <version>${bc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springdoc</groupId>
        <artifactId>springdoc-openapi-webmvc-core</artifactId>
        <version>${springdoc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.swagger.core.v3</groupId>
        <artifactId>swagger-annotations</artifactId>
        <version>${swagger.version}</version>
      </dependency>
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${lombok.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${httpclient.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpmime</artifactId>
        <version>${httpclient.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.zhibaocloud</groupId>
        <artifactId>carbon-exchange</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.zhibaocloud</groupId>
        <artifactId>carbon-client-sdk</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.zhibaocloud</groupId>
        <artifactId>carbon-client-spring-boot-starter</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.zhibaocloud</groupId>
        <artifactId>carbon-client-cli</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.zhibaocloud</groupId>
        <artifactId>carbon-server-spring-boot-starter</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.zhibaocloud</groupId>
        <artifactId>carbon-mock-server</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.zhibaocloud</groupId>
        <artifactId>carbon-demo-secret</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.jsonzou</groupId>
        <artifactId>jmockdata</artifactId>
        <version>4.3.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.openapitools</groupId>
          <artifactId>openapi-generator-maven-plugin</artifactId>
          <version>6.3.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <groupId>io.github.git-commit-id</groupId>
          <artifactId>git-commit-id-maven-plugin</artifactId>
          <version>4.9.9</version>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>${spring-boot.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>repackage</goal>
                <goal>build-info</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <layers>
              <enabled>true</enabled>
            </layers>
            <excludes>
              <exclude>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
              </exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${checkstyle-maven-plugin.version}</version>
          <configuration>
            <configLocation>checkstyle.xml</configLocation>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${checkstyle.latest.version}</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report-aggregate</id>
            <phase>verify</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <executions>
          <execution>
            <id>checkstyle</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.2.1</version>
          <executions>
              <execution>
                  <id>attach-sources</id>
                  <goals>
                      <goal>jar-no-fork</goal>
                  </goals>
              </execution>
          </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
           <serverId>ossrh</serverId>
           <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
           <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.5</version>
          <executions>
              <execution>
                  <id>sign-artifacts</id>
                  <phase>verify</phase>
                  <goals>
                      <goal>sign</goal>
                  </goals>
                  <configuration>
                      <!-- Prevent gpg from using pinentry programs -->
                      <gpgArguments>
                          <arg>--pinentry-mode</arg>
                          <arg>loopback</arg>
                      </gpgArguments>
                  </configuration>
              </execution>
          </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>verify</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
