<?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.52.0</version><!-- {x-version-update:google-auth-library-bom:current} -->
  <packaging>pom</packaging>

  <parent>
    <groupId>com.google.cloud</groupId>
    <artifactId>google-cloud-shared-config</artifactId>
    <!-- Do not depend on the version in this monorepo. It causes the publication order problem. --> 
    <version>1.17.0</version>
  </parent>

  <name>Google Auth Library for Java BOM</name>
  <description>
    BOM for Google Auth Library for Java
  </description>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.auth</groupId>
        <artifactId>google-auth-library-credentials</artifactId>
        <version>1.52.0</version><!-- {x-version-update:google-auth-library-parent:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.auth</groupId>
        <artifactId>google-auth-library-oauth2-http</artifactId>
        <version>1.52.0</version><!-- {x-version-update:google-auth-library-parent:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.auth</groupId>
        <artifactId>google-auth-library-appengine</artifactId>
        <version>1.52.0</version><!-- {x-version-update:google-auth-library-parent:current} -->
      </dependency>
      <dependency>
        <groupId>com.google.auth</groupId>
        <artifactId>google-auth-library-cab-token-generator</artifactId>
        <version>1.52.0</version><!-- {x-version-update:google-auth-library-parent:current} -->
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <!-- Temporary enforcer configuration override until a new version of google-cloud-shared-config is released to Maven Central.
           Because this module inherits a released version of google-cloud-shared-config from Central (which includes banDuplicateClasses in its default enforce execution),
           we override the enforce execution here to avoid running banDuplicateClasses on standard PRs where intra-repo SNAPSHOT JARs are unbuilt.
           Remove this override once the parent version is bumped to the newly released google-cloud-shared-config. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce</id>
            <configuration>
              <rules combine.self="override">
                <requireMavenVersion>
                  <version>[3.8.0,)</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[1.8,)</version>
                </requireJavaVersion>
                <requireUpperBoundDeps/>
              </rules>
            </configuration>
          </execution>
          <execution>
            <id>enforce-banned-duplicate-classes</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <banDuplicateClasses>
                  <scopes>
                    <scope>compile</scope>
                    <scope>provided</scope>
                  </scopes>
                  <findAllDuplicates>true</findAllDuplicates>
                  <ignoreWhenIdentical>true</ignoreWhenIdentical>
                </banDuplicateClasses>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
