aboutsummaryrefslogtreecommitdiff
path: root/pom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml222
1 files changed, 108 insertions, 114 deletions
diff --git a/pom.xml b/pom.xml
index a105364c..ac06274b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,11 +4,6 @@
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>org.sonatype.oss</groupId>
- <artifactId>oss-parent</artifactId>
- <version>7</version>
- </parent>
<groupId>com.google.truth</groupId>
<artifactId>truth-parent</artifactId>
<version>HEAD-SNAPSHOT</version>
@@ -18,18 +13,14 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <!-- Properties for plugins for which pluginManagement hasn't been working for us. -->
- <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
- <maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
-
<!-- Properties for multiple-artifact deps. -->
- <auto-value.version>1.8.1</auto-value.version>
+ <auto-value.version>1.10.1</auto-value.version>
<!--
We have a separate property for each flavor of Guava (instead of a shared
version without the -android and -jre suffixes) because that lets
Dependabot update our Guava versions.
-->
- <guava.android.version>30.1.1-android</guava.android.version>
+ <guava.android.version>32.0.1-android</guava.android.version>
<!--
Also, we have this comment in between the 2 flavors of Guava. That's
also to smooth the Dependabot update process: Dependabot generates a
@@ -37,15 +28,18 @@
time, one gets submitted before the other, and
the other ends up with a merge conflict. That requires reapprovals.
-->
- <guava.jre.version>30.1.1-jre</guava.jre.version>
+ <guava.jre.version>32.0.0-jre</guava.jre.version>
<gwt.version>2.9.0</gwt.version>
- <protobuf.version>3.15.8</protobuf.version>
+ <protobuf.version>3.23.2</protobuf.version>
<!-- Property for protobuf-lite protocArtifact, which isn't a "normal" Maven dep. -->
<!-- TODO(cpovirk): Use protobuf.version instead. But that requires finding the new way to request the Lite runtime. -->
<protobuf-lite.protoc.version>3.1.0</protobuf-lite.protoc.version>
<!-- Property for an extension, since Maven doesn't have extensionManagement. -->
- <os-maven-plugin.version>1.7.0</os-maven-plugin.version>
+ <os-maven-plugin.version>1.7.1</os-maven-plugin.version>
+
+ <!-- Default to no additional options (for Java 8). Overridden by a profile. -->
+ <conditionalJavadoc9PlusOptions></conditionalJavadoc9PlusOptions>
</properties>
<dependencyManagement>
<dependencies>
@@ -79,7 +73,7 @@
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
- <version>3.13.0</version>
+ <version>3.35.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -107,20 +101,9 @@
<version>${guava.android.version}</version>
</dependency>
<dependency>
- <groupId>com.google.testing.compile</groupId>
- <artifactId>compile-testing</artifactId>
- <version>0.19</version>
- <exclusions>
- <exclusion>
- <groupId>com.google.truth</groupId>
- <artifactId>truth</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
- <version>2.6.0</version>
+ <version>2.19.1</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
@@ -135,12 +118,12 @@
<dependency>
<groupId>com.google.re2j</groupId>
<artifactId>re2j</artifactId>
- <version>1.6</version>
+ <version>1.7</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
- <version>9.1</version>
+ <version>9.5</version>
</dependency>
<dependency>
<groupId>com.google.jsinterop</groupId>
@@ -217,6 +200,18 @@
<connection>scm:git:git@github.com:google/truth.git</connection>
<url>scm:git:git@github.com:google/truth.git</url>
</scm>
+ <distributionManagement>
+ <snapshotRepository>
+ <id>sonatype-nexus-snapshots</id>
+ <name>Sonatype Nexus Snapshots</name>
+ <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
+ </snapshotRepository>
+ <repository>
+ <id>sonatype-nexus-staging</id>
+ <name>Nexus Release Repository</name>
+ <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+ </repository>
+ </distributionManagement>
<build>
<pluginManagement>
<plugins>
@@ -224,24 +219,20 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
- <version>3.9.1</version>
+ <version>3.12.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
- <version>3.1.2</version>
+ <version>3.4.5</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>${maven-javadoc-plugin.version}</version>
+ <version>3.5.0</version>
<configuration>
<additionalOptions>
- <additionalOption>--frames</additionalOption>
- <additionalOption>-Xdoclint:-html</additionalOption>
+ <additionalOption>-Xdoclint:-html ${conditionalJavadoc9PlusOptions}</additionalOption>
</additionalOptions>
- <additionalJOptions>
- <additionalJOption>--no-module-directories</additionalJOption>
- </additionalJOptions>
<doctitle>Truth ${project.version}</doctitle>
<windowtitle>Truth ${project.version}</windowtitle>
<quiet>true</quiet>
@@ -254,11 +245,10 @@
<links>
<!-- TODO(cpovirk): Link to the version that we depend on? -->
<link>https://guava.dev/releases/snapshot-jre/api/docs</link>
- <link>https://developers.google.com/protocol-buffers/docs/reference/java</link>
+ <link>https://protobuf.dev/reference/java/api-docs/</link>
<link>https://junit.org/junit4/javadoc/latest/</link>
<link>https://docs.oracle.com/javase/7/docs/api/</link>
</links>
- <source>8</source>
<sourceFileExcludes>
<sourceFileExclude>**/super/**/*.java</sourceFileExclude>
</sourceFileExcludes>
@@ -266,12 +256,12 @@
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
- <version>3.2.0</version> <!-- work around ubuntu bug -->
+ <version>3.3.0</version> <!-- work around ubuntu bug -->
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
- <version>1.20</version>
+ <version>1.23</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
@@ -291,61 +281,32 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.1</version>
+ <version>3.11.0</version>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
- <testSource>1.8</testSource>
- <testTarget>1.8</testTarget>
+ <source>1.8</source>
+ <target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
- <version>3.2.1</version>
+ <version>3.3.0</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.22.2</version>
+ <version>3.1.2</version>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
- <version>${maven-enforcer-plugin.version}</version>
+ <version>3.3.0</version>
<executions>
<execution>
<id>enforce</id>
<configuration>
<rules>
- <!--
- Perhaps surprisingly, requireUpperBoundDeps catches problems
- that dependencyConvergence does not: If we use
- dependencyManagement to force Maven to use an *old* version
- of a dependency, that will satisfy dependencyConvergence
- (because the version is now consistent), but it will not
- satisfy requireUpperBoundDeps, which apparently still sees
- the original request for the newer version.
- requireUpperBoundDeps's behavior is probably a good thing.
-
- But, in what seems like a bug, dependencyConvergence catches
- certain upper-bound problems that requireUpperBoundDeps does
- not. To be clear, it's usually *not* a bug for
- dependencyConvergence to give an error when
- requireUpperBoundDeps does not: dependencyConvergence is in
- some ways a stricter test than requireUpperBoundDeps. What
- I'm seeing here is weirder: When I changed liteproto to
- request checker-compat-qual 2.1.0 and
- error_prone_annotations 2.0.9, both older versions than
- those inherited through core Truth, dependencyConvergence
- flagged both as expected, but requireUpperBoundDeps flagged
- only error_prone_annotations. The reason for this may have
- something to do with guava-25.1-android's dependency on the
- even older checker-compat-qual 2.0.0: When I updated Truth
- to depend on guava-26.0, which depends on
- checker-compat-qual 2.5.3, then requireUpperBoundDeps
- detected the problem.
-
- I filed a bug against Maven:
- https://issues.apache.org/jira/browse/MENFORCER-316
- -->
<requireUpperBoundDeps>
<excludes>
<!-- We have some deps on guava-android and others on guava-jre. -->
@@ -353,19 +314,9 @@
</excludes>
</requireUpperBoundDeps>
<!--
- This should be a no-op for us, since we try to list
- everything in dependencyManagement. But it should at least
- make sure that we do remember to put new deps into
- dependencyManagement. It might also flag conflicts that
- exist only in transitive dependencies. If that becomes too
- much of a pain, we can back this check out.
- -->
- <dependencyConvergence />
- <!--
- Note that neither of these rules would catch a conflict
- between, say, java8 and liteproto, since no Truth module
- depends on both of those. If we wanted, we could create
- such a module.
+ Note that this rule would not catch a conflict between, say,
+ java8 and liteproto, since no Truth module depends on both
+ of those. If we wanted, we could create such a module.
-->
</rules>
</configuration>
@@ -387,26 +338,69 @@
</plugin>
</plugins>
</pluginManagement>
- <plugins>
- <!--
- Force a version >2.7 for this parent project. If we use the current
- default of 2.7, Maven ignores this parent project's configuration when
- running maven-javadoc-plugin in children during releases.
- -->
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>${maven-javadoc-plugin.version}</version>
- </plugin>
- <!--
- Similar. Without this, Maven tries to run maven-enforcer-plugin 1.0,
- and it fails to construct an instance of the rule class, apparently
- because of a mismatch between the new Maven APIs and the old Enforcer
- APIs.
- -->
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>${maven-enforcer-plugin.version}</version>
- </plugin>
- </plugins>
</build>
+ <profiles>
+ <profile>
+ <id>sonatype-oss-release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>verify</phase>
+ <goals><goal>sign</goal></goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals><goal>jar</goal></goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-docs</id>
+ <goals><goal>jar</goal></goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <!--
+ Passes JDK 11-12-specific `no-module-directories` flag to Javadoc tool,
+ which is required to make symbol search work correctly in the generated
+ pages.
+
+ This flag does not exist on 9-10 and 13+ (https://bugs.openjdk.java.net/browse/JDK-8215582).
+
+ Consider removing it once our release and test scripts are migrated to a recent JDK (17+).
+ -->
+ <id>javadocs-jdk11-12</id>
+ <activation>
+ <jdk>[11,13)</jdk>
+ </activation>
+ <properties>
+ <maven-javadoc-plugin.additionalJOptions>--no-module-directories</maven-javadoc-plugin.additionalJOptions>
+ </properties>
+ </profile>
+ <profile>
+ <id>javadocs-jdk9plus</id>
+ <activation>
+ <jdk>[9,)</jdk>
+ </activation>
+ <properties>
+ <conditionalJavadocOptions>--frames</conditionalJavadocOptions>
+ </properties>
+ </profile>
+ </profiles>
</project>