Author: toulmean
Date: Wed Jun 30 22:17:59 2010
New Revision: 959459

URL: http://svn.apache.org/viewvc?rev=959459&view=rev
Log:
make sure to add tools.jar to the classpath. On Mac, this is done by the OS, 
but it needs to be done explicitly on Linux and Windows.

Modified:
    buildr/trunk/lib/buildr/java/external.rb

Modified: buildr/trunk/lib/buildr/java/external.rb
URL: 
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/external.rb?rev=959459&r1=959458&r2=959459&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/external.rb (original)
+++ buildr/trunk/lib/buildr/java/external.rb Wed Jun 30 22:17:59 2010
@@ -26,6 +26,8 @@ module Buildr
       def compile(sources, target, dependencies) #:nodoc:
         check_options options, OPTIONS
         cmd_args = []
+        # tools.jar contains the Java compiler.
+        dependencies << Java.tools_jar if Java.tools_jar
         cmd_args << '-classpath' << dependencies.join(File::PATH_SEPARATOR) 
unless dependencies.empty?
         source_paths = sources.select { |source| File.directory?(source) }
         cmd_args << '-sourcepath' << source_paths.join(File::PATH_SEPARATOR) 
unless source_paths.empty?


Reply via email to