aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2016-06-30 16:24:17 +0300
committerGitHub <noreply@github.com>2016-06-30 16:24:17 +0300
commite8f342893413bb1c4d2dc763ccf73a86c1b22488 (patch)
treeb31fb2be31adc28e7e3f659bf6b1f4efba7906ef
parent0fc412aae215c7e54b99bc522ba656b12db5d1c5 (diff)
parent3d6d8e7a5dad6c8aa26782b711d8bbb99261fd45 (diff)
downloaddokka-e8f342893413bb1c4d2dc763ccf73a86c1b22488.tar.gz
dokka-e8f342893413bb1c4d2dc763ccf73a86c1b22488.tar.bz2
dokka-e8f342893413bb1c4d2dc763ccf73a86c1b22488.zip
Merge pull request #81 from zigzago/nojavadoc-crash
Maven : Avoid crash when no javadoc generated
-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)