public
Description: Rack for JRuby and Java appservers
Homepage: http://wiki.jruby.org/wiki/JRuby_Rack
Clone URL: git://github.com/nicksieger/jruby-rack.git
jruby-rack / buildfile
100644 36 lines (28 sloc) 1.043 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#--
# Copyright 2007-2008 Sun Microsystems, Inc.
# This source code is available under the MIT license.
# See the file LICENSE.txt for details.
#++
 
repositories.remote << "http://repo1.maven.org/maven2" << "http://snapshots.repository.codehaus.org"
 
JRUBY = 'org.jruby:jruby-complete:jar:1.1.3'
 
desc 'JRuby Rack adapter'
define 'jruby-rack' do
  project.group = 'org.jruby.rack'
  project.version = '0.9.3-SNAPSHOT'
  compile.with 'javax.servlet:servlet-api:jar:2.3', JRUBY
  meta_inf << file("src/main/tld/jruby-rack.tld")
 
  directory _("target")
  task :unpack_gems => _("target") do |t|
    Dir.chdir(t.prerequisites.first) do
      unless File.directory?(_("target/rack"))
        ruby "-S", "gem", "unpack", "-v", "0.4.0", "rack"
        mv FileList["rack-*"].first, "rack"
      end
    end
  end
 
  resources.from _('src/main/ruby'), _('target/rack/lib')
  task :resources => task('unpack_gems')
 
  test.using :rspec
 
  # Exclude the test stubs from the final jar
  package(:jar).exclude(_('target/classes/org/jruby/rack/fake'))
end