Hello!
I have mixed Java/Kotlin (98% java->2% Kotlin) multimodule maven project.
Originally, we used maven-javadoc-plugin
to generate single *-javadoc.jar
files per each maven module.
Javadoc maven setup looks like this.
........
<plugins>
........
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
</plugin>
........
</plugins>
........
Average testfull build on my MBP’2015 takes:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:20 min
[INFO] Finished at: 2017-03-12T20:36:05+02:00
[INFO] Final Memory: 86M/978M
[INFO] ------------------------------------------------------------------------
Then, I migrated from maven-javadoc-plugin
into dokka-maven-plugin
.
Dokka maven setup looks like this.
........
<plugins>
........
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>0.9.13</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>test</phase>
<goals>
<goal>javadocJar</goal>
</goals>
</execution>
</executions>
</plugin>
........
</plugins>
........
And testfull build with javadoc/kdoc generation takes:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16:27 min
[INFO] Finished at: 2017-03-12T20:03:19+02:00
[INFO] Final Memory: 209M/1643M
[INFO] ------------------------------------------------------------------------
Nothing wrong with kotlin compilation speed , but the issue with generating javadoc/kdoc’s.
So, the first question: how can I improve javadoc generation speed ? Maybe i have to tune something?
The second question is about generating *-sources.jar
artefacts with maven-source-plugin
plugin (or any others). Is there a way to generate Jar with sources in mixed java/kotlin projects?
Thanks in advance!