I've been reading through the warbler source code, and I can't figure out how the jruby-jars and jruby-rack jars are meant to end up on the servlet classpath?
It seems warbler is copying them into web-inf/gems/gems/<gemname>/lib/<jarname>.jar
but they are not on the classpath.
I'm guessing that if I put them in my开发者_JAVA技巧 ruby apps lib/ folder they would be copied to web-inf/lib and all would be well, however, it seems odd to have 2 copies of the jar in the war file, is that what I am meant to do?
Ben
They should be copied into WEB-INF/lib/.jar. The code for locating the jars is here:
http://github.com/nicksieger/warbler/blob/master/lib/warbler/config.rb#L216-220
And the code that copies them into WEB-INF/lib is here:
http://github.com/nicksieger/warbler/blob/master/lib/warbler/war.rb#L68-70
If you're seeing something else, then it's a bug. Also, you shouldn't have to explicitly state dependencies on the JRuby jar file gems.
精彩评论