diff options
author | Dmitry Jemerov <intelliyole@gmail.com> | 2016-06-30 16:24:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-30 16:24:17 +0300 |
commit | e8f342893413bb1c4d2dc763ccf73a86c1b22488 (patch) | |
tree | b31fb2be31adc28e7e3f659bf6b1f4efba7906ef /maven-plugin/src/main/kotlin/DokkaMojo.kt | |
parent | 0fc412aae215c7e54b99bc522ba656b12db5d1c5 (diff) | |
parent | 3d6d8e7a5dad6c8aa26782b711d8bbb99261fd45 (diff) | |
download | dokka-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
Diffstat (limited to 'maven-plugin/src/main/kotlin/DokkaMojo.kt')
-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) |