Author: assaf
Date: Wed Mar  5 19:02:45 2008
New Revision: 634137

URL: http://svn.apache.org/viewvc?rev=634137&view=rev
Log:
Using -classpath instead of -cp

Modified:
    incubator/buildr/trunk/lib/java/compilers.rb
    incubator/buildr/trunk/lib/java/java.rb

Modified: incubator/buildr/trunk/lib/java/compilers.rb
URL: 
http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/java/compilers.rb?rev=634137&r1=634136&r2=634137&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/java/compilers.rb (original)
+++ incubator/buildr/trunk/lib/java/compilers.rb Wed Mar  5 19:02:45 2008
@@ -56,7 +56,7 @@
         cmd_args = []
         tools = File.expand_path('lib/tools.jar', ENV['JAVA_HOME']) if 
ENV['JAVA_HOME']
         dependencies << tools if tools && File.exist?(tools)
-        cmd_args << '-cp' << dependencies.join(File::PATH_SEPARATOR) unless 
dependencies.empty?
+        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?
         cmd_args << '-d' << File.expand_path(target)
@@ -136,7 +136,7 @@
         check_options options, OPTIONS
 
         cmd_args = []
-        cmd_args << '-cp' << (dependencies + 
Scalac.dependencies).join(File::PATH_SEPARATOR)
+        cmd_args << '-classpath' << (dependencies + 
Scalac.dependencies).join(File::PATH_SEPARATOR)
         source_paths = sources.select { |source| File.directory?(source) }
         cmd_args << '-sourcepath' << source_paths.join(File::PATH_SEPARATOR) 
unless source_paths.empty?
         cmd_args << '-d' << File.expand_path(target)
@@ -408,7 +408,7 @@
         cmd_args << '-nocompile' << '-s' << task.name
         cmd_args << '-source' << compile.options.source if 
compile.options.source
         classpath = Buildr.artifacts(compile.dependencies).map(&:to_s).each { 
|t| task(t).invoke }
-        cmd_args << '-cp' << classpath.join(File::PATH_SEPARATOR) unless 
classpath.empty?
+        cmd_args << '-classpath' << classpath.join(File::PATH_SEPARATOR) 
unless classpath.empty?
         cmd_args += (sources.map(&:to_s) - [task.name]).
           map { |file| File.directory?(file) ? FileList["#{file}/**/*.java"] : 
file }.flatten
         unless Rake.application.options.dryrun

Modified: incubator/buildr/trunk/lib/java/java.rb
URL: 
http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/java/java.rb?rev=634137&r1=634136&r2=634137&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/java/java.rb (original)
+++ incubator/buildr/trunk/lib/java/java.rb Wed Mar  5 19:02:45 2008
@@ -52,7 +52,7 @@
         name = options[:name] || "java #{args.first}"
         cmd_args = [path_to_bin('java')]
         classpath = classpath_from(options)
-        cmd_args << '-cp' << classpath.join(File::PATH_SEPARATOR) unless 
classpath.empty?
+        cmd_args << '-classpath' << classpath.join(File::PATH_SEPARATOR) 
unless classpath.empty?
         options[:properties].each { |k, v| cmd_args << "-D#{k}=#{v}" } if 
options[:properties]
         cmd_args += (options[:java_args] || (ENV['JAVA_OPTS'] || 
ENV['JAVA_OPTIONS']).to_s.split).flatten
         cmd_args += args.flatten.compact
@@ -94,7 +94,7 @@
         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)
-        cmd_args << '-cp' << classpath.join(File::PATH_SEPARATOR) unless 
classpath.empty?
+        cmd_args << '-classpath' << classpath.join(File::PATH_SEPARATOR) 
unless classpath.empty?
         cmd_args += files
         unless Rake.application.options.dryrun
           puts 'Running apt' if verbose
@@ -127,7 +127,7 @@
 
         cmd_args = []
         classpath = classpath_from(options)
-        cmd_args << '-cp' << classpath.join(File::PATH_SEPARATOR) unless 
classpath.empty?
+        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 << '-d' << options[:output].to_s if options[:output]
         cmd_args += options[:javac_args].flatten if options[:javac_args]


Reply via email to