buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toulm...@apache.org
Subject svn commit: r990496 - /buildr/trunk/lib/buildr/java/commands.rb
Date Sun, 29 Aug 2010 05:36:55 GMT
Author: toulmean
Date: Sun Aug 29 05:36:55 2010
New Revision: 990496

URL: http://svn.apache.org/viewvc?rev=990496&view=rev
Log:
allow for single sourcepath argument, and lazily create output

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

Modified: buildr/trunk/lib/buildr/java/commands.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/commands.rb?rev=990496&r1=990495&r2=990496&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/commands.rb (original)
+++ buildr/trunk/lib/buildr/java/commands.rb Sun Aug 29 05:36:55 2010
@@ -128,11 +128,12 @@ module Java
         cmd_args = []
         classpath = classpath_from(options)
         cmd_args << '-classpath' << classpath.join(File::PATH_SEPARATOR) unless
classpath.empty?
-        cmd_args << '-sourcepath' << options[:sourcepath].join(File::PATH_SEPARATOR)
if options[:sourcepath]
+        cmd_args << '-sourcepath' << [options[:sourcepath]].flatten.join(File::PATH_SEPARATOR)
if options[:sourcepath]
         cmd_args << '-d' << options[:output].to_s if options[:output]
         cmd_args += options[:javac_args].flatten if options[:javac_args]
         cmd_args += files
         unless Buildr.application.options.dryrun
+          mkdir_p options[:output] if options[:output]
           info "Compiling #{files.size} source files in #{name}"
           trace (['javac'] + cmd_args).join(' ')
           Java.load



Mime
View raw message