<?xml version="1.0"?>
<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>com.google.http-client</groupId>
  <artifactId>google-http-client-bom</artifactId>
  <version>1.46.1</version><!-- {x-version-update:google-http-client-bom:current} -->
  <packaging>pom</packaging>

  <name>Google HTTP Client Library for Java BOM</name>
  <url>https://github.com/googleapis/google-http-java-client/tree/master/google-http-client-bom</url>
  <description>
    BOM for Google HTTP Client Library for Java
  </description>

  <organization>
    <name>Google LLC</name>
  </organization>

  <developers>
    <developer>
      <id>chingor13</id>
      <name>Jeff Ching</name>
      <email>chingor@google.com</email>
      <organization>Google LLC</organization>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/googleapis/google-http-java-client.git</connection>
    <developerConnection>scm:git:git@github.com:googleapis/google-http-java-client.git</developerConnection>
    <url>https://github.com/googleapis/google-http-java-client</url>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <url>https://google.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>https://google.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <site>
      <id>github-pages-site</id>
      <name>Deployment through GitHub's site deployment plugin</name>
      <url>site/google-cloud-bom</url>
    </site>
  </distributionManagement>

  <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>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client</artifactId>
        <version>1.46.1</version><!-- {x-version-update:google-http-client:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-android</artifactId>
        <version>1.46.1</version><!-- {x-version-update:google-http-client-android:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-apache-v2</artifactId>
        <version>1.46.1</version><!-- {x-version-update:google-http-client-apache-v2:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-apache-v5</artifactId>
        <version>1.46.1</version><!-- {x-version-update:google-http-client-apache-v5:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-appengine</artifactId>
        <version>1.46.1</version><!-- {x-version-update:google-http-client-appengine:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-findbugs</artifactId>
        <version>1.46.1</version><!-- {x-version-update:google-http-client-findbugs:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-gson</artifactId>
        <version>1.46.1</version><!-- {x-version-update:google-http-client-gson:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-jackson2</artifactId>
        <version>1.46.1</version><!-- {x-version-update:google-http-client-jackson2:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-protobuf</artifactId>
        <version>1.46.1</version><!-- {x-version-update:google-http-client-protobuf:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-test</artifactId>
        <version>1.46.1</version><!-- {x-version-update:google-http-client-test:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-xml</artifactId>
        <version>1.46.1</version><!-- {x-version-update:google-http-client-xml:current} -->
      </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>sonatype-nexus-staging</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.coveo</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>2.13</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>
