From a005a14db55263c0f8019f51a6e29be9e572ebc0 Mon Sep 17 00:00:00 2001 From: DevCharly Date: Tue, 7 Jun 2016 14:05:30 +0200 Subject: [PATCH] avoid adding empty "classes" directory entry to Jar file (this did add the empty "classes" directory to kobalt-0.xxx.jar) --- .../main/kotlin/com/beust/kobalt/misc/JarUtils.kt | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/JarUtils.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/JarUtils.kt index 70a8bbb4..dfd8cc70 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/JarUtils.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/JarUtils.kt @@ -51,19 +51,6 @@ public class JarUtils { log(2, "Writing contents of directory $foundFile") // Directory - var name = foundFile.name - if (!name.isEmpty()) { - if (!name.endsWith("/")) name += "/" - val entry = JarEntry(name) - entry.time = localFile.lastModified() - try { - outputStream.putNextEntry(entry) - } catch(ex: ZipException) { - log(2, "Can't add $name: ${ex.message}") - } finally { - outputStream.closeEntry() - } - } val includedFile = IncludedFile(From(foundFile.path), To(""), listOf(IFileSpec.GlobSpec("**"))) addSingleFile(".", includedFile, outputStream, expandJarFiles) } else {