<?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">
  <packaging>pom</packaging>
  <modelVersion>4.0.0</modelVersion>

  <groupId>io.prometheus</groupId>
  <artifactId>client_java_parent</artifactId>
  <version>1.3.8</version>

  <name>Prometheus Metrics Library Parent</name>
  <url>http://github.com/prometheus/client_java</url>
  <description>
    The Prometheus Java Metrics Library Parent
  </description>

  <properties>
    <checkstyle.skip>true</checkstyle.skip>
    <coverage.skip>true</coverage.skip>
    <spotless.skip>true</spotless.skip>
    <javadoc.skip>true</javadoc.skip>
  </properties>

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

  <scm>
    <connection>scm:git:git@github.com:prometheus/client_java.git</connection>
    <developerConnection>scm:git:git@github.com:prometheus/client_java.git</developerConnection>
    <url>git@github.com:prometheus/client_java.git</url>
    <tag>HEAD</tag>
  </scm>

  <developers>
    <developer>
      <id>fstab</id>
      <name>Fabian Stäber</name>
      <email>fabian@fstab.de</email>
    </developer>
    <developer>
      <id>zeitlinger</id>
      <name>Gregor Zeitlinger</name>
      <email>gregor.zeitlinger@grafana.com</email>
    </developer>
    <developer>
      <id>dhoard</id>
      <name>Doug Hoard</name>
      <email>doug.hoard@gmail.com</email>
    </developer>
  </developers>

  <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>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>2.44.4</version>
        <configuration>
          <java>
            <googleJavaFormat/>
          </java>
          <skip>${spotless.skip}</skip>
        </configuration>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.7</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <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-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.7.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>ossrh</publishingServerId>
              <autoPublish>true</autoPublish>
              <waitUntil>published</waitUntil>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
