buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as...@apache.org
Subject svn commit: r697904 - in /incubator/buildr/trunk/lib/buildr/java: jruby.rb rjb.rb
Date Mon, 22 Sep 2008 17:27:43 GMT
Author: assaf
Date: Mon Sep 22 10:27:42 2008
New Revision: 697904

URL: http://svn.apache.org/viewvc?rev=697904&view=rev
Log:
Java.classpath accepts procs for lazy-evaluation.  Required if we need to add a dependency
to the root classpath (e.g. Ant) but determine the dependency after loading Buildr application
(e.g. get the version number from build.yaml file).

Modified:
    incubator/buildr/trunk/lib/buildr/java/jruby.rb
    incubator/buildr/trunk/lib/buildr/java/rjb.rb

Modified: incubator/buildr/trunk/lib/buildr/java/jruby.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/java/jruby.rb?rev=697904&r1=697903&r2=697904&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/java/jruby.rb (original)
+++ incubator/buildr/trunk/lib/buildr/java/jruby.rb Mon Sep 22 10:27:42 2008
@@ -102,6 +102,7 @@
       # Most platforms requires tools.jar to be on the classpath.
       add_path[tools_jar] if tools_jar
       
+      classpath.map! { |path| Proc === path ? path.call : path }      
       Buildr.artifacts(classpath).map(&:to_s).each do |path|
         file(path).invoke
         add_path[path]

Modified: incubator/buildr/trunk/lib/buildr/java/rjb.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/java/rjb.rb?rev=697904&r1=697903&r2=697904&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/java/rjb.rb (original)
+++ incubator/buildr/trunk/lib/buildr/java/rjb.rb Mon Sep 22 10:27:42 2008
@@ -108,6 +108,7 @@
       return self if @loaded
       classpath << tools_jar if tools_jar
       
+      classpath.map! { |path| Proc === path ? path.call : path }
       cp = Buildr.artifacts(classpath).map(&:to_s).each { |path| file(path).invoke }
       java_opts = (ENV['JAVA_OPTS'] || ENV['JAVA_OPTIONS']).to_s.split
       ::Rjb.load cp.join(File::PATH_SEPARATOR), java_opts



Mime
View raw message