Skip to content

Commit 84759c1

Browse files
ctruedenclaude
andcommitted
Link javadoc to this BOM's javadoc union
Every component managed by pom-scijava has its javadoc on javadoc.scijava.org, unioned per pom-scijava release into a single -link target. Projects extending pom-scijava now link to the union of the release they build against, so classes of any managed dependency are linked from their javadoc, with one element-list fetch instead of one per dependency. The URL uses ${project.parent.version}, which is interpolated in the child project: it is this BOM's version when the project extends it directly. Others (e.g. modules of a multi-module build) can override scijava.javadoc.url.bom. A version the site does not have, such as a locally installed 999-test or a release not yet published there, redirects to the newest union; the javadoc tool follows the redirect with a warning, and its links keep the original URL, which resolve exactly once that release is on the site. Setting the property empty drops the link, e.g. to build javadoc offline. Closes #130. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 269ab49 commit 84759c1

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

‎pom.xml‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,25 @@
273273
<license.licenseName>N/A</license.licenseName>
274274
<license.copyrightOwners>N/A</license.copyrightOwners>
275275

276+
<!--
277+
Javadoc of every component managed by this BOM, unioned into a single
278+
link target for the maven-javadoc-plugin: classes of any managed
279+
dependency are linked from the generated javadoc, at the versions this
280+
BOM release manages, with one fast lookup instead of one per dependency.
281+
See https://github.com/scijava/javadoc.scijava.org.
282+
283+
NB: This is interpolated in your project, where ${project.parent.version}
284+
is your parent's version: this BOM's, if your project extends it directly.
285+
If it does not (e.g. a module of a multi-module build), override this
286+
property with the pom-scijava version you build against. A version the
287+
site does not have (e.g. a locally installed 999-test, or a release not
288+
yet published there) falls back to the newest one.
289+
290+
To build javadoc without contacting javadoc.scijava.org (e.g. offline),
291+
drop the links: -Dscijava.javadoc.url.bom= -Dscijava.javadoc.url.java=
292+
-->
293+
<scijava.javadoc.url.bom>https://javadoc.scijava.org/org.scijava/pom-scijava/${project.parent.version}/</scijava.javadoc.url.bom>
294+
276295
<!-- Managed dependency versions - SciJava component collection -->
277296

278297
<!--
@@ -7215,6 +7234,22 @@
72157234
</dependencies>
72167235
</dependencyManagement>
72177236

7237+
<build>
7238+
<pluginManagement>
7239+
<plugins>
7240+
<plugin>
7241+
<artifactId>maven-javadoc-plugin</artifactId>
7242+
<configuration>
7243+
<!-- Link to this BOM's javadoc union; see scijava.javadoc.url.bom. -->
7244+
<links combine.children="append">
7245+
<link>${scijava.javadoc.url.bom}</link>
7246+
</links>
7247+
</configuration>
7248+
</plugin>
7249+
</plugins>
7250+
</pluginManagement>
7251+
</build>
7252+
72187253
<profiles>
72197254
<profile>
72207255
<id>windows</id>

0 commit comments

Comments
 (0)