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/14 18:53:29 UTC
svn commit: r695252 - /incubator/buildr/trunk/lib/buildr/java/commands.rb
Author: lacton
Date: Sun Sep 14 09:53:29 2008
New Revision: 695252
URL: http://svn.apache.org/viewvc?rev=695252&view=rev
Log:
Refactored the 'apt' method so that it uses Java.tools_jar instead of having its own logic for finding 'tools.jar'
Modified:
incubator/buildr/trunk/lib/buildr/java/commands.rb
Modified: incubator/buildr/trunk/lib/buildr/java/commands.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/java/commands.rb?rev=695252&r1=695251&r2=695252&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/java/commands.rb (original)
+++ incubator/buildr/trunk/lib/buildr/java/commands.rb Sun Sep 14 09:53:29 2008
@@ -83,8 +83,7 @@
end
cmd_args << '-source' << options[:source] if options[:source]
classpath = classpath_from(options)
- tools = File.expand_path('lib/tools.jar', ENV['JAVA_HOME']) if ENV['JAVA_HOME']
- classpath << tools if tools && File.exist?(tools)
+ Java.tools_jar { |tools| classpath << tools }
cmd_args << '-classpath' << classpath.join(File::PATH_SEPARATOR) unless classpath.empty?
cmd_args += files
unless Buildr.application.options.dryrun