aboutsummaryrefslogtreecommitdiff
path: root/maven-plugin/src/main/kotlin/DokkaMojo.kt
diff options
context:
space:
mode:
Diffstat (limited to 'maven-plugin/src/main/kotlin/DokkaMojo.kt')
-rw-r--r--maven-plugin/src/main/kotlin/DokkaMojo.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/maven-plugin/src/main/kotlin/DokkaMojo.kt b/maven-plugin/src/main/kotlin/DokkaMojo.kt
index aec6d852..e3736602 100644
--- a/maven-plugin/src/main/kotlin/DokkaMojo.kt
+++ b/maven-plugin/src/main/kotlin/DokkaMojo.kt
@@ -148,6 +148,10 @@ class DokkaJavadocJarMojo : AbstractDokkaMojo() {
override fun execute() {
super.execute()
+ if(!File(outputDir).exists()) {
+ log.warn("No javadoc generated so no javadoc jar will be generated")
+ return
+ }
val outputFile = generateArchive("$finalName-$classifier.jar")
if (attach) {
projectHelper?.attachArtifact(project, "javadoc", classifier, outputFile)