Skip to content

Commit 724a65b

Browse files
committed
chore: improve usage of KDocs
1 parent 2a121bf commit 724a65b

File tree

2 files changed

+34
-24
lines changed

2 files changed

+34
-24
lines changed

kotlin/pom.xml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030

3131
<artifactId>axon-kotlin</artifactId>
3232

33+
<properties>
34+
<dokka.skip>false</dokka.skip>
35+
</properties>
36+
3337
<dependencies>
3438
<dependency>
3539
<groupId>org.axonframework</groupId>
@@ -47,28 +51,4 @@
4751
</plugins>
4852
</build>
4953

50-
<profiles>
51-
<profile>
52-
<id>javadoc-and-sources</id>
53-
<activation>
54-
<property>
55-
<name>performRelease</name>
56-
<value>true</value>
57-
</property>
58-
</activation>
59-
<build>
60-
<plugins>
61-
<plugin>
62-
<groupId>org.jetbrains.dokka</groupId>
63-
<artifactId>dokka-maven-plugin</artifactId>
64-
</plugin>
65-
<plugin>
66-
<artifactId>maven-source-plugin</artifactId>
67-
<version>3.0.1</version>
68-
</plugin>
69-
</plugins>
70-
</build>
71-
</profile>
72-
</profiles>
73-
7454
</project>

pom.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@
4141
<slf4j.version>1.7.30</slf4j.version>
4242
<log4j.version>2.13.3</log4j.version>
4343
<dokka.version>1.4.10.2</dokka.version>
44+
<!--
45+
Deactivate dokka by default, and make the build faster for all projects.
46+
The dokka.skip will be set to true on relevant projects only containing Kotlin code
47+
(for example there is no reason to produce KDoc for example modules or empty javadoc archives for pom-only modules)
48+
-->
49+
<dokka.skip>true</dokka.skip>
4450
</properties>
4551

4652
<dependencyManagement>
@@ -240,6 +246,26 @@
240246
</plugins>
241247
</build>
242248
</profile>
249+
<profile>
250+
<id>docs-and-sources</id>
251+
<activation>
252+
<property>
253+
<name>performRelease</name>
254+
<value>true</value>
255+
</property>
256+
</activation>
257+
<build>
258+
<plugins>
259+
<plugin>
260+
<groupId>org.jetbrains.dokka</groupId>
261+
<artifactId>dokka-maven-plugin</artifactId>
262+
</plugin>
263+
<plugin>
264+
<artifactId>maven-source-plugin</artifactId>
265+
</plugin>
266+
</plugins>
267+
</build>
268+
</profile>
243269

244270
</profiles>
245271

@@ -354,6 +380,10 @@
354380
<groupId>org.jetbrains.dokka</groupId>
355381
<artifactId>dokka-maven-plugin</artifactId>
356382
<version>${dokka.version}</version>
383+
<configuration>
384+
<!-- Conditionally set per maven module, deactivated by default, to speed up and avoid unneeded empty docs archive -->
385+
<skip>${dokka.skip}</skip>
386+
</configuration>
357387
<executions>
358388
<execution>
359389
<phase>prepare-package</phase>

0 commit comments

Comments
 (0)