Backporting JRuby 1.4 to Spring 2

February 26, 2010

Let’s say your on a project that has never upgraded its version of spring ;P) hopefully cause you’ve found Jruby so great you wouldn’t bother with it again. However now you have to modify a piece of the codebase in spring and to avoid the nastiness you decide to do it in spring, but Spring 2 only supports Jruby 0.99 so your out of luck ;/ It turns out its really simple to backport support.

Step 1. Download a copy of spring 3 Download Spring 3

Step 2. Extract org.springframework.core-sources-3.0.1.RELEASE-A.jar

Step 4. Copy org.SpringFramework.core.util.ReflectionUtils.java to your local project *in proper namespace of course

Step 5. Extract org.springframework.context-sources-3.0.1.RELEASE-A.jar

Step 6. Copy org.SpringFramework.jruby.JRubyScriptFactory.java and JRubyScriptUtils.java to your project *in proper namespace of course

Step 7. Compile and bam now your spring beans support jruby 1.4 (i.e spring beans Jruby in Spring )

Step 8. Profit!



blog comments powered by Disqus