lib/java/java.rb in buildr-1.1.1 vs lib/java/java.rb in buildr-1.1.2

- old
+ new

@@ -1,10 +1,10 @@ require "rjb" require "core/project" module Buildr - + # Base module for all things Java. module Java # Options accepted by #java and other methods here. JAVA_OPTIONS = [ :verbose, :classpath, :name, :java_args, :properties ] @@ -80,17 +80,17 @@ end # :call-seq: # tools_jar() => path # - # Returns a path to tools.jar. Returns nil if tools.jar not found, which may be a problem, - # unless you're running OS/X. + # Returns a path to tools.jar. On OS/X which has not tools.jar, returns an empty array, + # on all other platforms, fails if it doesn't find tools.jar. def tools_jar() - return nil if darwin? - @tools ||= File.join(home, "lib/tools.jar") or raise "I need tools.jar to compile, can't find it in #{home}/lib" + return [] if darwin? + @tools ||= [File.join(home, "lib/tools.jar")] or raise "I need tools.jar to compile, can't find it in #{home}/lib" end - + # :call-seq: # home() => path # # Returns JAVA_HOME, fails if JAVA_HOME not set. def home() @@ -273,10 +273,10 @@ # * :properties -- Hash of system properties (e.g. "path"=>base_dir). # * :verbose -- If true, prints the command and all its argument. def junit(*args) options = Hash === args.last ? args.pop : {} options[:verbose] ||= Rake.application.options.trace || false - rake_check_options options, :verbose, :classpath, :properties + rake_check_options options, :verbose, :classpath, :properties, :java_args classpath = classpath_from(options) + junit_artifacts tests = args.flatten failed = tests.inject([]) do |failed, test| begin