Commit 80f928f
Generate javadoc JAR for Kotlin projects via Dokka
The maven-javadoc-plugin cannot document Kotlin sources, so pure-Kotlin
projects produced no javadoc JAR ("No Javadoc in project. Archive not
created."). This caused releases to Maven Central to be rejected, since
Central requires a javadoc JAR for every published artifact.
The kotlin profile already ran Dokka's dokka and javadoc goals at
pre-site, but those only generate HTML for the project site; they never
build or attach a -javadoc.jar to the release.
Fix this in the kotlin profile by adding a Dokka javadocJar execution
that builds and attaches the javadoc-classified JAR. Dokka documents
both Kotlin and Java sources, so it also covers mixed projects. To avoid
attaching two conflicting javadoc-classifier JARs in that case, skip the
maven-javadoc-plugin for Kotlin projects via the javadoc.skip property,
honored in all three javadoc-attaching profiles (deploy-to-scijava,
sonatype-oss-release, build-javadoc).
So that Dokka runs in exactly the same circumstances the
maven-javadoc-plugin would -- only at release, not on every build --
bind its phase to the new scijava.javadoc.kotlin.phase property, which
defaults to "none" and is flipped to "package" by those same three
profiles.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 78a89a9 commit 80f928f
1 file changed
Lines changed: 58 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
222 | 231 | | |
223 | 232 | | |
224 | 233 | | |
| |||
1196 | 1205 | | |
1197 | 1206 | | |
1198 | 1207 | | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
1199 | 1215 | | |
1200 | 1216 | | |
1201 | 1217 | | |
| |||
1313 | 1329 | | |
1314 | 1330 | | |
1315 | 1331 | | |
| 1332 | + | |
1316 | 1333 | | |
| 1334 | + | |
1317 | 1335 | | |
1318 | 1336 | | |
1319 | 1337 | | |
1320 | 1338 | | |
1321 | 1339 | | |
1322 | 1340 | | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
1323 | 1362 | | |
1324 | 1363 | | |
1325 | 1364 | | |
| |||
1574 | 1613 | | |
1575 | 1614 | | |
1576 | 1615 | | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
1577 | 1620 | | |
1578 | 1621 | | |
1579 | 1622 | | |
| |||
1610 | 1653 | | |
1611 | 1654 | | |
1612 | 1655 | | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
1613 | 1660 | | |
1614 | 1661 | | |
1615 | 1662 | | |
| |||
1635 | 1682 | | |
1636 | 1683 | | |
1637 | 1684 | | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
1638 | 1689 | | |
1639 | 1690 | | |
1640 | 1691 | | |
| |||
1899 | 1950 | | |
1900 | 1951 | | |
1901 | 1952 | | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
1902 | 1957 | | |
1903 | 1958 | | |
1904 | 1959 | | |
| |||
1913 | 1968 | | |
1914 | 1969 | | |
1915 | 1970 | | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
1916 | 1974 | | |
1917 | 1975 | | |
1918 | 1976 | | |
| |||
0 commit comments