I'm trying to make a top-level zip in my buildr buildfile, but the jar files don't seem to end up in the resulting zip.
The project structure has sub-projects:
desc 'Main project'
define 'hex' do
#... omitting top-level config ...
desc 'Hex Utilities'
define 'util' do
package :jar
end
#... omitting other sub-projects, they're all the same ...
binaries_id = "#{id}-components-#{version}"
package(:zip, :file => _("target/#{binaries_id}.zip")).path(binaries_id).tap do |path|
path.include 'COPYING', 'COPYING.LESSER', 'CHANGELOG', 'README.markdown'
%w{anno binary interpreter util viewer}.each do |proj|
path.include project(proj).packages
end
end
end
I have also tried:
path.include project(proj).package(:jar)
explicitly selecting only the jar, though it's the only package anyway, and also:
path.include project(proj).packages.map{|p| "#{p}"}
which maps them to strings, since I noticed all the other path.include lines take strings and suspected that it simply might not work with arrays of package objects, but this doesn't work either. Then my last thought was to just jam in the strings like what I am doing with the rest of the includes:
path.include "#{proj}/target/hex-#{proj}-#{version}.jar"
But even this doesn't work, so I have no idea how to proceed.
I can not seem to reproduce the behaviour. With the most recent release of buildr I created a buildfile that looks like
Run "buildr clean package" and then "unzip -t somepath.zip" produces;
Which is what I would expect.