Make sure directories for intermediate directories in zips are created
diff --git a/CHANGELOG b/CHANGELOG
index 59e30ff..36a5d64 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,8 @@
 1.5.5 (Pending)
+* Fixed:  The concatenation extension released as part of 1.5.4 changed the way zip archives were
+          constructed so that entries for some intermediate directories were elided. For most consumers
+          of zip files this had no impact but some tools require the entries during scanning. (i.e. Older
+          versions of Jruby that loaded ruby scripts from within a jar).
 * Added:  IDEA Extension: Added support for passing `:iml_name` parameter to `ipr.add_gwt_configuration`
 
 1.5.4 (2017-11-29)
diff --git a/lib/buildr/packaging/ziptask.rb b/lib/buildr/packaging/ziptask.rb
index 5c98dff..12b810a 100644
--- a/lib/buildr/packaging/ziptask.rb
+++ b/lib/buildr/packaging/ziptask.rb
@@ -68,6 +68,10 @@
           contents = file_map[path]
           warn "Warning:  Path in zipfile #{name} contains backslash: #{path}" if path =~ /\\/
 
+          # Must ensure that the directory entry is created for intermediate paths, otherwise
+          # zips can be created without entries for directories which can break some tools
+          mkpath.call File.dirname(path)
+
           entry_created = false
           to_transform = []
           transform = transform_map.key?(path)