aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcpovirk <cpovirk@google.com>2019-10-04 12:44:16 -0700
committerChris Povirk <beigetangerine@gmail.com>2019-10-04 16:22:56 -0400
commit1370e8f34be27a66c4560e23c17bf7c87fba7229 (patch)
tree75c3d44de40585e4010865c6d3926b71f0fb4c92
parente8a24aa250bd49d1744753929e49e1cd10f816cf (diff)
downloadjimfs-1370e8f34be27a66c4560e23c17bf7c87fba7229.tar.gz
Prepare Javadoc for Java 11, and make other improvements:
- Move nearly all Javadoc configuration to the parent POM. - Update Guava and ICU4J link locations. The current links resolve to the Javadoc -- but only after a redirect, which Javadoc doesn't like: https://bugs.openjdk.java.net/browse/JDK-8190312 - Update maven-javadoc-plugin to 3.1.1. (This version knows how to work around the aforementioned redirect problem, should it happen again.) - Add links to Checker Framework. For some reason, this isn't working under Java 11. I haven't investigated. - Disable detectJavaApiLink, and fill in https://docs.oracle.com/javase/9/docs/api/ for Java 8 and https://docs.oracle.com/en/java/javase/11/docs/api/ for newer versions. (I've tested only with Java 8 and 11, so hopefully the "newer versions" behavior is OK for 9 and 10.) It does look like it may be necessary to duplicate all the links in 3 places :\ This is all in service of preventing: [ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/9/docs/api/ are in the unnamed module. Traditionally we solve this problem by setting <source>8</source> on Javadoc (CL 235241314, CL 236159968). That would probably work here, but I've been experimenting with <source>9</source> (for proper modules support in jimfs), so that might not be an option soon. Or maybe it still would be, but I'd have to exclude module-info.java, but then I wonder if that will trigger modules problems? In any case, it seems more future-proof to solve this the right(?) way. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=272937179
-rw-r--r--jimfs/pom.xml8
-rw-r--r--pom.xml47
2 files changed, 44 insertions, 11 deletions
diff --git a/jimfs/pom.xml b/jimfs/pom.xml
index 6c8f9c8..d4b5ba1 100644
--- a/jimfs/pom.xml
+++ b/jimfs/pom.xml
@@ -99,15 +99,7 @@
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
- <encoding>UTF-8</encoding>
- <docencoding>UTF-8</docencoding>
- <charset>UTF-8</charset>
<excludePackageNames>com.google.jimfs.internal</excludePackageNames>
- <links>
- <link>http://google.github.io/guava/releases/${guava.version}/api/docs/</link>
- <link>http://icu-project.org/apiref/icu4j/</link>
- <link>https://docs.oracle.com/javase/9/docs/api/</link>
- </links>
</configuration>
<executions>
<execution>
diff --git a/pom.xml b/pom.xml
index ee296a6..4900945 100644
--- a/pom.xml
+++ b/pom.xml
@@ -167,7 +167,21 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>3.0.0</version>
+ <version>3.1.1</version>
+ <configuration>
+ <debug>true</debug>
+ <encoding>UTF-8</encoding>
+ <docencoding>UTF-8</docencoding>
+ <charset>UTF-8</charset>
+ <detectJavaApiLink>false</detectJavaApiLink>
+ <links>
+ <link>https://checkerframework.org/api/</link>
+ <link>https://guava.dev/releases/${guava.version}/api/docs/</link>
+ <link>https://unicode-org.github.io/icu-docs/apidoc/released/icu4j</link>
+ <!-- When building against Java 8, the Java 11 link below is overridden to point to an older version (Java 9, the newest one that works). -->
+ <link>https://docs.oracle.com/en/java/javase/11/docs/api/</link>
+ </links>
+ </configuration>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
@@ -242,7 +256,6 @@
<reporting>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalOptions>
@@ -255,7 +268,6 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalOptions>
@@ -274,8 +286,25 @@
<activation>
<jdk>1.8</jdk>
</activation>
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <links>
+ <link>https://checkerframework.org/api/</link>
+ <link>https://guava.dev/releases/${guava.version}/api/docs/</link>
+ <link>https://unicode-org.github.io/icu-docs/apidoc/released/icu4j</link>
+ <link>https://docs.oracle.com/javase/9/docs/api/</link>
+ </links>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
<build>
<plugins>
+ <!-- https://errorprone.info/docs/installation#maven -->
+ <!-- using github.com/google/error-prone-javac is required when running on JDK 8 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@@ -286,6 +315,18 @@
</compilerArgs>
</configuration>
</plugin>
+
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <links>
+ <link>https://checkerframework.org/api/</link>
+ <link>https://guava.dev/releases/${guava.version}/api/docs/</link>
+ <link>https://unicode-org.github.io/icu-docs/apidoc/released/icu4j</link>
+ <link>https://docs.oracle.com/javase/9/docs/api/</link>
+ </links>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>