forked from jruby/jruby-rack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildfile
37 lines (29 loc) · 1.04 KB
/
buildfile
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
37
#--
# 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.1'
require './src/jruby-trunk-fix.rb'
desc 'JRuby Rack adapter'
define 'jruby-rack' do
project.group = 'org.jruby.rack'
project.version = '0.9.1-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", "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