I have recently migrated a java component to kotlin. So far when I used the maven release plugin, it automatically generated the javadoc too and it was also uploaded to oss.sonatype.com. Dokka at the other hand does not seem to be integrated with the release plugin out-of-the-box. As a result, after upload to oss.sonatype.com, nexus rejects release with validation error, because the javadoc jar is missing.
Is there a dokka integration with the maven release plugin?
Found the problem. Dokka does have the required maven goal (dokka:javadocJar) but unlike with maven-javadoc-plugin, it is not bound to the packaging lifecycle. The easy fix is
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>${dokka.version}</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>dokka</goal>
<goal>javadoc</goal>
<goal>javadocJar</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<file>packages.md</file>
</includes>
</configuration>
</plugin>