From 5aef25a4a7591c693fe03aeba217f3d2dc7f9347 Mon Sep 17 00:00:00 2001 From: Marcus Fihlon Date: Sun, 5 Nov 2017 03:08:12 -0600 Subject: [PATCH] :bug: Fixing the WAR filename contains if version information is missing #456 --- .../src/main/kotlin/com/beust/kobalt/archive/Archives.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/archive/Archives.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/archive/Archives.kt index f8bd656c..3d685865 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/archive/Archives.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/archive/Archives.kt @@ -17,7 +17,8 @@ class Archives { @ExportedProjectProperty(doc = "The name of the a jar file with a main() method", type = "String") const val JAR_NAME_WITH_MAIN_CLASS = "jarNameWithMainClass" - fun defaultArchiveName(project: Project) = project.name + "-" + project.version + fun defaultArchiveName(project: Project) = project.name + + if (project.version == null || project.version == "") "" else "-${project.version}" fun generateArchive(project: Project, context: KobaltContext,