Repository: buildr Updated Branches: refs/heads/master 21d922ae7 -> 966dd7a2b
BUILDR-688: Exclude package-info.java files from Javac compile_map Project: http://git-wip-us.apache.org/repos/asf/buildr/repo Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/9a5eb0e9 Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/9a5eb0e9 Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/9a5eb0e9 Branch: refs/heads/master Commit: 9a5eb0e95654724d93728a2a355e37688578133e Parents: 21d922a Author: Pepijn Van Eeckhoudt <[email protected]> Authored: Mon Aug 25 11:37:06 2014 +0200 Committer: Pepijn Van Eeckhoudt <[email protected]> Committed: Mon Aug 25 11:37:06 2014 +0200 ---------------------------------------------------------------------- lib/buildr/java/compiler.rb | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/buildr/blob/9a5eb0e9/lib/buildr/java/compiler.rb ---------------------------------------------------------------------- diff --git a/lib/buildr/java/compiler.rb b/lib/buildr/java/compiler.rb index 5cce192..971ddbc 100644 --- a/lib/buildr/java/compiler.rb +++ b/lib/buildr/java/compiler.rb @@ -64,6 +64,13 @@ module Buildr #:nodoc: end end + # Filter out source files that are known to not produce any corresponding .class output file. If we leave + # this type of file in the generated compile map the compiler will always be run due to missing output files. + def compile_map(sources, target) + map = super + map.reject! { |key,_| File.basename(key) == 'package-info.java' } || map + end + private def javac_args #:nodoc:
