You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by la...@apache.org on 2008/09/13 16:33:17 UTC

svn commit: r694956 - /incubator/buildr/trunk/lib/buildr/java/jruby.rb

Author: lacton
Date: Sat Sep 13 07:33:16 2008
New Revision: 694956

URL: http://svn.apache.org/viewvc?rev=694956&view=rev
Log:
Refactoring to reduce code duplication.  Moving shared code between jruby.rb and rjb.rb to java.rb.

Modified:
    incubator/buildr/trunk/lib/buildr/java/jruby.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=694956&r1=694955&r2=694956&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/java/jruby.rb (original)
+++ incubator/buildr/trunk/lib/buildr/java/jruby.rb Sat Sep 13 07:33:16 2008
@@ -89,12 +89,7 @@
       add_url_method.setAccessible(true)
       add_path = lambda { |path| add_url_method.invoke(sysloader, [java.io.File.new(path).toURI.toURL].to_java(java.net.URL)) }
 
-      # Most platforms requires tools.jar to be on the classpath, tools.jar contains the
-      # Java compiler (OS X and AIX are two exceptions we know about, may be more).
-      # Guess where tools.jar is from JAVA_HOME, which hopefully points to the JDK,
-      # but maybe the JRE.
-      tools_jar = [File.expand_path('lib/tools.jar', ENV['JAVA_HOME']), File.expand_path('../lib/tools.jar', ENV['JAVA_HOME'])].
-        find { |path| File.exist?(path) }
+      # Most platforms requires tools.jar to be on the classpath.
       add_path[tools_jar] if tools_jar
       
       Buildr.artifacts(classpath).map(&:to_s).each do |path|