Skip to content

Commit e20435c

Browse files
committed
Add properties for core Java Javadoc URLs
This makes it possible to link javadoc to OpenJDK 11 + OpenJFX 11, rather than only Java 8. This is especially important because otherwise, modularized Java 11 projects can (will?) fail during javadoc generation with errors like: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.0:jar (attach-javadocs) on project scijava-types: MavenReportException: Error while generating Javadoc: [ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://javadoc.scijava.org/Java/ are in the unnamed module. [ERROR] javadoc: error - The code being documented uses modules but the packages defined in https://javadoc.scijava.org/SciJava/ are in the unnamed module. [ERROR] javadoc: error - Error fetching URL: https://javadoc.scijava.org/ImageJ1/ [ERROR] javadoc: error - The code being documented uses modules but the packages defined in https://javadoc.scijava.org/Guava/ are in the unnamed module. This change also improves build reproducibility by linking to the Java 8 javadocs explicitly by default, rather than to "/Java" which may (will) update to newer major Java versions in the future. This still does not achieve full build reproducibility relating to javadoc generation, though, because we link to many other javadocs at latest versions rather than the versions depended upon by the project. We can try to transition toward javadoc.io for javadoc links, since those could be linked at exactly the versions depended upon.
1 parent 0bad944 commit e20435c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

pom.xml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,16 @@
193193
-->
194194
<scijava.team.roles>founder,lead,developer,debugger,reviewer,support,maintainer</scijava.team.roles>
195195

196+
<!--
197+
Links to javadoc APIs, used by the maven-javadoc-plugin.
198+
Change these if you need to link against different API versions.
199+
E.g., for Java 11 projects, use:
200+
<scijava.javadoc.url.java>https://javadoc.scijava.org/Java11/</scijava.javadoc.url.java>
201+
<scijava.javadoc.url.javafx>https://javadoc.scijava.org/JavaFX11/</scijava.javadoc.url.javafx>
202+
-->
203+
<scijava.javadoc.url.java>https://javadoc.scijava.org/Java8/</scijava.javadoc.url.java>
204+
<scijava.javadoc.url.javafx>https://javadoc.scijava.org/JavaFX8/</scijava.javadoc.url.javafx>
205+
196206
<!--
197207
The coding-style property defines a coding style to be used in your project.
198208
Supported values as of this writing are scijava and imglib2.
@@ -410,7 +420,8 @@
410420
<use>false</use>
411421
<links>
412422
<!-- Core Java. -->
413-
<link>https://javadoc.scijava.org/Java/</link>
423+
<link>${scijava.javadoc.url.java}</link>
424+
<link>${scijava.javadoc.url.javafx}</link>
414425
<!-- SciJava and related projects and forks. -->
415426
<link>https://javadoc.scijava.org/SciJava/</link>
416427
<link>https://javadoc.scijava.org/Alida/</link>
@@ -1019,8 +1030,8 @@
10191030
<use>false</use>
10201031
<links>
10211032
<!-- Core Java. -->
1022-
<link>https://javadoc.scijava.org/Java/</link>
1023-
<link>https://javadoc.scijava.org/JavaFX8/</link>
1033+
<link>${scijava.javadoc.url.java}</link>
1034+
<link>${scijava.javadoc.url.javafx}</link>
10241035
<!-- SciJava and related projects and forks. -->
10251036
<link>https://javadoc.scijava.org/SciJava/</link>
10261037
<link>https://javadoc.scijava.org/Alida/</link>

0 commit comments

Comments
 (0)