You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2014/08/25 23:04:25 UTC

[1/4] git commit: BUILDR-688: Exclude package-info.java files from Javac compile_map

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 <pe...@vaneeckhoudt.net>
Authored: Mon Aug 25 11:37:06 2014 +0200
Committer: Pepijn Van Eeckhoudt <pe...@vaneeckhoudt.net>
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:


[3/4] git commit: BUILDR-688: Add spec to check recompile is not triggered

Posted by do...@apache.org.
BUILDR-688: Add spec to check recompile is not triggered


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/c292e7df
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/c292e7df
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/c292e7df

Branch: refs/heads/master
Commit: c292e7df8a56638b7d070cecc96c6469e7bf9d38
Parents: feca29a
Author: Pepijn Van Eeckhoudt <pe...@vaneeckhoudt.net>
Authored: Mon Aug 25 12:10:14 2014 +0200
Committer: Pepijn Van Eeckhoudt <pe...@vaneeckhoudt.net>
Committed: Mon Aug 25 12:10:14 2014 +0200

----------------------------------------------------------------------
 spec/java/compiler_spec.rb | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/c292e7df/spec/java/compiler_spec.rb
----------------------------------------------------------------------
diff --git a/spec/java/compiler_spec.rb b/spec/java/compiler_spec.rb
index e23022b..305ea6f 100644
--- a/spec/java/compiler_spec.rb
+++ b/spec/java/compiler_spec.rb
@@ -106,6 +106,13 @@ describe 'javac compiler' do
     define('foo').compile.invoke
     file('target/classes/UseApt.class').should exist
   end
+
+  it 'should ignore package-info.java files in up-to-date check' do
+    write 'src/main/java/foo/Test.java', 'package foo; class Test { public void foo() {} }'
+    write 'src/main/java/foo/package-info.java', 'package foo;'
+    lambda{ define('foo').compile.invoke }.should run_task('foo:compile')
+    lambda{ define('bar').compile.invoke }.should_not run_task('bar:compile')
+  end
 end
 
 


[4/4] git commit: Give some credit

Posted by do...@apache.org.
Give some credit


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/966dd7a2
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/966dd7a2
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/966dd7a2

Branch: refs/heads/master
Commit: 966dd7a2b656f8bcaae6fd3434adebdca5520f0e
Parents: c292e7d
Author: Peter Donald <pe...@realityforge.org>
Authored: Tue Aug 26 06:43:56 2014 +1000
Committer: Peter Donald <pe...@realityforge.org>
Committed: Tue Aug 26 06:43:56 2014 +1000

----------------------------------------------------------------------
 CHANGELOG | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/966dd7a2/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index d072817..bf08a47 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 1.4.20 (2014-08-23)
 * Fixed : BUILDR-688 - Disregard package-info.java files when determining if
-          the Javac compiler should be run or not.
+          the Javac compiler should be run or not. Submitted by Pepijn Van
+          Eeckhoudt.
 * Fixed : Work around bug/feature of jruby 1.7.13 that caches Gem::Version
           objects based on constructor parameters that causes issues with
           Buildr as we mutate the version objects through monkey patching.


[2/4] git commit: BUILDR-688: Add entry in CHANGELOG

Posted by do...@apache.org.
BUILDR-688: Add entry in CHANGELOG


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/feca29aa
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/feca29aa
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/feca29aa

Branch: refs/heads/master
Commit: feca29aaa8587782a933c83db8c44735911f52ef
Parents: 9a5eb0e
Author: Pepijn Van Eeckhoudt <pe...@vaneeckhoudt.net>
Authored: Mon Aug 25 11:41:00 2014 +0200
Committer: Pepijn Van Eeckhoudt <pe...@vaneeckhoudt.net>
Committed: Mon Aug 25 11:41:00 2014 +0200

----------------------------------------------------------------------
 CHANGELOG | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/feca29aa/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 1a48c6a..d072817 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,6 @@
 1.4.20 (2014-08-23)
+* Fixed : BUILDR-688 - Disregard package-info.java files when determining if
+          the Javac compiler should be run or not.
 * Fixed : Work around bug/feature of jruby 1.7.13 that caches Gem::Version
           objects based on constructor parameters that causes issues with
           Buildr as we mutate the version objects through monkey patching.