<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.ibm.cloud</groupId>
  <artifactId>ibm-key-protect-sdk</artifactId>
  <version>0.1.0</version>
  <packaging>jar</packaging>

  <name>IBM Cloud Key Protect Java SDK</name>
  <description>Java Client Library to access the IBM Cloud Key Protect</description>
  <url>https://github.com/IBM/keyprotect-java-client</url>

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

  <organization>
    <name>IBM Cloud</name>
  </organization>

  <developers>
    <developer>
      <name>Mathew Odden</name>
      <email>mrodden@us.ibm.com</email>
      <url>https://github.com/mrodden</url>
    </developer>
    <developer>
      <name>Varinder Singh</name>
      <email>varinder.singh.grewal@ibm.com</email>
      <url>https://www.ibm.com/</url>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/IBM/keyprotect-java-client.git</connection>
    <developerConnection>scm:git:https://github.com/IBM/keyprotect-java-client.git</developerConnection>
    <url>https://github.com/IBM/keyprotect-java-client</url>
  </scm>

  <issueManagement>
    <system>Github</system>
    <url>https://github.com/IBM/keyprotect-java-client/issues</url>
  </issueManagement>

  <ciManagement>
    <system>Travis-CI</system>
    <url>https://travis.ibm.com/IBM/keyprotect-java-client</url>
  </ciManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <git-repository-name>keyprotect-java-client</git-repository-name>

    <!-- version props -->
    <sdk-core-version>8.3.0</sdk-core-version>
    <testng-version>7.1.0</testng-version>
    <okhttp3-version>3.13.1</okhttp3-version>
    <surefire-version>3.0.0-M3</surefire-version>
    <maven-deploy-plugin-version>3.0.0-M1</maven-deploy-plugin-version>
    <maven-source-plugin-version>3.1.0</maven-source-plugin-version>
    <maven-jar-plugin-version>3.2.0</maven-jar-plugin-version>
    <maven-javadoc-plugin-version>3.1.1</maven-javadoc-plugin-version>
    <maven-compiler-plugin-version>3.8.1</maven-compiler-plugin-version>
    <maven-site-plugin-version>3.7.1</maven-site-plugin-version>
    <maven-checkstyle-plugin-version>3.1.0</maven-checkstyle-plugin-version>
    <maven-failsafe-plugin-version>3.0.0-M4</maven-failsafe-plugin-version>
    <maven-buildnumber-plugin-version>1.4</maven-buildnumber-plugin-version>
    <powermock-version>2.0.5</powermock-version>
    <mockito-version>3.2.4</mockito-version>
  </properties>

  <dependencies>
    <!-- This is the Java core dependency -->
    <dependency>
      <groupId>com.ibm.cloud</groupId>
      <artifactId>sdk-core</artifactId>
      <version>8.3.0</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.8.6</version>
    </dependency>
    <!-- TestNG is used to run unit/integration tests -->
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>${testng-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
      <version>${okhttp3-version}</version>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>mockwebserver</artifactId>
      <version>${okhttp3-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito2</artifactId>
      <version>${powermock-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-testng</artifactId>
      <version>${powermock-version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin-version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin-version}</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin-version}</version>
          <configuration>
            <quiet>true</quiet>
          </configuration>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin-version}</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven-site-plugin-version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven-checkstyle-plugin-version}</version>
          <executions>
            <execution>
              <id>verify-style</id>
              <phase>test</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <failsOnError>true</failsOnError>
            <configLocation>checkstyle.xml</configLocation>
            <consoleOutput>true</consoleOutput>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven-failsafe-plugin-version}</version>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <skipITs>${skipITs}</skipITs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>buildnumber-maven-plugin</artifactId>
          <version>${maven-buildnumber-plugin-version}</version>
          <executions>
            <execution>
              <phase>validate</phase>
              <goals>
                <goal>create</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
            <shortRevisionLength>8</shortRevisionLength>
            <timestampFormat>{0,date,yyyyMMdd-HHmmss}</timestampFormat>
            <attach>true</attach>
            <addOutputDirectoryToResources>true</addOutputDirectoryToResources>
            <doCheck>false</doCheck>
            <doUpdate>false</doUpdate>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin-version}</version>
          <configuration>
            <archive>
              <manifestEntries>
                <Build-Time>${maven.build.timestamp}</Build-Time>
              </manifestEntries>
              <manifestSections>
                <manifestSection>
                  <name>Implementation</name>
                  <manifestEntries>
                    <Implementation-Title>${project.name}</Implementation-Title>
                    <Implementation-Vendor>IBM Corporation</Implementation-Vendor>
                    <Implementation-Version>${project.version}</Implementation-Version>
                    <Implementation-SCM-Revision>${buildNumber}</Implementation-SCM-Revision>
                    <Implementation-SCM-Branch>${scmBranch}</Implementation-SCM-Branch>
                  </manifestEntries>
                </manifestSection>
              </manifestSections>
            </archive>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <!-- Disable default maven-deploy-plugin -->
      <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>false</autoReleaseAfterClose>
				</configuration>
			</plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <show>public</show>
          <doctitle>${project.name}, version ${project.version}</doctitle>
          <footer>IBM Corporation</footer>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.2</version>
      </plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.5</version>
        <!--
        <configuration>
          <gpgArguments>
            <arg>pinentry loopback</arg>
          </gpgArguments>
        </configuration>
        -->
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

    </plugins>
  </build>

</project>
