<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.google.auth</groupId>
  <artifactId>google-auth-library-bom</artifactId>
  <version>1.34.0</version><!-- {x-version-update:google-auth-library-bom:current} -->
  <packaging>pom</packaging>
  <name>Google Auth Library for Java BOM</name>
  <description>
    BOM for Google Auth Library for Java
  </description>
  <url>https://github.com/googleapis/google-auth-library-java</url>

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

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

  <organization>
    <name>Google</name>
    <url>http://www.google.com/</url>
  </organization>

  <scm>
    <connection>scm:git:https://github.com/googleapis/google-auth-library-java.git</connection>
    <developerConnection>scm:git:https://github.com/googleapis/google-auth-library-java.git</developerConnection>
    <url>https://github.com/googleapis/google-auth-library-java</url>
  </scm>

  <developers>
    <developer>
      <name>Jeff Ching</name>
      <email>chingor@google.com</email>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
  </developers>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.auth</groupId>
        <artifactId>google-auth-library-credentials</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.auth</groupId>
        <artifactId>google-auth-library-oauth2-http</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.auth</groupId>
        <artifactId>google-auth-library-appengine</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.auth</groupId>
        <artifactId>google-auth-library-cab-token-generator</artifactId>
        <version>${project.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.7.0</version>
          <extensions>true</extensions>
          <configuration>
            <serverId>ossrh</serverId>
            <nexusUrl>https://google.oss.sonatype.org/</nexusUrl>
            <autoReleaseAfterClose>false</autoReleaseAfterClose>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.11.2</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.21.0</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>

      <plugin>
        <groupId>com.spotify.fmt</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>2.25</version>
        <configuration>
          <verbose>true</verbose>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <!-- By default, we release artifacts to Sonatype, which requires
          nexus-staging-maven-plugin. -->
      <id>release-sonatype</id>
      <activation>
        <property>
          <!-- Only when we use the release-gcp-artifact-registry profile,
          which comes with artifact-registry-url property, this profile is
          turned off. -->
          <name>!artifact-registry-url</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- Optionally, we can publish the artifacts to GCP Artifact Registry specifying
          this release-gcp-artifact-registry profile:
          mvn deploy -P=release-gcp-artifact-registry -P=-release-sonatype \
              -Dartifact-registry-url=artifactregistry://us-maven.pkg.dev/...
          -->
      <id>release-gcp-artifact-registry</id>
      <properties>
        <artifact-registry-url>artifactregistry://undefined-artifact-registry-url-value</artifact-registry-url>
      </properties>
      <distributionManagement>
        <repository>
          <id>gcp-artifact-registry-repository</id>
          <url>${artifact-registry-url}</url>
        </repository>
        <snapshotRepository>
          <id>gcp-artifact-registry-repository</id>
          <url>${artifact-registry-url}</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <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>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
