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 <parent> 8 <groupId>org.sonatype.oss</groupId> 9 <artifactId>oss-parent</artifactId> 10 <version>7</version> 11 </parent> 12 <groupId>com.google.truth</groupId> 13 <artifactId>truth-parent</artifactId> 14 <version>HEAD-SNAPSHOT</version> 15 <packaging>pom</packaging> 16 <name>Truth (Parent)</name> 17 <properties> 18 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 19 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> 20 21 <!-- Properties for plugins for which pluginManagement hasn't been working for us. --> 22 <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version> 23 <maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version> 24 25 <!-- Properties for multiple-artifact deps. --> 26 <auto-value.version>1.8.1</auto-value.version> 27 <!-- 28 We have a separate property for each flavor of Guava (instead of a shared 29 version without the -android and -jre suffixes) because that lets 30 Dependabot update our Guava versions. 31 --> 32 <guava.android.version>30.1.1-android</guava.android.version> 33 <!-- 34 Also, we have this comment in between the 2 flavors of Guava. That's 35 also to smooth the Dependabot update process: Dependabot generates a 36 separate PR for each flavor. Even if we approve both at the same 37 time, one gets submitted before the other, and 38 the other ends up with a merge conflict. That requires reapprovals. 39 --> 40 <guava.jre.version>30.1.1-jre</guava.jre.version> 41 <gwt.version>2.9.0</gwt.version> 42 <protobuf.version>3.15.8</protobuf.version> 43 <!-- Property for protobuf-lite protocArtifact, which isn't a "normal" Maven dep. --> 44 <!-- TODO(cpovirk): Use protobuf.version instead. But that requires finding the new way to request the Lite runtime. --> 45 <protobuf-lite.protoc.version>3.1.0</protobuf-lite.protoc.version> 46 47 <!-- Property for an extension, since Maven doesn't have extensionManagement. --> 48 <os-maven-plugin.version>1.7.0</os-maven-plugin.version> 49 </properties> 50 <dependencyManagement> 51 <dependencies> 52 <dependency> 53 <groupId>com.google.truth</groupId> 54 <artifactId>truth</artifactId> 55 <version>${project.version}</version> 56 </dependency> 57 <dependency> 58 <groupId>com.google.truth.extensions</groupId> 59 <artifactId>truth-liteproto-extension</artifactId> 60 <version>${project.version}</version> 61 </dependency> 62 <!-- 63 We could add the other modules of Truth, but there's no need because no 64 modules depend on them yet. 65 --> 66 <dependency> 67 <!-- 68 In addition to setting the version of Guava that's used when Truth 69 depends directly on com.google.common:guava, this section also 70 overrides the version that's pulled in transitively by guava-gwt 71 (which is a test-scope dependency of core Truth). The Guava APIs 72 "missing" in guava-android might cause us problems down the line if we 73 actually started to run nontrivial GWT tests; I'm not sure. 74 --> 75 <groupId>com.google.guava</groupId> 76 <artifactId>guava</artifactId> 77 <version>${guava.android.version}</version> 78 </dependency> 79 <dependency> 80 <groupId>org.checkerframework</groupId> 81 <artifactId>checker-qual</artifactId> 82 <version>3.13.0</version> 83 </dependency> 84 <dependency> 85 <groupId>junit</groupId> 86 <artifactId>junit</artifactId> 87 <version>4.13.2</version> 88 </dependency> 89 <dependency> 90 <groupId>com.google.gwt</groupId> 91 <artifactId>gwt-user</artifactId> 92 <version>${gwt.version}</version> 93 </dependency> 94 <dependency> 95 <groupId>com.google.auto.value</groupId> 96 <artifactId>auto-value-annotations</artifactId> 97 <version>${auto-value.version}</version> 98 </dependency> 99 <dependency> 100 <groupId>com.google.guava</groupId> 101 <artifactId>guava-gwt</artifactId> 102 <version>${guava.jre.version}</version> 103 </dependency> 104 <dependency> 105 <groupId>com.google.guava</groupId> 106 <artifactId>guava-testlib</artifactId> 107 <version>${guava.android.version}</version> 108 </dependency> 109 <dependency> 110 <groupId>com.google.testing.compile</groupId> 111 <artifactId>compile-testing</artifactId> 112 <version>0.19</version> 113 <exclusions> 114 <exclusion> 115 <groupId>com.google.truth</groupId> 116 <artifactId>truth</artifactId> 117 </exclusion> 118 </exclusions> 119 </dependency> 120 <dependency> 121 <groupId>com.google.errorprone</groupId> 122 <artifactId>error_prone_annotations</artifactId> 123 <version>2.6.0</version> 124 </dependency> 125 <dependency> 126 <groupId>com.google.protobuf</groupId> 127 <artifactId>protobuf-java</artifactId> 128 <version>${protobuf.version}</version> 129 </dependency> 130 <dependency> 131 <groupId>com.google.protobuf</groupId> 132 <artifactId>protobuf-lite</artifactId> 133 <version>3.0.1</version> 134 </dependency> 135 <dependency> 136 <groupId>com.google.re2j</groupId> 137 <artifactId>re2j</artifactId> 138 <version>1.6</version> 139 </dependency> 140 <dependency> 141 <groupId>org.ow2.asm</groupId> 142 <artifactId>asm</artifactId> 143 <version>9.1</version> 144 </dependency> 145 <dependency> 146 <groupId>com.google.jsinterop</groupId> 147 <artifactId>jsinterop-annotations</artifactId> 148 <version>2.0.0</version> 149 </dependency> 150 </dependencies> 151 </dependencyManagement> 152 <description> 153 Parent metadata for Truth, a Java assertion framework. 154 </description> 155 <modules> 156 <module>core</module> 157 <module>extensions</module> 158 </modules> 159 <prerequisites><maven>3.1.1</maven></prerequisites> 160 <developers> 161 <developer> 162 <id>cgruber</id> 163 <name>Christian Gruber</name> 164 <email>christianedwardgruber@gmail.com</email> 165 <url>http://www.geekinasuit.com/</url> 166 <roles> 167 <role>creator</role> 168 <role>developer</role> 169 </roles> 170 <timezone>-8</timezone> 171 </developer> 172 <developer> 173 <id>kak</id> 174 <name>Kurt Alfred Kluever</name> 175 <roles> 176 <role>evolver</role> 177 <role>developer</role> 178 </roles> 179 <timezone>-5</timezone> 180 </developer> 181 <developer> 182 <id>dsaff</id> 183 <name>David Saff</name> 184 <roles> 185 <role>creator</role> 186 <role>developer</role> 187 </roles> 188 <timezone>-5</timezone> 189 </developer> 190 <developer> 191 <id>hagbard</id> 192 <name>David B</name> 193 <roles> 194 <role>creator</role> 195 <role>developer</role> 196 </roles> 197 <timezone>+2</timezone> 198 </developer> 199 </developers> 200 <url>http://github.com/google/truth</url> 201 <licenses> 202 <license> 203 <name>The Apache Software License, Version 2.0</name> 204 <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> 205 <distribution>repo</distribution> 206 </license> 207 </licenses> 208 <issueManagement> 209 <system>Github</system> 210 <url>https://github.com/google/truth/issues</url> 211 </issueManagement> 212 <ciManagement> 213 <system>Jenkins</system> 214 <url>https://travis-ci.org/google/truth</url> 215 </ciManagement> 216 <scm> 217 <connection>scm:git:git@github.com:google/truth.git</connection> 218 <url>scm:git:git@github.com:google/truth.git</url> 219 </scm> 220 <build> 221 <pluginManagement> 222 <plugins> 223 <!-- https://stackoverflow.com/a/51093732/28465 --> 224 <plugin> 225 <groupId>org.apache.maven.plugins</groupId> 226 <artifactId>maven-site-plugin</artifactId> 227 <version>3.9.1</version> 228 </plugin> 229 <plugin> 230 <groupId>org.apache.maven.plugins</groupId> 231 <artifactId>maven-project-info-reports-plugin</artifactId> 232 <version>3.1.2</version> 233 </plugin> 234 <plugin> 235 <artifactId>maven-javadoc-plugin</artifactId> 236 <version>${maven-javadoc-plugin.version}</version> 237 <configuration> 238 <additionalOptions> 239 <additionalOption>--frames</additionalOption> 240 <additionalOption>-Xdoclint:-html</additionalOption> 241 </additionalOptions> 242 <additionalJOptions> 243 <additionalJOption>--no-module-directories</additionalJOption> 244 </additionalJOptions> 245 <doctitle>Truth ${project.version}</doctitle> 246 <windowtitle>Truth ${project.version}</windowtitle> 247 <quiet>true</quiet> 248 <notimestamp>true</notimestamp> 249 <encoding>UTF-8</encoding> 250 <docencoding>UTF-8</docencoding> 251 <charset>UTF-8</charset> 252 <overview>overview.html</overview> 253 <detectJavaApiLink>false</detectJavaApiLink> 254 <links> 255 <!-- TODO(cpovirk): Link to the version that we depend on? --> 256 <link>https://guava.dev/releases/snapshot-jre/api/docs</link> 257 <link>https://developers.google.com/protocol-buffers/docs/reference/java</link> 258 <link>https://junit.org/junit4/javadoc/latest/</link> 259 <link>https://docs.oracle.com/javase/7/docs/api/</link> 260 </links> 261 <source>8</source> 262 <sourceFileExcludes> 263 <sourceFileExclude>**/super/**/*.java</sourceFileExclude> 264 </sourceFileExcludes> 265 </configuration> 266 </plugin> 267 <plugin> 268 <artifactId>maven-jar-plugin</artifactId> 269 <version>3.2.0</version> <!-- work around ubuntu bug --> 270 </plugin> 271 <plugin> 272 <groupId>org.codehaus.mojo</groupId> 273 <artifactId>animal-sniffer-maven-plugin</artifactId> 274 <version>1.20</version> 275 <configuration> 276 <signature> 277 <groupId>org.codehaus.mojo.signature</groupId> 278 <artifactId>java16-sun</artifactId> 279 <version>1.10</version> 280 </signature> 281 </configuration> 282 <executions> 283 <execution> 284 <id>check-java-version-compatibility</id> 285 <phase>test</phase> 286 <goals> 287 <goal>check</goal> 288 </goals> 289 </execution> 290 </executions> 291 </plugin> 292 <plugin> 293 <artifactId>maven-compiler-plugin</artifactId> 294 <version>3.8.1</version> 295 <configuration> 296 <source>1.7</source> 297 <target>1.7</target> 298 <testSource>1.8</testSource> 299 <testTarget>1.8</testTarget> 300 </configuration> 301 </plugin> 302 <plugin> 303 <artifactId>maven-source-plugin</artifactId> 304 <version>3.2.1</version> 305 </plugin> 306 <plugin> 307 <artifactId>maven-surefire-plugin</artifactId> 308 <version>2.22.2</version> 309 </plugin> 310 <plugin> 311 <artifactId>maven-enforcer-plugin</artifactId> 312 <version>${maven-enforcer-plugin.version}</version> 313 <executions> 314 <execution> 315 <id>enforce</id> 316 <configuration> 317 <rules> 318 <!-- 319 Perhaps surprisingly, requireUpperBoundDeps catches problems 320 that dependencyConvergence does not: If we use 321 dependencyManagement to force Maven to use an *old* version 322 of a dependency, that will satisfy dependencyConvergence 323 (because the version is now consistent), but it will not 324 satisfy requireUpperBoundDeps, which apparently still sees 325 the original request for the newer version. 326 requireUpperBoundDeps's behavior is probably a good thing. 327 328 But, in what seems like a bug, dependencyConvergence catches 329 certain upper-bound problems that requireUpperBoundDeps does 330 not. To be clear, it's usually *not* a bug for 331 dependencyConvergence to give an error when 332 requireUpperBoundDeps does not: dependencyConvergence is in 333 some ways a stricter test than requireUpperBoundDeps. What 334 I'm seeing here is weirder: When I changed liteproto to 335 request checker-compat-qual 2.1.0 and 336 error_prone_annotations 2.0.9, both older versions than 337 those inherited through core Truth, dependencyConvergence 338 flagged both as expected, but requireUpperBoundDeps flagged 339 only error_prone_annotations. The reason for this may have 340 something to do with guava-25.1-android's dependency on the 341 even older checker-compat-qual 2.0.0: When I updated Truth 342 to depend on guava-26.0, which depends on 343 checker-compat-qual 2.5.3, then requireUpperBoundDeps 344 detected the problem. 345 346 I filed a bug against Maven: 347 https://issues.apache.org/jira/browse/MENFORCER-316 348 --> 349 <requireUpperBoundDeps> 350 <excludes> 351 <!-- We have some deps on guava-android and others on guava-jre. --> 352 <exclude>com.google.guava:guava</exclude> 353 </excludes> 354 </requireUpperBoundDeps> 355 <!-- 356 This should be a no-op for us, since we try to list 357 everything in dependencyManagement. But it should at least 358 make sure that we do remember to put new deps into 359 dependencyManagement. It might also flag conflicts that 360 exist only in transitive dependencies. If that becomes too 361 much of a pain, we can back this check out. 362 --> 363 <dependencyConvergence /> 364 <!-- 365 Note that neither of these rules would catch a conflict 366 between, say, java8 and liteproto, since no Truth module 367 depends on both of those. If we wanted, we could create 368 such a module. 369 --> 370 </rules> 371 </configuration> 372 <goals> 373 <goal>enforce</goal> 374 </goals> 375 </execution> 376 </executions> 377 </plugin> 378 <plugin> 379 <groupId>org.codehaus.mojo</groupId> 380 <artifactId>gwt-maven-plugin</artifactId> 381 <version>${gwt.version}</version> 382 </plugin> 383 <plugin> 384 <groupId>org.xolstice.maven.plugins</groupId> 385 <artifactId>protobuf-maven-plugin</artifactId> 386 <version>0.6.1</version> 387 </plugin> 388 </plugins> 389 </pluginManagement> 390 <plugins> 391 <!-- 392 Force a version >2.7 for this parent project. If we use the current 393 default of 2.7, Maven ignores this parent project's configuration when 394 running maven-javadoc-plugin in children during releases. 395 --> 396 <plugin> 397 <artifactId>maven-javadoc-plugin</artifactId> 398 <version>${maven-javadoc-plugin.version}</version> 399 </plugin> 400 <!-- 401 Similar. Without this, Maven tries to run maven-enforcer-plugin 1.0, 402 and it fails to construct an instance of the rule class, apparently 403 because of a mismatch between the new Maven APIs and the old Enforcer 404 APIs. 405 --> 406 <plugin> 407 <artifactId>maven-enforcer-plugin</artifactId> 408 <version>${maven-enforcer-plugin.version}</version> 409 </plugin> 410 </plugins> 411 </build> 412</project> 413