<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>

  <!-- Maven Coordinates -->
  <groupId>net.leeoh.mobileid.crypto</groupId>
  <artifactId>mobileid-crypto</artifactId>
  <version>1.0.2</version>
  <packaging>jar</packaging>

  <!-- Required metadata -->
  <name>${project.groupId}:${project.artifactId}</name>
  <description>Mobile Identity Crypto Library</description>
  <url>https://github.com/nixstory/mobileid</url>

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

  <developers>
    <developer>
      <name>TaeHeun Lee</name>
      <email>nixstory@gmail.com</email>
    </developer>
  </developers>

 	<scm>
	  <connection>scm:git:https://github.com/nixstory/mobileid.git</connection>
	  <!-- SSH를 쓰면 더 표준적이지만, 내부 GitLab이면 http도 OK -->
	  <developerConnection>scm:git:https://github.com/nixstory/mobileid.git</developerConnection>
	  <url>https://github.com/nixstory/mobileid</url>
	  <tag>HEAD</tag>
	</scm>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>20.0</version>
    </dependency>

    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcprov-jdk15on</artifactId>
      <version>1.70</version>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bctls-jdk15on</artifactId>
      <version>1.70</version>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcutil-jdk15on</artifactId>
      <version>1.70</version>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcpkix-jdk15on</artifactId>
      <version>1.70</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- sources.jar -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals><goal>jar</goal></goals>
          </execution>
        </executions>
      </plugin>

      <!-- javadoc.jar (Java8에서 doclint로 실패하면 Xdoclint:none 유용) -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.6.3</version>
        <configuration>
          <additionalOptions>-Xdoclint:none</additionalOptions>
          <encoding>UTF-8</encoding>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals><goal>jar</goal></goals>
          </execution>
        </executions>
      </plugin>

      <!-- PGP sign (*.asc) -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals><goal>sign</goal></goals>
          </execution>
        </executions>
      </plugin>

      <!-- Central Portal publish -->
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.10.0</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
          <autoPublish>true</autoPublish>
        </configuration>
      </plugin>
      
      <plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-gpg-plugin</artifactId>
		  <version>3.2.4</version>
		  <executions>
		    <execution>
		      <id>sign-artifacts</id>
		      <phase>verify</phase>
		      <goals><goal>sign</goal></goals>
		    </execution>
		  </executions>
		  <configuration>
		    <!-- 2)에서 확인한 LONG key id 넣기 -->
		    <keyname>E6F050395C42BEDB</keyname>
		  </configuration>
	</plugin>
    </plugins>
  </build>
</project>