lib/warbler/config.rb in nicksieger-warbler-0.9.13 vs lib/warbler/config.rb in nicksieger-warbler-0.9.14

- old
+ new

@@ -1,7 +1,7 @@ #-- -# (c) Copyright 2007-2008 Sun Microsystems, Inc. +# (c) Copyright 2007-2009 Sun Microsystems, Inc. # See the file LICENSES.txt included with the distribution for # software license details. #++ require 'ostruct' @@ -89,15 +89,16 @@ # doesn't yield the right result. Instead, you need to generate the context parameters: # <%= webxml.context_params['maybe.present.key'] || 'default' %> attr_accessor :webxml def initialize(warbler_home = WARBLER_HOME) + @warbler_home = warbler_home @staging_dir = File.join("tmp", "war") @dirs = TOP_DIRS.select {|d| File.directory?(d)} @includes = FileList[] @excludes = FileList[] - @java_libs = FileList["#{warbler_home}/lib/*.jar"] + @java_libs = default_jar_files @java_classes = FileList[] @gems = Warbler::Gems.new @gem_dependencies = true @exclude_logs = true @public_html = FileList["public/**/*"] @@ -142,9 +143,14 @@ c.rails.env = ENV['RAILS_ENV'] || 'production' c.public.root = '/' c.jndi = nil c.ignored = %w(jndi booter) c + end + + def default_jar_files + require 'jruby-jars' + FileList["#{@warbler_home}/lib/*.jar", JRubyJars.core_jar_path, JRubyJars.stdlib_jar_path] end def auto_detect_frameworks !Warbler.framework_detection || auto_detect_rails || auto_detect_merb || auto_detect_rackup end