<?xml version="1.0" encoding="UTF-8"?>
<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>wf.bitcoin</groupId>
  <artifactId>bitcoin-rpc-client</artifactId>
  <packaging>jar</packaging>
  
  <version>1.2.2</version>
  
  <name>Java Bitcoind RPC Client</name>
  <description>A lightweight Java bitcoin JSON-RPC client binding</description>
  <url>https://github.com/Polve/bitcoin-rpc-client</url>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    
    <!-- GitHub -->
    <github.namespace>Polve</github.namespace>
    <github.project>bitcoin-rpc-client</github.project>
  </properties>
    
  <licenses>    
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <developers>
    <developer>
      <name>Alessandro Polverini</name>
      <email>polverini@gmail.com</email>
      <organization></organization>
      <organizationUrl></organizationUrl>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
    <developer>
      <name>Thomas Diesler</name>
      <email>tdiesler@redhat.com</email>
      <organization>RedHat</organization>
      <organizationUrl>https://www.redhat.com</organizationUrl>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
    <developer>
      <name>Mikhail Yevchenko</name>
      <email>m.ṥῥẚɱ.ѓѐḿởύḙ@azazar.com</email>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
  </developers>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.9</version>
    </dependency>
		
    <!-- https://github.com/lviggiano/owner -->
    <dependency>
      <groupId>org.aeonbits.owner</groupId>
      <artifactId>owner-java8</artifactId>
      <version>1.0.10</version>
    </dependency>
		
  </dependencies>

  <scm>
    <connection>scm:git:https://github.com/Polve/bitcoin-rpc-client</connection>
    <developerConnection>scm:git:https://github.com/Polve/bitcoin-rpc-client.git</developerConnection>
    <url>scm:git:https://github.com/Polve/bitcoin-rpc-client</url>
  </scm>

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

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.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-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>true</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <additionalOptions>-Xdoclint:none</additionalOptions>
              <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
		<configuration>
			<!-- Set skip to true, if running "mvn install" in an environment where gpg keys are not available -->
			<skip>false</skip>
		</configuration>
        <version>1.6</version>
        <executions>
          <execution>
            <id>sign-artifacts</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>1.6.8</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>

    <!-- Generate the changelog -->
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.gmaven</groupId>
                        <artifactId>groovy-maven-plugin</artifactId>
                        <version>2.0</version>
                        <executions>
                            <execution>
                                <id>generate-changelog</id>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <phase>verify</phase>
                                <configuration>
                                    <source>${project.basedir}/scripts/changelog-generate.groovy</source>
                                </configuration>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>org.eclipse.mylyn.github</groupId>
                                <artifactId>org.eclipse.egit.github.core</artifactId>
                                <version>2.1.5</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
