Warbler Rake task. Allows defining multiple configurations inside the same Rakefile by using different task names.
To define multiple Warbler configurations in a single project, use code like the following in a Rakefile:
Warbler::Task.new("war1", Warbler::Config.new do |config| config.jar_name = "war1" # ... end Warbler::Task.new("war2", Warbler::Config.new do |config| config.jar_name = "war2" # ... end
With this setup, you can create two separate war files two different configurations by running rake war1 war2.
# File lib/warbler/task.rb, line 43 def initialize(name = nil, config = nil) @config = config if @config.nil? && File.exists?(Config::FILE) @config = eval(File.read(Config::FILE), binding, Config::FILE, 0) end @config ||= Config.new unless @config.kind_of? Config $stderr.puts "Warbler::Config not provided by override in initializer or #{Config::FILE}; using defaults" @config = Config.new end @name = name || @config.jar_extension @jar = Warbler::Jar.new yield self if block_given? define_tasks end
Generated with the Darkfish Rdoc Generator 2.