lib/buildr4osgi/compile/compiler.rb in buildr4osgi-0.9.2 vs lib/buildr4osgi/compile/compiler.rb in buildr4osgi-0.9.3

- old
+ new

@@ -25,19 +25,17 @@ 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? cmd_args << '-d' << File.expand_path(target) cmd_args += osgic_args cmd_args += files_from_sources(sources) unless Buildr.application.options.dryrun - trace((%w[javac -classpath org.eclipse.jdt.internal.compiler.batch.Main] + cmd_args).join(' ')) + trace((%w[java -classpath org.eclipse.jdt.internal.compiler.batch.Main] + cmd_args).join(' ')) Java.load Java.org.eclipse.jdt.internal.compiler.batch.Main.compile(cmd_args.join(" ")) or fail 'Failed to compile, see errors above' end end \ No newline at end of file