lib/java/packaging.rb in buildr-1.0.0 vs lib/java/packaging.rb in buildr-1.1.0
- old
+ new
@@ -71,15 +71,15 @@
zip.file.open("META-INF/MANIFEST.MF", "w") do |output|
output << MANIFEST_HEADER
if manifest
case manifest
when Hash
- output << manifest.map { |pair| pair.map(&:to_s).join(": ") }.sort.join("\n")
+ output << manifest.map { |pair| pair.map(&:to_s).join(": ") }.sort.join("\n") << "\n"
when Array
output << manifest.reject { |section| section.empty? }.map { |section|
section.map { |pair| pair.join(": ") }.sort.join("\n").concat("\n")
- }.join("\n")
+ }.join("\n") << "\n"
when Proc, Method
output << manifest.call
when String, Task
output << File.read(manifest.to_s)
end
@@ -231,11 +231,11 @@
options = options.nil? ? {} : options.dup
options[:id] ||= self.id
options[:group] ||= self.group
options[:version] ||= self.version
options[:type] = type
- file_name = path_to("target", Artifact.hash_to_file_name(options))
+ file_name = path_to(:target, Artifact.hash_to_file_name(options))
packager = method("package_as_#{type}") rescue
fail("Don't know how to create a package of type #{type}")
packager.call(file_name, options) do |package|
# Make it an artifact using the specifications, and tell it how to create a POM.
@@ -375,8 +375,7 @@
end
file(file_name)
end
end
-
end