<?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>
  <parent>
    <groupId>com.google.guava</groupId>
    <artifactId>guava-parent</artifactId>
    <version>33.4.6-jre</version>
  </parent>
  <artifactId>guava-testlib</artifactId>
  <name>Guava Testing Library</name>
  <description>
    Guava testlib is a set of java classes used for more convenient
    unit testing - particularly to assist the tests for Guava itself.
  </description>
  <dependencies>
    <dependency>
      <groupId>org.jspecify</groupId>
      <artifactId>jspecify</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.errorprone</groupId>
      <artifactId>error_prone_annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.j2objc</groupId>
      <artifactId>j2objc-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>guava</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <!-- *not* <scope>test</scope>; <scope>compile</scope> is right so that guava-testlib users get junit transitively. -->
      <version>4.13.2</version>
    </dependency>
    <dependency>
      <!--
      Do not include Truth in non-test scope! Doing so creates a problematic dependency cycle.
      -->
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <version>${truth.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <!-- use the guava we're building. -->
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.mvnsearch</groupId>
        <artifactId>toolchains-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-toolchains-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>default-compile</id>
            <configuration>
              <compilerArgs combine.children="append" combine.self="append">
                <arg>-XDignore.symbol.file</arg>
              </compilerArgs>
            </configuration>
          </execution>
          <execution>
            <id>compile-java9</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <release>9</release>
              <compileSourceRoots>
                <compileSourceRoot>${project.basedir}/src</compileSourceRoot>
              </compileSourceRoots>

              <!--
                JPMS needs access to the module sources to complete a modular Java build. We also need to override
                the base compiler settings (in the root `pom.xml`) to enable MRJAR output.
              -->
              <compilerArgs combine.self="override">
                <arg>-sourcepath</arg>
                <arg>${project.basedir}/src</arg>
                <arg>--add-reads=com.google.common=ALL-UNNAMED</arg>
                <arg>--add-reads=com.google.common.testlib=ALL-UNNAMED</arg>
                <!-- https://errorprone.info/docs/installation#maven -->
                <arg>-XDcompilePolicy=simple</arg>
                <arg>-Xlint:-removal</arg>
                <arg>-Xlint:-options</arg>
              </compilerArgs>
              <multiReleaseOutput>true</multiReleaseOutput>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-test-sources</id>
            <phase>post-integration-test</phase>
            <goals><goal>test-jar</goal></goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>create-test-jar</id>
            <goals><goal>test-jar</goal></goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>
