<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.fujieid</groupId>
  <artifactId>jap</artifactId>
  <version>1.0.1-alpha.1</version>
  <packaging>pom</packaging>

  <name>jap</name>
  <url>https://gitee.com/fujieid/jap</url>
  <description>Just auth for any app</description>

  <licenses>
    <license>
      <name>LGPL 3.0</name>
      <url>https://gitee.com/fujieid/jap/blob/master/LICENSE</url>
    </license>
  </licenses>

  <issueManagement>
    <system>Gitee Issue</system>
    <url>https://gitee.com/fujieid/jap/issues</url>
  </issueManagement>

  <developers>
    <developer>
      <name>Yadong.Zhang</name>
      <email>yadong.zhang0415@gmail.com</email>
      <url>https://github.com/zhangyd-c</url>
    </developer>
  </developers>

  <scm>
    <connection>https://gitee.com/fujieid/jap.git</connection>
    <developerConnection>https://gitee.com/fujieid/jap.git</developerConnection>
    <url>https://gitee.com/fujieid/jap</url>
  </scm>

  <modules>
    <module>jap-core</module>
    <module>jap-simple</module>
    <module>jap-social</module>
    <module>jap-oauth2</module>
    <module>jap-sso</module>
    <module>jap-oidc</module>
    <module>jap-mfa</module>
    <module>jap-ids</module>
  </modules>

  <properties>
    <java.version>1.8</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven-source.version>2.2.1</maven-source.version>
    <maven-compiler.version>3.8.1</maven-compiler.version>
    <maven-javadoc.version>3.1.1</maven-javadoc.version>
    <maven-surefire-version>2.20</maven-surefire-version>
    <maven-gpg-version>1.6</maven-gpg-version>
    <maven.test.skip>false</maven.test.skip>
    <cobertura-version>2.7</cobertura-version>
    <jacoco-version>0.8.6</jacoco-version>

    <junit.version>4.13.1</junit.version>
    <mockito.version>2.23.4</mockito.version>
    <hutool.version>5.5.7</hutool.version>
    <guava.version>RELEASE</guava.version>
    <javax.servlet.version>4.0.1</javax.servlet.version>
    <justauth.version>1.15.9</justauth.version>
    <jose4j.version>0.7.1</jose4j.version>
    <slf4j-api.version>1.7.30</slf4j-api.version>
    <jedis.version>3.2.0</jedis.version>
    <kisso.version>3.7.6</kisso.version>
    <simple-json.version>0.0.2</simple-json.version>
    <simple-http.version>1.0.3</simple-http.version>
  </properties>

  <dependencies>
    <!-- junit start -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>cn.hutool</groupId>
      <artifactId>hutool-http</artifactId>
      <version>${hutool.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.22</version>
      <scope>test</scope>
    </dependency>
    <!-- junit end -->


    <!--
    To decouple the JSON class library, developers only need to select the appropriate JSON class library to introduce, as follows:
        - jackson
        - fastjson
        - gson
        - hutool-json
    For more information on the use of `simple-json`, please refer to: https://github.com/xkcoding/simple-json
    -->
    <dependency>
      <groupId>com.xkcoding.json</groupId>
      <artifactId>simple-json</artifactId>
      <version>${simple-json.version}</version>
    </dependency>

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

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

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

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

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

    <dependency>
      <groupId>org.bitbucket.b_c</groupId>
      <artifactId>jose4j</artifactId>
      <version>${jose4j.version}</version>
    </dependency>

    <!-- servlet -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>${javax.servlet.version}</version>
    </dependency>
  </dependencies>

  <build>
    <finalName>${project.artifactId}-${project.version}</finalName>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler.version}</version>
        <configuration>
          <encoding>${project.build.sourceEncoding}</encoding>
          <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.version}</version>
        <inherited>true</inherited>
        <executions>
          <execution>
            <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.version}</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-version}</version>
        <configuration>
          <includes>
            <include>**/*Test.java</include>
          </includes>
          <excludes>
            <exclude>**/AuthRequestTest.java</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>${cobertura-version}</version>
        <configuration>
          <formats>
            <format>xml</format>
            <format>html</format>
            <!-- delegate the report aggregation for the coverage tool. -->
            <aggregate>true</aggregate>
          </formats>
          <check/>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-version}</version>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven-source.version}</version>
            <inherited>true</inherited>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-version}</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <snapshotRepository>
          <id>sonatype-nexus-snapshots</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
          <id>sonatype-nexus-staging</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
    </profile>
  </profiles>
</project>
