mirror of
https://github.com/google/guava.git
synced 2026-10-28 16:47:30 +08:00
This [just came up again](https://github.com/google/guava/issues/8650#issuecomment-5510207112). It is a better solution to https://github.com/google/guava/issues/2193 than https://github.com/google/guava/pull/8127 was. (I think it makes sense for `gradle_integration_tests.sh` to continue using `install` so that the Maven-produced artifacts become visible to Gradle. But I haven't tested.) Sadly, it's still not enough for `mvn compile` to work: ``` [ERROR] Failed to execute goal on project guava-gwt: Could not resolve dependencies for project com.google.guava:guava-gwt:jar:999.0.0-HEAD-jre-SNAPSHOT [ERROR] dependency: com.google.guava:guava-testlib:jar:tests:999.0.0-HEAD-jre-SNAPSHOT (test) [ERROR] Could not find artifact com.google.guava:guava-testlib:jar:tests:999.0.0-HEAD-jre-SNAPSHOT [ERROR] dependency: com.google.guava:guava-tests:jar:tests:999.0.0-HEAD-jre-SNAPSHOT (test) [ERROR] Could not find artifact com.google.guava:guava-tests:jar:tests:999.0.0-HEAD-jre-SNAPSHOT ``` (For all testing of such changes, it's necessary to delete/move `~/.m2/repository/com/google/guava` so that Maven doesn't just read from previous builds that are installed there—thanks to our habit of using `mvn install` instead of `mvn package`!) RELNOTES=n/a PiperOrigin-RevId: 976459357
151 lines
5.1 KiB
XML
151 lines
5.1 KiB
XML
<?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>999.0.0-HEAD-jre-SNAPSHOT</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>${jsr305.version}</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>com.google.guava</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>${junit.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.testparameterinjector</groupId>
|
|
<artifactId>test-parameter-injector</artifactId>
|
|
<version>${test-parameter-injector.version}</version>
|
|
<scope>test</scope>
|
|
</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">
|
|
<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>
|
|
<goals><goal>test-jar-no-fork</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>
|