lib/java/compile.rb in buildr-1.2.5 vs lib/java/compile.rb in buildr-1.2.6

- old
+ new

@@ -227,13 +227,13 @@ @source_files ||= @sources.map(&:to_s).inject({}) do |map, source| raise "Compile task #{name} has source files, but no target directory" unless target target_dir = target.to_s if File.directory?(source) base = Pathname.new(source) - FileList["#{source}/**/*.java"]. - each { |file| map[file] = File.join(target_dir, Pathname.new(file).relative_path_from(base).to_s.ext(".class")) } + FileList["#{source}/**/*.java"].reject { |file| File.directory?(file) }. + each { |file| map[file] = File.join(target_dir, Pathname.new(file).relative_path_from(base).to_s.ext('.class')) } else - map[source] = File.join(target_dir, File.basename(source).ext(".class")) + map[source] = File.join(target_dir, File.basename(source).ext('.class')) end map end end