You can clone with
HTTPS or Subversion.
I'm having a bit of trouble creating a war file for a simple Sinatra-based webapp. I'm using the jruby-complete 1.7.0 jar, and my issue seems to relate to the JRuby jar shipping with rake. This seems to prevent bundler from unpacking the rake gem, which causes Warbler to bomb out when building its .war file.
Here's my self-contained test that reproduces what I'm seeing:
(mst@thweeble) ~$ mkdir warbler-test
(mst@thweeble) ~$ cd warbler-test
(mst@thweeble) ~/warbler-test$ wget http://jruby.org.s3.amazonaws.com/downloads/1.7.0/jruby-complete-1.7.0.jar --2012-11-08 15:42:26-- http://jruby.org.s3.amazonaws.com/downloads/1.7.0/jruby-complete-1.7.0.jar
Resolving jruby.org.s3.amazonaws.com... 188.8.131.52
Connecting to jruby.org.s3.amazonaws.com|184.108.40.206|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18833620 (18M) [application/java-archive]
Saving to: `jruby-complete-1.7.0.jar'
100%[=====================================================================================================================>] 18,833,620 713K/s in 28s
2012-11-08 15:42:55 (661 KB/s) - `jruby-complete-1.7.0.jar' saved [18833620/18833620]
(mst@thweeble) ~/warbler-test$ export GEM_HOME=$PWD/local_gems
(mst@thweeble) ~/warbler-test$ java -cp 'jruby-complete-1.7.0.jar' org.jruby.Main --1.9 -S gem install bundler
Fetching: bundler-1.2.1.gem (100%)
Successfully installed bundler-1.2.1
1 gem installed
(mst@thweeble) ~/warbler-test$ cat > Gemfile
(mst@thweeble) ~/warbler-test$ java -cp 'jruby-complete-1.7.0.jar' org.jruby.Main --1.9 local_gems/bin/bundle install
Fetching gem metadata from http://rubygems.org/...
Using rake (0.9.2.2)
Installing jruby-jars (1.7.0)
Installing jruby-rack (1.1.10)
Installing rubyzip (0.9.9)
Installing warbler (1.3.6)
Using bundler (1.2.1)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
(mst@thweeble) ~/warbler-test$ touch config.ru
(mst@thweeble) ~/warbler-test$ java -cp 'jruby-complete-1.7.0.jar' org.jruby.Main --1.9 local_gems/bin/warble war
rm -f warbler-test.war
entry 'META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-0.9.2.2/bin' not found in java.io.FileInputStream@4f50f0e2
Tasks: TOP => war:jar
(See full trace by running task with --trace)
Am I misunderstanding how this should work? Let me know if I can provide any further information.
Ah, a little more digging suggests that this might just be an issue with the trailing slash. It's looking for the string:
but the call to getName in entryInJar returns:
Stripping off that slash before doing the comparison does the trick for me. Happy to send a pull request if that sounds right.
@marktriggs please send a PR and I will review it
When comparing zip file entries, ignore trailing slashes (fixes issue #…
Sent as #122. Thanks Guillermo!