Skip to content

Commit abe0778

Browse files
committed
SimonStewart: Allowing a build to be more self-contained when using jruby.
r8806
1 parent 06fe6d5 commit abe0778

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

rake-tasks/crazy_fun/mappings/java.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module Antwrap
3333
module AntwrapClassLoader
3434
def load_ant_libs(ant_home)
3535
jars = match(ant_home) {|p| ext = p[-4...p.size]; ext && ext.downcase == '.jar'}
36+
jars.push 'third_party/java/eclipse_compiler/ecj-3.5.2.jar'
3637

3738
if(RUBY_PLATFORM == 'java')
3839
jars.each {|jar| require jar }
@@ -52,6 +53,7 @@ module CrazyFunJava
5253
@ant = Antwrap::AntProject.new(:name => 'selenium',
5354
:ant_home => 'third_party/java/ant', :basedir => '.')
5455
@ant.project.setProperty('XmlLogger.file', 'build/build_log.xml')
56+
@ant.project.setProperty('build.compiler', 'org.eclipse.jdt.core.JDTCompilerAdapter');
5557

5658
# Silence logging to the console, and output to the xml build file
5759
@ant.project.getBuildListeners().get(0).setMessageOutputLevel(verbose ? 2 : 0)
@@ -212,7 +214,9 @@ def handle(fun, dir, args)
212214
ant.pathelement(:location => jar)
213215
end
214216
end
215-
CrazyFunJava.ant.javac(:srcdir => '.', :destdir => out_dir, :includeAntRuntime => false) do |ant|
217+
CrazyFunJava.ant.javac(:srcdir => '.', :destdir => out_dir, :includeAntRuntime => false,
218+
:optimize => true, :debug => true, :nowarn => true,
219+
:source => '1.5', :target => '1.5') do |ant|
216220
ant.classpath(:refid => "#{args[:name]}.path")
217221
args[:srcs].each do |src_glob|
218222
ant.include(:name => [dir, src_glob].join(File::SEPARATOR))
@@ -404,4 +408,4 @@ def handle(fun, dir, args)
404408
end
405409
end
406410

407-
end # End of java module
411+
end # End of java module
Binary file not shown.
1.61 MB
Binary file not shown.

0 commit comments

Comments
 (0)