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/09 23:48:36 UTC

[1/3] git commit: [BUILDR-701] update harmcrest dependancy version

Repository: buildr
Updated Branches:
  refs/heads/master 762241885 -> 373e38b47


[BUILDR-701] update harmcrest dependancy version

as seen in https://issues.apache.org/jira/browse/BUILDR-701
junit doesn't come with harmcrest dependancy, we have to add it explicitely

without, some people might experience some ClassNotFoundException

it is possible to overide harmcrest version with Buildr.settings.build['harmcrest'],
as it is done with junit or jmock


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

Branch: refs/heads/master
Commit: eb0dfce954bc0261430e3150773d65112c990980
Parents: 472da42
Author: Jean-Philippe CARUANA <jp...@target2sell.com>
Authored: Thu Jul 31 11:32:24 2014 +0200
Committer: Jean-Philippe CARUANA <jp...@target2sell.com>
Committed: Thu Jul 31 11:32:24 2014 +0200

----------------------------------------------------------------------
 lib/buildr/java/tests.rb | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/eb0dfce9/lib/buildr/java/tests.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/java/tests.rb b/lib/buildr/java/tests.rb
index 95ef71d..1f86aab 100644
--- a/lib/buildr/java/tests.rb
+++ b/lib/buildr/java/tests.rb
@@ -103,8 +103,9 @@ module Buildr #:nodoc:
         @dependencies ||= ["#{group}:jmock:jar:#{version}"]
         if two_or_later
           @dependencies << "org.jmock:jmock-junit#{Buildr::JUnit.version.to_s[0,1]}:jar:#{version}"
-          @dependencies << "org.hamcrest:hamcrest-core:jar:1.1"
-          @dependencies << "org.hamcrest:hamcrest-library:jar:1.1"
+          Harmcrest.dependencies.each { |dependency|
+            @dependencies << dependency
+          }
         end
         @dependencies
       end
@@ -119,6 +120,23 @@ module Buildr #:nodoc:
   end
 
 
+  # Provides a library of matcher objects (also known as constraints or predicates) allowing 'match' rules to be defined declaratively, to be used in other frameworks.
+  module Harmcrest
+
+    VERSION = '1.3'
+
+    class << self
+      def version
+        Buildr.settings.build['harmcrest'] || VERSION
+      end
+
+      def dependencies
+        @dependencies ||= ["org.hamcrest:hamcrest-core:jar:#{version}", "org.hamcrest:hamcrest-library:jar:#{version}"]
+      end
+
+  end
+
+
   # JUnit test framework, the default test framework for Java tests.
   #
   # Support the following options:
@@ -198,7 +216,7 @@ module Buildr #:nodoc:
       end
 
       def dependencies
-        @dependencies ||= ["junit:junit:jar:#{version}"]+ JMock.dependencies
+        @dependencies ||= ["junit:junit:jar:#{version}"] + JMock.dependencies + Harmcrest.dependencies
       end
 
       def ant_taskdef #:nodoc:


[3/3] git commit: Merge remote-tracking branch 'origin/pr/11'

Posted by do...@apache.org.
Merge remote-tracking branch 'origin/pr/11'


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

Branch: refs/heads/master
Commit: 373e38b4715da5123d261e4c724fd7fc4f30144b
Parents: 7622418 02a12cc
Author: Peter Donald <pe...@realityforge.org>
Authored: Sun Aug 10 07:46:56 2014 +1000
Committer: Peter Donald <pe...@realityforge.org>
Committed: Sun Aug 10 07:46:56 2014 +1000

----------------------------------------------------------------------

----------------------------------------------------------------------



[2/3] git commit: fix: I had to implement a private const_missing for Harmcrest module

Posted by do...@apache.org.
fix: I had to implement a private const_missing for Harmcrest module


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

Branch: refs/heads/master
Commit: 02a12cc0baebdb33816589e906625364c6f20928
Parents: eb0dfce
Author: Jean-Philippe CARUANA <jp...@target2sell.com>
Authored: Thu Jul 31 12:03:33 2014 +0200
Committer: Jean-Philippe CARUANA <jp...@target2sell.com>
Committed: Thu Jul 31 12:03:33 2014 +0200

----------------------------------------------------------------------
 lib/buildr/java/tests.rb | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/02a12cc0/lib/buildr/java/tests.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/java/tests.rb b/lib/buildr/java/tests.rb
index 1f86aab..8925d95 100644
--- a/lib/buildr/java/tests.rb
+++ b/lib/buildr/java/tests.rb
@@ -134,6 +134,13 @@ module Buildr #:nodoc:
         @dependencies ||= ["org.hamcrest:hamcrest-core:jar:#{version}", "org.hamcrest:hamcrest-library:jar:#{version}"]
       end
 
+    private
+      def const_missing(const)
+        return super unless const == :REQUIRES # TODO: remove in 1.5
+        Buildr.application.deprecated "Please use Harmcrest.dependencies/.version instead of Harmcrest::REQUIRES/VERSION"
+        dependencies
+      end
+    end
   end