• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<project
3    xmlns="http://maven.apache.org/POM/4.0.0"
4    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
6  <modelVersion>4.0.0</modelVersion>
7  <groupId>com.google.truth</groupId>
8  <artifactId>truth-parent</artifactId>
9  <version>HEAD-SNAPSHOT</version>
10  <packaging>pom</packaging>
11  <name>Truth (Parent)</name>
12  <properties>
13    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
15
16    <!-- Properties for multiple-artifact deps. -->
17    <auto-value.version>1.11.0</auto-value.version>
18    <!--
19      We have a separate property for each flavor of Guava (instead of a shared
20      version without the -android and -jre suffixes) because that lets
21      Dependabot update our Guava versions.
22    -->
23    <guava.android.version>33.2.1-android</guava.android.version>
24    <!--
25      Also, we have this comment in between the 2 flavors of Guava. That's
26      also to smooth the Dependabot update process: Dependabot generates a
27      separate PR for each flavor. Even if we approve both at the same
28      time, one gets submitted before the other, and
29      the other ends up with a merge conflict. That requires reapprovals.
30    -->
31    <guava.jre.version>33.2.1-jre</guava.jre.version>
32    <gwt.version>2.10.0</gwt.version>
33    <protobuf.version>4.27.2</protobuf.version>
34    <!-- Property for protobuf-lite protocArtifact, which isn't a "normal" Maven dep. -->
35    <!-- TODO(cpovirk): Use protobuf.version instead. But that requires finding the new way to request the Lite runtime. -->
36    <protobuf-lite.protoc.version>3.1.0</protobuf-lite.protoc.version>
37
38    <!-- Property for an extension, since Maven doesn't have extensionManagement. -->
39    <os-maven-plugin.version>1.7.1</os-maven-plugin.version>
40
41    <!-- Default to no additional options (for Java 8). Overridden by a profile. -->
42    <conditionalJavadoc9PlusOptions></conditionalJavadoc9PlusOptions>
43  </properties>
44  <dependencyManagement>
45    <dependencies>
46      <dependency>
47        <groupId>com.google.truth</groupId>
48        <artifactId>truth</artifactId>
49        <version>${project.version}</version>
50      </dependency>
51      <dependency>
52        <groupId>com.google.truth.extensions</groupId>
53        <artifactId>truth-liteproto-extension</artifactId>
54        <version>${project.version}</version>
55      </dependency>
56      <!--
57        We could add the other modules of Truth, but there's no need because no
58        modules depend on them yet.
59        -->
60      <dependency>
61        <!--
62          In addition to setting the version of Guava that's used when Truth
63          depends directly on com.google.common:guava, this section also
64          overrides the version that's pulled in transitively by guava-gwt
65          (which is a test-scope dependency of core Truth). The Guava APIs
66          "missing" in guava-android might cause us problems down the line if we
67          actually started to run nontrivial GWT tests; I'm not sure.
68          -->
69        <groupId>com.google.guava</groupId>
70        <artifactId>guava</artifactId>
71        <version>${guava.android.version}</version>
72      </dependency>
73      <dependency>
74        <groupId>org.jspecify</groupId>
75        <artifactId>jspecify</artifactId>
76        <version>0.3.0</version>
77      </dependency>
78      <dependency>
79        <groupId>junit</groupId>
80        <artifactId>junit</artifactId>
81        <version>4.13.2</version>
82      </dependency>
83      <dependency>
84        <groupId>org.gwtproject</groupId>
85        <artifactId>gwt-user</artifactId>
86        <version>${gwt.version}</version>
87      </dependency>
88      <dependency>
89        <groupId>com.google.auto.value</groupId>
90        <artifactId>auto-value-annotations</artifactId>
91        <version>${auto-value.version}</version>
92      </dependency>
93      <dependency>
94        <groupId>com.google.guava</groupId>
95        <artifactId>guava-gwt</artifactId>
96        <version>${guava.jre.version}</version>
97      </dependency>
98      <dependency>
99        <groupId>com.google.guava</groupId>
100        <artifactId>guava-testlib</artifactId>
101        <version>${guava.android.version}</version>
102      </dependency>
103      <dependency>
104        <groupId>com.google.errorprone</groupId>
105        <artifactId>error_prone_annotations</artifactId>
106        <version>2.28.0</version>
107      </dependency>
108      <dependency>
109        <groupId>com.google.protobuf</groupId>
110        <artifactId>protobuf-java</artifactId>
111        <version>${protobuf.version}</version>
112      </dependency>
113      <dependency>
114        <groupId>com.google.protobuf</groupId>
115        <artifactId>protobuf-lite</artifactId>
116        <version>3.0.1</version>
117      </dependency>
118      <dependency>
119        <groupId>com.google.re2j</groupId>
120        <artifactId>re2j</artifactId>
121        <version>1.7</version>
122      </dependency>
123      <dependency>
124        <groupId>org.ow2.asm</groupId>
125        <artifactId>asm</artifactId>
126        <version>9.7</version>
127      </dependency>
128      <dependency>
129        <groupId>com.google.jsinterop</groupId>
130        <artifactId>jsinterop-annotations</artifactId>
131        <version>2.0.0</version>
132      </dependency>
133    </dependencies>
134  </dependencyManagement>
135  <description>
136    Parent metadata for Truth, a Java assertion framework.
137  </description>
138  <modules>
139    <module>core</module>
140    <module>extensions</module>
141  </modules>
142  <prerequisites><maven>3.1.1</maven></prerequisites>
143  <developers>
144    <developer>
145      <id>cgruber</id>
146      <name>Christian Gruber</name>
147      <email>christianedwardgruber@gmail.com</email>
148      <url>http://www.geekinasuit.com/</url>
149      <roles>
150        <role>creator</role>
151        <role>developer</role>
152      </roles>
153      <timezone>-8</timezone>
154    </developer>
155    <developer>
156      <id>kak</id>
157      <name>Kurt Alfred Kluever</name>
158      <roles>
159        <role>evolver</role>
160        <role>developer</role>
161      </roles>
162      <timezone>-5</timezone>
163    </developer>
164    <developer>
165      <id>dsaff</id>
166      <name>David Saff</name>
167      <roles>
168        <role>creator</role>
169        <role>developer</role>
170      </roles>
171      <timezone>-5</timezone>
172    </developer>
173    <developer>
174      <id>hagbard</id>
175      <name>David B</name>
176      <roles>
177        <role>creator</role>
178        <role>developer</role>
179      </roles>
180      <timezone>+2</timezone>
181    </developer>
182  </developers>
183  <url>http://github.com/google/truth</url>
184  <licenses>
185    <license>
186      <name>The Apache Software License, Version 2.0</name>
187      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
188      <distribution>repo</distribution>
189    </license>
190  </licenses>
191  <issueManagement>
192    <system>Github</system>
193    <url>https://github.com/google/truth/issues</url>
194  </issueManagement>
195  <ciManagement>
196    <system>Jenkins</system>
197    <url>https://travis-ci.org/google/truth</url>
198  </ciManagement>
199  <scm>
200    <connection>scm:git:git@github.com:google/truth.git</connection>
201    <url>scm:git:git@github.com:google/truth.git</url>
202  </scm>
203  <distributionManagement>
204    <snapshotRepository>
205      <id>sonatype-nexus-snapshots</id>
206      <name>Sonatype Nexus Snapshots</name>
207      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
208    </snapshotRepository>
209    <repository>
210      <id>sonatype-nexus-staging</id>
211      <name>Nexus Release Repository</name>
212      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
213    </repository>
214  </distributionManagement>
215  <build>
216    <pluginManagement>
217      <plugins>
218        <!-- https://stackoverflow.com/a/51093732/28465 -->
219        <plugin>
220          <groupId>org.apache.maven.plugins</groupId>
221          <artifactId>maven-site-plugin</artifactId>
222          <version>3.12.1</version>
223        </plugin>
224        <plugin>
225          <groupId>org.apache.maven.plugins</groupId>
226          <artifactId>maven-project-info-reports-plugin</artifactId>
227          <version>3.6.1</version>
228        </plugin>
229        <plugin>
230          <artifactId>maven-javadoc-plugin</artifactId>
231          <version>3.7.0</version>
232          <configuration>
233            <additionalOptions>
234              <additionalOption>-Xdoclint:-html ${conditionalJavadoc9PlusOptions}</additionalOption>
235            </additionalOptions>
236            <doctitle>Truth ${project.version}</doctitle>
237            <windowtitle>Truth ${project.version}</windowtitle>
238            <quiet>true</quiet>
239            <notimestamp>true</notimestamp>
240            <encoding>UTF-8</encoding>
241            <docencoding>UTF-8</docencoding>
242            <charset>UTF-8</charset>
243            <overview>overview.html</overview>
244            <detectJavaApiLink>false</detectJavaApiLink>
245            <links>
246              <!-- TODO(cpovirk): Link to the version that we depend on? -->
247              <link>https://guava.dev/releases/snapshot-jre/api/docs</link>
248              <link>https://protobuf.dev/reference/java/api-docs/</link>
249              <link>https://junit.org/junit4/javadoc/latest/</link>
250              <link>https://docs.oracle.com/javase/7/docs/api/</link>
251            </links>
252            <sourceFileExcludes>
253              <sourceFileExclude>**/super/**/*.java</sourceFileExclude>
254            </sourceFileExcludes>
255          </configuration>
256        </plugin>
257        <plugin>
258          <artifactId>maven-jar-plugin</artifactId>
259          <version>3.4.2</version>
260        </plugin>
261        <plugin>
262          <groupId>org.codehaus.mojo</groupId>
263          <artifactId>animal-sniffer-maven-plugin</artifactId>
264          <version>1.24</version>
265          <configuration>
266            <annotations>com.google.common.truth.IgnoreJRERequirement</annotations>
267            <signature>
268              <groupId>com.toasttab.android</groupId>
269              <artifactId>gummy-bears-api-19</artifactId>
270              <version>0.6.1</version>
271              <!-- TODO(cpovirk): In principle, it would make sense to *also* test compatibility with JDK 1.8, since Truth also has JRE users. -->
272            </signature>
273          </configuration>
274          <executions>
275            <execution>
276              <id>check-java-version-compatibility</id>
277              <phase>test</phase>
278              <goals>
279                <goal>check</goal>
280              </goals>
281            </execution>
282          </executions>
283        </plugin>
284        <plugin>
285          <artifactId>maven-compiler-plugin</artifactId>
286          <version>3.13.0</version>
287          <configuration>
288            <source>1.8</source>
289            <target>1.8</target>
290            <parameters>true</parameters>
291          </configuration>
292        </plugin>
293        <plugin>
294          <artifactId>maven-source-plugin</artifactId>
295          <version>3.3.1</version>
296        </plugin>
297        <plugin>
298          <artifactId>maven-gpg-plugin</artifactId>
299          <version>3.2.4</version>
300        </plugin>
301        <plugin>
302          <artifactId>maven-surefire-plugin</artifactId>
303          <version>3.3.0</version>
304        </plugin>
305        <plugin>
306          <artifactId>maven-enforcer-plugin</artifactId>
307          <version>3.5.0</version>
308          <executions>
309            <execution>
310              <id>enforce</id>
311              <configuration>
312                <rules>
313                  <requireUpperBoundDeps>
314                    <excludes>
315                      <!-- We have some deps on guava-android and others on guava-jre. -->
316                      <exclude>com.google.guava:guava</exclude>
317                    </excludes>
318                  </requireUpperBoundDeps>
319                  <!--
320                    Note that this rule would not catch a conflict between, say,
321                    java8 and liteproto, since no Truth module depends on both
322                    of those. If we wanted, we could create such a module.
323                    -->
324                </rules>
325              </configuration>
326              <goals>
327                <goal>enforce</goal>
328              </goals>
329            </execution>
330          </executions>
331        </plugin>
332        <plugin>
333          <groupId>org.codehaus.mojo</groupId>
334          <artifactId>gwt-maven-plugin</artifactId>
335          <version>${gwt.version}</version>
336        </plugin>
337        <plugin>
338          <groupId>org.xolstice.maven.plugins</groupId>
339          <artifactId>protobuf-maven-plugin</artifactId>
340          <version>0.6.1</version>
341        </plugin>
342      </plugins>
343    </pluginManagement>
344  </build>
345  <profiles>
346    <profile>
347      <id>sonatype-oss-release</id>
348      <build>
349        <plugins>
350          <plugin>
351            <artifactId>maven-gpg-plugin</artifactId>
352            <executions>
353              <execution>
354                <id>sign-artifacts</id>
355                <phase>verify</phase>
356                <goals><goal>sign</goal></goals>
357              </execution>
358            </executions>
359          </plugin>
360          <plugin>
361            <artifactId>maven-source-plugin</artifactId>
362            <executions>
363              <execution>
364                <id>attach-sources</id>
365                <goals><goal>jar</goal></goals>
366              </execution>
367            </executions>
368          </plugin>
369          <plugin>
370            <artifactId>maven-javadoc-plugin</artifactId>
371            <executions>
372              <execution>
373                <id>attach-docs</id>
374                <goals><goal>jar</goal></goals>
375              </execution>
376            </executions>
377          </plugin>
378        </plugins>
379      </build>
380    </profile>
381    <profile>
382      <!--
383          Passes JDK 11-12-specific `no-module-directories` flag to Javadoc tool,
384          which is required to make symbol search work correctly in the generated
385          pages.
386
387          This flag does not exist on 9-10 and 13+ (https://bugs.openjdk.java.net/browse/JDK-8215582).
388
389          Consider removing it once our release and test scripts are migrated to a recent JDK (17+).
390       -->
391      <id>javadocs-jdk11-12</id>
392      <activation>
393        <jdk>[11,13)</jdk>
394      </activation>
395      <properties>
396        <maven-javadoc-plugin.additionalJOptions>--no-module-directories</maven-javadoc-plugin.additionalJOptions>
397      </properties>
398    </profile>
399    <profile>
400      <id>javadocs-jdk9plus</id>
401      <activation>
402        <jdk>[9,)</jdk>
403      </activation>
404      <properties>
405        <conditionalJavadocOptions>--frames</conditionalJavadocOptions>
406      </properties>
407    </profile>
408  </profiles>
409</project>
410