<?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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.google.cloud.tools</groupId>
    <artifactId>dependencies-parent</artifactId>
    <version>1.5.13</version>
  </parent>

  <artifactId>linkage-checker-enforcer-rules</artifactId>

  <name>Linkage Checker Enforcer Rule</name>
  <description>Maven Enforcer rule for verifying that a project does not have linkage errors</description>
  <url>https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/Linkage-Checker-Enforcer-Rule</url>
  <organization>
    <name>Google LLC.</name>
    <url>https://www.google.com</url>
  </organization>
  <inceptionYear>2019</inceptionYear>
  <developers>
    <developer>
      <name>Elliotte Rusty Harold</name>
    </developer>
    <developer>
      <name>Tomo Suzuki</name>
    </developer>
  </developers>

  <!-- Environment Settings -->
  <issueManagement>
    <url>https://github.com/GoogleCloudPlatform/cloud-opensource-java/issues</url>
  </issueManagement>
  <scm>
    <connection>scm:git:git@github.com:GoogleCloudPlatform/cloud-opensource-java.git</connection>
    <developerConnection>scm:git:git@github.com:GoogleCloudPlatform/cloud-opensource-java.git
    </developerConnection>
    <url>https://github.com/GoogleCloudPlatform/cloud-opensource-java/tree/master/enforcer-rules</url>
    <tag>HEAD</tag>
  </scm>

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

  <properties>
    <enforcer.version>3.0.0-M3</enforcer.version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- To avoid plexus-util version conflict (#803) -->
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven</artifactId>
        <version>${maven.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>dependencies</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.enforcer</groupId>
      <artifactId>enforcer-api</artifactId>
      <version>${enforcer.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.enforcer</groupId>
      <artifactId>enforcer-rules</artifactId>
      <version>${enforcer.version}</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <!-- To avoid NoSuchMethodError org.eclipse.aether.util.ConfigUtils.getFloat -->
          <groupId>org.eclipse.aether</groupId>
          <artifactId>aether-util</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <!-- This dependency is not required for build but useful for debugging with source code -->
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-enforcer-plugin</artifactId>
      <version>${enforcer.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.resolver</groupId>
      <artifactId>maven-resolver-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>3.2.2</version>
        <configuration>
          <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
          <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
          <postBuildHookScript>verify</postBuildHookScript>
        </configuration>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
