<?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">

  <groupId>com.hedera.hashgraph</groupId>
  <artifactId>hedera-services</artifactId>
  <version>0.9.0</version>
  <description>
    Hedera Services (crypto, file, contract, consensus) on the Platform
  </description>
  <inceptionYear>2018</inceptionYear>
  <modelVersion>4.0.0</modelVersion>
  <name>Hedera Services</name>
  <packaging>pom</packaging>
  <url>https://github.com/hashgraph/hedera-services</url>
  <organization>
    <name>Hedera Hashgraph, LLC</name>
    <url>https://hedera.com</url>
  </organization>

  <scm>
    <url>https://github.com/hashgraph/hedera-services</url>
    <connection>scm:git:git@github.com:hashgraph/hedera-services.git</connection>
    <developerConnection>scm:git:git@github.com:hashgraph/hedera-services.git</developerConnection>
    <tag>v0.9.0</tag>
  </scm>

  <developers>
    <developer>
      <name>Anirudh Ghanta</name>
      <email>Anirudh.Ghanta@hedera.com</email>
      <organization>Hedera Hashgraph, LLC</organization>
      <organizationUrl>https://hedera.com</organizationUrl>
    </developer>
    <developer>
      <name>Cesar Vazquez</name>
      <email>cesarvazquez@swirlds.com</email>
      <organization>Swirlds, Inc</organization>
      <organizationUrl>https://www.swirlds.com</organizationUrl>
    </developer>
    <developer>
      <name>Jeffrey Tang</name>
      <email>jeffrey@swirlds.com</email>
      <organization>Swirlds, Inc</organization>
      <organizationUrl>https://www.swirlds.com</organizationUrl>
    </developer>
    <developer>
      <name>Leo Jiang</name>
      <email>Leo.Jiang@hedera.com</email>
      <organization>Hedera Hashgraph, LLC</organization>
      <organizationUrl>https://hedera.com</organizationUrl>
    </developer>
    <developer>
      <name>Michael Tinker</name>
      <email>michael.tinker@hedera.com</email>
      <organization>Hedera Hashgraph, LLC</organization>
      <organizationUrl>https://hedera.com</organizationUrl>
    </developer>
    <developer>
      <name>Neeharika Sompalli</name>
      <email>Neeharika.Sompalli@hedera.com</email>
      <organization>Hedera Hashgraph, LLC</organization>
      <organizationUrl>https://hedera.com</organizationUrl>
    </developer>
    <developer>
      <name>Nosh Mody</name>
      <email>nosh@swirlds.com</email>
      <organization>Swirlds, Inc.</organization>
      <organizationUrl>https://www.swirlds.com</organizationUrl>
    </developer>
    <developer>
      <name>Qian Qu</name>
      <email>qianqu@swirlds.com</email>
      <organization>Swirlds, Inc.</organization>
      <organizationUrl>https://www.swirlds.com</organizationUrl>
    </developer>
    <developer>
      <name>Quan Nguyen</name>
      <email>quannguyen@swirlds.com</email>
      <organization>Swirlds, Inc.</organization>
      <organizationUrl>https://www.swirlds.com</organizationUrl>
    </developer>
  </developers>

  <ciManagement>
    <system>CircleCI</system>
    <url>https://circleci.com/gh/hashgraph/hedera-services</url>
  </ciManagement>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/hashgraph/hedera-services/issues</url>
  </issueManagement>

  <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>

    <licenses>
      <license>
        <distribution>repo</distribution>
        <name>Apache License 2.0</name>
        <url>https://github.com/hashgraph/hedera-services/blob/master/LICENSE</url>
      </license>
    </licenses>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- Plugin property overrides -->
    <maven.compiler.source>12</maven.compiler.source>
    <maven.compiler.target>12</maven.compiler.target>

    <!-- Plugin custom properties -->
    <maven-jar.version>3.2.0</maven-jar.version>
    <maven-source.version>3.2.0</maven-source.version>
    <maven-license.version>2.0.0</maven-license.version>
    <maven-compiler.version>3.8.1</maven-compiler.version>
    <maven-surefire.version>3.0.0-M5</maven-surefire.version>
    <maven-dependency.version>3.1.1</maven-dependency.version>
    <maven-versions.version>2.8.1</maven-versions.version>
    <commons-io.version>2.1</commons-io.version>

    <!-- Dependency properties -->
    <commons-codec.version>1.11</commons-codec.version>
    <eddsa.version>0.3.0</eddsa.version>
    <grpc.version>1.33.0</grpc.version>
    <jackson-databind.version>2.9.10.5</jackson-databind.version>
    <javax.annotation-api.version>1.3.2</javax.annotation-api.version>
    <log4j.version>2.13.2</log4j.version>
    <netty.version>4.1.51.Final</netty.version>
    <!-- Test dependency properties -->
    <hamcrest-all.version>1.3</hamcrest-all.version>
    <junit.version>4.12</junit.version>
    <junit.jupiter.version>5.4.2</junit.jupiter.version>
    <junit.vintage.version>5.4.2</junit.vintage.version>
    <junit.platform.version>1.4.2</junit.platform.version>
    <mockito-junit-jupiter.version>3.3.0</mockito-junit-jupiter.version>
    <mockito2.version>3.3.0</mockito2.version>

    <!-- SonarCloud properties -->
    <jacoco.version>0.8.5</jacoco.version>
    <sonar.version>3.7.0.1746</sonar.version>

    <sonar.organization>hashgraph</sonar.organization>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    <sonar.language>java</sonar.language>
    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<!--    <project.build.outputTimestamp>2020-10-06T08:00:00Z</project.build.outputTimestamp>-->
  </properties>

  <modules>
    <module>hapi-proto</module>
    <module>hapi-fees</module>
    <module>hedera-node</module>
    <module>test-clients</module>
  </modules>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.0.0-M1</version>
        <configuration>
          <releaseProfiles>release</releaseProfiles>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <tagNameFormat>v@{project.version}</tagNameFormat>
          <scmDevelopmentCommitComment>
            @{prefix} Prepare for next dev iteration

${git.signoff}
          </scmDevelopmentCommitComment>
          <scmReleaseCommitComment>
            @{prefix} Prepare release

${git.signoff}
          </scmReleaseCommitComment>
          <scmBranchCommitComment>
            @{prefix} Create release branch

${git.signoff}
          </scmBranchCommitComment>
          <preparationGoals>
            clean 
            license:update-file-header 
            exec:exec@gen-proto-docs
            exec:exec@ensure-proto-headers
            verify
            exec:exec@stage-changes
          </preparationGoals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>stage-changes</id>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>/bin/sh</executable>
              <commandlineArgs>
                -c 'echo "Nothing to do here."'
              </commandlineArgs>
            </configuration>
          </execution>
          <execution>
            <id>gen-proto-docs</id>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>/bin/sh</executable>
              <commandlineArgs>
                -c 'hapi-proto/gen-proto-docs.sh'
              </commandlineArgs>
            </configuration>
          </execution>
          <execution>
            <id>ensure-proto-headers</id>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>/bin/sh</executable>
              <commandlineArgs>
                -c 'hapi-proto/add-copyright.sh'
              </commandlineArgs>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.sonarsource.scanner.maven</groupId>
        <artifactId>sonar-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>jacoco-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>jacoco-report</id>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <!-- To re-generate the LICENSE.txt and copyright headers, execute the Maven goals
          "license:update-project-license" and "license:update-file-header". -->
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${maven-license.version}</version>
          <configuration>
            <dryRun>false</dryRun>
            <canUpdateDescription>false</canUpdateDescription>
            <canUpdateCopyright>false</canUpdateCopyright>
            <includes>
              <include>**/*.java</include>
            </includes>
            <licenseName>apache_v2</licenseName>
            <roots>
              <root>src/main/java</root>
              <root>src/test/java</root>
            </roots>
            <processEndTag>‍</processEndTag>
            <processStartTag>‌</processStartTag>
            <sectionDelimiter>​</sectionDelimiter>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${maven-dependency.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire.version}</version>
          <configuration>
            <argLine>@{argLine} -Xmx2048m</argLine>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>${maven-versions.version}</version>
        </plugin>
        <plugin>
          <groupId>org.sonarsource.scanner.maven</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>${sonar.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>${log4j.version}</version>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-1.2-api</artifactId>
      <version>${log4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>${log4j.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>${commons-codec.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commons-io.version}</version>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-netty</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-core</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-protobuf</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-stub</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-testing</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>${netty.version}</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-transport</artifactId>
        <version>${netty.version}</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-common</artifactId>
        <version>${netty.version}</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-transport-native-epoll</artifactId>
        <version>${netty.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson-databind.version}</version>
      </dependency>
      <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>javax.annotation-api</artifactId>
        <version>${javax.annotation-api.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
      </dependency>
      <dependency>
        <groupId>net.i2p.crypto</groupId>
        <artifactId>eddsa</artifactId>
        <version>${eddsa.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
            </configuration>
            <executions>
              <execution>
                <phase>deploy</phase>
                <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>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>deploy</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <executions>
              <execution>
                <id>default-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <skipStaging>false</skipStaging>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
