diff options
author | Julien Buret <jburet@gmail.com> | 2016-05-26 17:02:35 +0200 |
---|---|---|
committer | Julien Buret <jburet@gmail.com> | 2016-05-26 17:02:35 +0200 |
commit | 3d6d8e7a5dad6c8aa26782b711d8bbb99261fd45 (patch) | |
tree | b31fb2be31adc28e7e3f659bf6b1f4efba7906ef /maven-plugin/src/main/kotlin | |
parent | 0fc412aae215c7e54b99bc522ba656b12db5d1c5 (diff) | |
download | dokka-3d6d8e7a5dad6c8aa26782b711d8bbb99261fd45.tar.gz dokka-3d6d8e7a5dad6c8aa26782b711d8bbb99261fd45.tar.bz2 dokka-3d6d8e7a5dad6c8aa26782b711d8bbb99261fd45.zip |
Avoid crash when no javadoc generated
Diffstat (limited to 'maven-plugin/src/main/kotlin')
-rw-r--r-- | maven-plugin/src/main/kotlin/DokkaMojo.kt | 4 |
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) |