lib/buildr/ivy_extension.rb in ivy4r-0.12.1 vs lib/buildr/ivy_extension.rb in ivy4r-0.12.2
- old
+ new
@@ -112,11 +112,11 @@
else
confs, types = args.flatten, []
end
[confs, types].each do |t|
- t.reject! {|c| c.nil? || c.blank? }
+ t.reject! {|c| c.nil? || c.empty? }
end
unless confs.empty?
pathid = "ivy.deps." + confs.join('.') + '.' + types.join('.')
params = {:conf => confs.join(','), :pathid => pathid}
@@ -411,11 +411,11 @@
artifacts = deps(confs.flatten, types.flatten)
if artifacts
artifacts = artifacts.find_all do |lib|
lib = File.basename(lib)
- includes = includes.reject {|i| i.nil? || i.blank? }
+ includes = includes.reject {|i| i.nil? || i.empty? }
should_include = includes.empty? || includes.any? {|include| include === lib }
should_include && !excludes.any? {|exclude| exclude === lib}
end
end
@@ -601,11 +601,15 @@
def add_manifest_to_distributeables(project)
pkgs = project.packages.find_all { |pkg| ['jar', 'war', 'ear'].member? pkg.type.to_s }
pkgs.each do |pkg|
name = "#{pkg.name}manifest"
task = project.task name => project.ivy.file_project.task('ivy:resolve') do
- pkg.with :manifest => pkg.manifest.merge(project.manifest.merge(project.ivy.manifest))
- info "Adding manifest entries to package '#{pkg.name}'"
+ if pkg.manifest # source jars have no manifest, only add to existing manifest files
+ pkg.with :manifest => pkg.manifest.merge(project.manifest.merge(project.ivy.manifest))
+ info "Adding manifest entries to package '#{pkg.name}'"
+ else
+ info "Could not merge info to package '#{pkg.to_s}' it has no manifest!"
+ end
end
project.task :build => task
end
end