assets/rakelib/ruboto.rake in ruboto-0.9.0 vs assets/rakelib/ruboto.rake in ruboto-0.10.0.rc.0
- old
+ new
@@ -268,27 +268,31 @@
# Expand JARs
Dir.chdir gem_path do
Dir['*'].each do |gem_lib|
Dir.chdir "#{gem_lib}/lib" do
Dir['**/*.jar'].each do |jar|
+ unless jar =~ /sqlite-jdbc/
+ puts "Expanding #{gem_lib} #{jar} into #{BUNDLE_JAR}"
+ `jar xf #{jar}`
+ end
if jar == 'arjdbc/jdbc/adapter_java.jar'
jar_load_code = <<-END_CODE
require 'jruby'
Java::arjdbc.jdbc.AdapterJavaService.new.basicLoad(JRuby.runtime)
END_CODE
+ classes = Dir['arjdbc/**/*']
+ dbs = /db2|derby|firebird|h2|hsqldb|informix|mimer|mssql|mysql|oracle|postgres|sybase/i
+ files = classes.grep(dbs)
+ FileUtils.rm_f(files)
elsif jar =~ /shared\/jopenssl.jar$/
jar_load_code = <<-END_CODE
require 'jruby'
puts 'Starting JRuby OpenSSL Service'
public
Java::JopensslService.new.basicLoad(JRuby.runtime)
END_CODE
else
jar_load_code = ''
- end
- unless jar =~ /sqlite-jdbc/
- puts "Expanding #{gem_lib} #{jar} into #{BUNDLE_JAR}"
- `jar xf #{jar}`
end
puts "Writing dummy JAR file #{jar + '.rb'}"
File.open(jar + '.rb', 'w') { |f| f << jar_load_code }
if jar.end_with?('.jar')
puts "Writing dummy JAR file #{jar.sub(/.jar$/, '.rb')}"