dokka: Fail to generate Javadoc with Java 10 (Doclet missing?)
When using Dokka 9.16 with JDK-10 the generation with outputFormat=javadoc fails with the following message:
* What went wrong:
Execution failed for task ':dokkaJavadoc'.
> com/sun/tools/doclets/formats/html/HtmlDoclet
I guess its due to the removal of the old HtmlDoclet in Java 10.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 56
- Comments: 31 (8 by maintainers)
Commits related to this issue
- Add dokka + disable javadoc Hit https://bugs.openjdk.java.net/browse/JDK-8187422 Hit https://github.com/Kotlin/dokka/issues/294 — committed to openlattice/conductor-client by geekbeast 6 years ago
- Add dokka plugin to generate javadocs Unfortunately due to https://github.com/Kotlin/dokka/issues/294 the build will be limited to jdk8 for now. — committed to rocketraman/logging-log4j-kotlin by rocketraman 6 years ago
- Add dokka plugin to generate javadocs Unfortunately due to https://github.com/Kotlin/dokka/issues/294 the build will be limited to jdk8 for now. — committed to rocketraman/logging-log4j-kotlin by rocketraman 6 years ago
- Disable Dokka on Java9+ builds (see: Kotlin/dokka#294) — committed to AlchemistSimulator/Alchemist by DanySK 5 years ago
- Disable builds with Java 10 until Kotlin/dokka#294 is fixed — committed to tinylog-org/tinylog by pmwmedia 5 years ago
- Adapt to jdk 10+ package info changes For jdk 11+, look at /en/java/javase instead of /javase For jdk 10+, look at element-list instead of package-list, and parse the module out to generate the corre... — committed to josephlbarnett/dokka by josephlbarnett 5 years ago
- Reverts travis to build with `test` instead of `build` Letting travis build with `./gradlew build` was making dokka fail, due to https://github.com/Kotlin/dokka/issues/294 This may be reverted if Tra... — committed to kotest/kotest by LeoColman 5 years ago
- Migrate plugin to Kotlin. - Nicer code. - Nicer DSL. - Twice as much Gradle script. Oh well. Also: - A little more debug logging. - Clearer error message for missing base store file. _Note:_ ... — committed to Digithurst/gradle-truststore-plugin by reitzig 5 years ago
- Disables javadoc generation on newest java versions due to a dokka issue: Kotlin/dokka#294 — committed to PowerNukkit/NBT-Manipulator by joserobjr 5 years ago
- Disables javadoc generation on newest java versions due to a dokka issue: Kotlin/dokka#294 — committed to PowerNukkit/Region-Manipulator by joserobjr 5 years ago
- Work around https://github.com/Kotlin/dokka/issues/294 — committed to AlchemistSimulator/Alchemist by DanySK 5 years ago
- Generate api docs assuming JDK 9, not 6 By default, dokka seems to point to the JDK 6 documentation when linking to Java types. I was hoping to set this to JDK 11 (the current JDK LTS version) but u... — committed to ivoanjo/http4k by ivoanjo 5 years ago
- Improve api documentation: Link to JDK 9 and dependencies' javadocs (#255) * Generate api docs assuming JDK 9, not 6 By default, dokka seems to point to the JDK 6 documentation when linking to Ja... — committed to http4k/http4k by ivoanjo 5 years ago
- Use JDK 11 only in integration tests because incompatibility with Dokka (https://github.com/Kotlin/dokka/issues/294) — committed to felipebz/zpa by felipebz 5 years ago
- Update dokka configuration Currently dokka javadoc is not working, so jitpack may not be able to build artifacts see: https://github.com/Kotlin/dokka/issues/294 — committed to AniTrend/support-arch by wax911 5 years ago
- Force JDK 8 to avoid Dokka bug with JDK 11 (HtmlDoclet) https://github.com/Kotlin/dokka/issues/294 — committed to joffrey-bion/krossbow by deleted user 5 years ago
- Revert to Java 8 for dokka (https://github.com/Kotlin/dokka/issues/294) — committed to Nylle/Test by Nylle 4 years ago
- Configure dokka and work around Kotlin/dokka#294 — committed to DanySK/upgradle by DanySK 4 years ago
- Disable Dokka See https://github.com/Kotlin/dokka/issues/294. — committed to binkley/kunits by boxleytw 4 years ago
- Return to JDK 9 due to issue with Dokka See Kotlin/dokka#294 — committed to tinylog-org/tinylog by pmwmedia 4 years ago
Still broken on Java 11
This effectively prevents one to build Kotlin JARs with JDK10+ and deploy them to Maven Central, since Maven Central requires javadoc artifacts (produced by Dokka). Huge blocker!
Yes, we still don’t support the new Doclet. This is planned for
0.11.0to not develop this twice, as we changed the dokka internal model@daviddenton i can confirm both
javadocanddokka*Docare working fine on1-4-0-rc. Tested on java 11 & JDK 16 eap (http://jdk.java.net/16/).The Dokka JDK 11 compliance is what currently prevents me - and others, I presume - from releasing JDK 11 OSS projects through Sonatype OSS Nexus.
Is there some other means of generating JavaDoc for Kotlin? It may not need to be perfect, but it needs to exist in order to release OSS software.
Hi, we are working on this issue. The main problem is that in the JDK9+ the entire doclet model has changed and we have to reimplement the javadoc format from scratch, so it’s gonna take a while, but it’s planned for the next release
Are there any updates on this regarding this blog entry? https://blog.jetbrains.com/kotlin/2020/08/dokka-preview-based-on-kotlin-1-4-0-rc/
No, you can see the full document of plugin version
1.4.32from here: https://kotlin.github.io/dokka/1.4.32/@kamilok1965 Thanks for the info. Could you add that mention in the README file? Currently it just seems like it should work and it’s a waste of time for everyone.
I did not manage to use Dokka when pushing a JDK 11 Kotlin project to OSS via Maven release. Any for this? Is there an estimate release date for Dokka 0.11 (being compliant with JDK 11)?
Any news on this? When can we expect a fix for it?
@drxeno02 the old Dokka versions are not supported, please switch to
1.4.32Works for me too. Yay! Thank you so much! I’m kind of a Gradle noob, so my example is a little kludgy - any help would be appreciated!
I have to specify
dokkaJarin my build command:Then in build.gradle.kts:
I deleted (because
outputFormatis no longer valid):You most probably have different JDKs involved. In the IDE the gradle tasks usually run with the same JRE as the IDE does. Calling gradlew will either use Java-Home or whatever you have defined in the gradle.properties.
First of I’d like to thank everyone involved in dokka 💯 and I understand that the fix may take a while. I just have a question, might not be helpful but here I go.
Scenario v0.10.0
I get the following error if I run a command like
./gradlew dokkaWhat’s strange is I can run the
dokkatask from the gradle toolbar in android studio for all the sub-modules (that have the dokka task) and this works without throwing an exceptions.Honestly I don’t know why that is possible, I’d expect both methods to fail, 🤷♀️ and by no means am I gradle expert so perhaps someone could explain what differs between
./gradlew dokkaand manually running the dokka task for each of the sub-modulesConfiguration
So each of my sub-modules have a similar configuration as shown below
Corresponding YouTrack issue: https://youtrack.jetbrains.com/issue/KT-31710
the linked issue seemed to be fixed. Is there a new status for dokka?
@lennartj said:
I ran into the same thing when using Maven. I tried converting a project to Gradle 6.3 which happily creates a nearly empty
myProject-javadoc.jarfile without ever running dokka. I think the key lines inbuild.gradle.ktsare:It puts nothing in
myProject-javadoc.jarbut a/META_INF/MANIFEST.MFfile containing only a version string. Sonatype accepts this as a valid JavaDoc file.If you have an all Kotlin project, you can even throw your dokka HTML into a javadoc-jar.
I have maybe 8 hours of Gradle experience. I am not an expert. This is NOT a fix, or even a good workaround, but it might be better than no workaround. I’ll keep updating my build file here as I learn more: https://github.com/GlenKPeterson/Indented/blob/master/build.gradle.kts
Has HtmlDoclet moved to jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java in Java 11?http://hg.openjdk.java.net/jdk/jdk/file/82767203606e/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java
How are other people working around this? Do I need to install Java 8 in order to deploy to Sonatype? I’m willing to switch my build to Gradle, but it looks like it’s broken there too.