• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<project xmlns="http://maven.apache.org/POM/4.0.0"
3         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5
6  <modelVersion>4.0.0</modelVersion>
7  <groupId>com.google.guava</groupId>
8  <artifactId>guava-parent</artifactId>
9  <version>31.1-android</version>
10  <packaging>pom</packaging>
11  <name>Guava Maven Parent</name>
12  <description>Parent for guava artifacts</description>
13  <url>https://github.com/google/guava</url>
14  <properties>
15    <!-- Override this with -Dtest.include="**/SomeTest.java" on the CLI -->
16    <test.include>%regex[.*.class]</test.include>
17    <truth.version>1.1.2</truth.version>
18    <checker-framework.version>3.12.0</checker-framework.version>
19    <animal.sniffer.version>1.20</animal.sniffer.version>
20    <maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>
21    <!-- Empty for all JDKs but 9-12 -->
22    <maven-javadoc-plugin.additionalJOptions></maven-javadoc-plugin.additionalJOptions>
23    <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
24    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
25  </properties>
26  <issueManagement>
27    <system>GitHub Issues</system>
28    <url>https://github.com/google/guava/issues</url>
29  </issueManagement>
30  <inceptionYear>2010</inceptionYear>
31  <licenses>
32    <license>
33      <name>Apache License, Version 2.0</name>
34      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
35      <distribution>repo</distribution>
36    </license>
37  </licenses>
38  <scm>
39    <connection>scm:git:https://github.com/google/guava.git</connection>
40    <developerConnection>scm:git:git@github.com:google/guava.git</developerConnection>
41    <url>https://github.com/google/guava</url>
42  </scm>
43  <developers>
44    <developer>
45      <id>kevinb9n</id>
46      <name>Kevin Bourrillion</name>
47      <email>kevinb@google.com</email>
48      <organization>Google</organization>
49      <organizationUrl>http://www.google.com</organizationUrl>
50      <roles>
51        <role>owner</role>
52        <role>developer</role>
53      </roles>
54      <timezone>-8</timezone>
55    </developer>
56  </developers>
57  <ciManagement>
58    <system>GitHub Actions</system>
59    <url>https://github.com/google/guava/actions</url>
60  </ciManagement>
61  <modules>
62    <module>guava</module>
63    <module>guava-bom</module>
64    <module>guava-testlib</module>
65    <module>guava-tests</module>
66  </modules>
67  <build>
68    <!-- Handle where Guava deviates from Maven defaults -->
69    <sourceDirectory>src</sourceDirectory>
70    <testSourceDirectory>test</testSourceDirectory>
71    <resources>
72      <resource>
73        <directory>src</directory>
74        <excludes>
75          <exclude>**/*.java</exclude>
76          <exclude>**/*.sw*</exclude>
77        </excludes>
78      </resource>
79    </resources>
80    <testResources>
81      <testResource>
82        <directory>test</directory>
83        <excludes>
84          <exclude>**/*.java</exclude>
85        </excludes>
86      </testResource>
87    </testResources>
88    <plugins>
89      <plugin>
90        <groupId>org.apache.maven.plugins</groupId>
91        <artifactId>maven-enforcer-plugin</artifactId>
92        <executions>
93          <execution>
94            <id>enforce-versions</id>
95            <goals>
96              <goal>enforce</goal>
97            </goals>
98            <configuration>
99              <rules>
100                <requireMavenVersion>
101                  <version>3.0.5</version>
102                </requireMavenVersion>
103                <requireJavaVersion>
104                  <version>1.8.0</version>
105                </requireJavaVersion>
106              </rules>
107            </configuration>
108          </execution>
109        </executions>
110      </plugin>
111      <plugin>
112        <artifactId>maven-javadoc-plugin</artifactId>
113        <version>${maven-javadoc-plugin.version}</version>
114      </plugin>
115    </plugins>
116    <pluginManagement>
117      <plugins>
118        <plugin>
119          <artifactId>maven-compiler-plugin</artifactId>
120          <version>3.8.1</version>
121          <configuration>
122            <source>1.8</source>
123            <target>1.8</target>
124            <compilerArgs>
125              <!--
126                   Make includes/excludes fully work:
127                   https://issues.apache.org/jira/browse/MCOMPILER-174
128
129                   (Compare what guava-gwt has to do for maven-javadoc-plugin.)
130              -->
131              <arg>-sourcepath</arg>
132              <arg>doesnotexist</arg>
133            </compilerArgs>
134          </configuration>
135        </plugin>
136        <plugin>
137          <artifactId>maven-jar-plugin</artifactId>
138          <version>3.2.0</version>
139        </plugin>
140        <plugin>
141          <artifactId>maven-source-plugin</artifactId>
142          <version>${maven-source-plugin.version}</version>
143          <executions>
144            <execution>
145              <id>attach-sources</id>
146              <phase>post-integration-test</phase>
147              <goals><goal>jar</goal></goals>
148            </execution>
149          </executions>
150        </plugin>
151        <plugin>
152          <groupId>org.codehaus.mojo</groupId>
153          <artifactId>animal-sniffer-maven-plugin</artifactId>
154          <version>${animal.sniffer.version}</version>
155          <configuration>
156            <checkTestClasses>true</checkTestClasses>
157            <signature>
158              <groupId>org.codehaus.mojo.signature</groupId>
159              <artifactId>java16-sun</artifactId>
160              <version>1.10</version>
161            </signature>
162            <ignores>
163              <!-- Allow requireNonNull: Android desugaring rewrites it (so it's safe for us to use), and it's useful for null checks. Note that this line allows *all* methods from java.util.Objects. That's the best that we can do with the configuration options that Animal Sniffer offers. -->
164              <ignore>java.util.Objects</ignore>
165              <!-- Unsafe isn't part of the documented Java 6 API, but it is available.
166                   And in cases where it's not, we have fallbacks. -->
167              <ignore>sun.misc.Unsafe</ignore>
168            </ignores>
169          </configuration>
170          <executions>
171            <execution>
172              <id>check-java-version-compatibility</id>
173              <phase>test</phase>
174              <goals>
175                <goal>check</goal>
176              </goals>
177            </execution>
178          </executions>
179        </plugin>
180        <plugin>
181          <artifactId>maven-javadoc-plugin</artifactId>
182          <version>${maven-javadoc-plugin.version}</version>
183          <configuration>
184            <quiet>true</quiet>
185            <notimestamp>true</notimestamp>
186            <encoding>UTF-8</encoding>
187            <docencoding>UTF-8</docencoding>
188            <charset>UTF-8</charset>
189            <additionalOptions>
190              <additionalOption>-XDignore.symbol.file</additionalOption>
191              <additionalOption>-Xdoclint:-html</additionalOption>
192            </additionalOptions>
193            <linksource>true</linksource>
194            <source>8</source>
195            <additionalJOption>${maven-javadoc-plugin.additionalJOptions}</additionalJOption>
196          </configuration>
197          <executions>
198            <execution>
199              <id>attach-docs</id>
200              <phase>post-integration-test</phase>
201              <goals><goal>jar</goal></goals>
202            </execution>
203          </executions>
204        </plugin>
205        <plugin>
206          <artifactId>maven-dependency-plugin</artifactId>
207          <version>3.1.1</version>
208        </plugin>
209        <plugin>
210          <artifactId>maven-antrun-plugin</artifactId>
211          <version>1.6</version>
212        </plugin>
213        <plugin>
214          <artifactId>maven-surefire-plugin</artifactId>
215          <version>2.7.2</version>
216          <configuration>
217            <includes>
218              <include>${test.include}</include>
219            </includes>
220            <!-- By having our own entries here, we also override the default exclusion filter, which excludes all nested classes. -->
221            <excludes>
222              <!-- https://github.com/google/guava/issues/2840 -->
223              <exclude>%regex[.*PackageSanityTests.*.class]</exclude>
224              <!-- FeatureUtilTest.*ExampleDerivedInterfaceTester, com.google.common.io.*Tester, incidentally FeatureSpecificTestSuiteBuilderTest.MyAbstractTester (but we don't care either way because it's not meant to run on its own but works OK if it does)... but not NullPointerTesterTest, etc. -->
225              <exclude>%regex[.*Tester.class]</exclude>
226              <!-- Anonymous TestCase subclasses in GeneratedMonitorTest -->
227              <exclude>%regex[.*[$]\d+.class]</exclude>
228            </excludes>
229            <redirectTestOutputToFile>true</redirectTestOutputToFile>
230            <runOrder>alphabetical</runOrder>
231            <!-- Set max heap for tests. -->
232            <!-- Catch dependencies on the default locale by setting it to hi-IN. -->
233            <argLine>-Xmx1536M -Duser.language=hi -Duser.country=IN</argLine>
234          </configuration>
235        </plugin>
236        <plugin>
237          <groupId>org.apache.maven.plugins</groupId>
238          <artifactId>maven-enforcer-plugin</artifactId>
239          <version>3.0.0-M3</version>
240        </plugin>
241      </plugins>
242    </pluginManagement>
243  </build>
244  <distributionManagement>
245    <snapshotRepository>
246      <id>sonatype-nexus-snapshots</id>
247      <name>Sonatype Nexus Snapshots</name>
248      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
249    </snapshotRepository>
250    <repository>
251      <id>sonatype-nexus-staging</id>
252      <name>Nexus Release Repository</name>
253      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
254    </repository>
255    <site>
256      <id>guava-site</id>
257      <name>Guava Documentation Site</name>
258      <url>scp://dummy.server/dontinstall/usestaging</url>
259    </site>
260  </distributionManagement>
261  <dependencyManagement>
262    <dependencies>
263      <dependency>
264        <groupId>com.google.code.findbugs</groupId>
265        <artifactId>jsr305</artifactId>
266        <version>3.0.2</version>
267      </dependency>
268      <dependency>
269        <groupId>org.checkerframework</groupId>
270        <artifactId>checker-qual</artifactId>
271        <version>${checker-framework.version}</version>
272      </dependency>
273      <dependency>
274        <groupId>org.checkerframework</groupId>
275        <artifactId>checker-qual</artifactId>
276        <version>${checker-framework.version}</version>
277        <classifier>sources</classifier>
278      </dependency>
279      <dependency>
280        <groupId>com.google.errorprone</groupId>
281        <artifactId>error_prone_annotations</artifactId>
282        <version>2.11.0</version>
283      </dependency>
284      <dependency>
285        <groupId>com.google.j2objc</groupId>
286        <artifactId>j2objc-annotations</artifactId>
287        <version>1.3</version>
288      </dependency>
289      <dependency>
290        <groupId>junit</groupId>
291        <artifactId>junit</artifactId>
292        <version>4.13.2</version>
293        <scope>test</scope>
294      </dependency>
295      <dependency>
296        <groupId>org.easymock</groupId>
297        <artifactId>easymock</artifactId>
298        <version>4.3</version>
299        <scope>test</scope>
300      </dependency>
301      <dependency>
302        <groupId>org.mockito</groupId>
303        <artifactId>mockito-core</artifactId>
304        <version>3.9.0</version>
305        <scope>test</scope>
306      </dependency>
307      <dependency>
308        <groupId>com.google.jimfs</groupId>
309        <artifactId>jimfs</artifactId>
310        <version>1.2</version>
311        <scope>test</scope>
312      </dependency>
313      <dependency>
314        <groupId>com.google.truth</groupId>
315        <artifactId>truth</artifactId>
316        <version>${truth.version}</version>
317        <scope>test</scope>
318        <exclusions>
319          <exclusion>
320            <!-- use the guava we're building. -->
321            <groupId>com.google.guava</groupId>
322            <artifactId>guava</artifactId>
323          </exclusion>
324        </exclusions>
325      </dependency>
326      <dependency>
327        <groupId>com.google.caliper</groupId>
328        <artifactId>caliper</artifactId>
329        <version>1.0-beta-2</version>
330        <scope>test</scope>
331        <exclusions>
332          <exclusion>
333            <!-- use the guava we're building. -->
334            <groupId>com.google.guava</groupId>
335            <artifactId>guava</artifactId>
336          </exclusion>
337        </exclusions>
338      </dependency>
339    </dependencies>
340  </dependencyManagement>
341  <profiles>
342    <profile>
343        <id>sonatype-oss-release</id>
344        <build>
345          <plugins>
346            <plugin>
347              <groupId>org.apache.maven.plugins</groupId>
348              <artifactId>maven-source-plugin</artifactId>
349              <version>${maven-source-plugin.version}</version>
350              <executions>
351                <execution>
352                  <id>attach-sources</id>
353                  <goals>
354                    <goal>jar-no-fork</goal>
355                  </goals>
356                </execution>
357              </executions>
358            </plugin>
359            <plugin>
360              <groupId>org.apache.maven.plugins</groupId>
361              <artifactId>maven-javadoc-plugin</artifactId>
362              <version>${maven-javadoc-plugin.version}</version>
363                <executions>
364                  <execution>
365                    <id>attach-javadocs</id>
366                    <goals>
367                      <goal>jar</goal>
368                    </goals>
369                </execution>
370              </executions>
371            </plugin>
372            <plugin>
373              <groupId>org.apache.maven.plugins</groupId>
374              <artifactId>maven-gpg-plugin</artifactId>
375              <version>1.6</version>
376              <executions>
377                <execution>
378                  <id>sign-artifacts</id>
379                  <phase>verify</phase>
380                  <goals>
381                    <goal>sign</goal>
382                  </goals>
383                </execution>
384              </executions>
385            </plugin>
386          </plugins>
387      </build>
388    </profile>
389    <profile>
390      <!--
391          Passes JDK 9-12-specific `no-module-directories` flag to Javadoc tool,
392          which is required to make symbol search work correctly in the generated
393          pages.
394
395          This flag does not exist on 8 and 13+ (https://bugs.openjdk.java.net/browse/JDK-8215582).
396
397          Consider removing it once our release and test scripts are migrated to a recent JDK (17+).
398       -->
399      <id>javadocs-jdk9-12</id>
400      <activation>
401        <jdk>[9,13)</jdk>
402      </activation>
403      <properties>
404        <maven-javadoc-plugin.additionalJOptions>--no-module-directories</maven-javadoc-plugin.additionalJOptions>
405      </properties>
406    </profile>
407  </profiles>
408</project>
409