views:

114

answers:

1

Can a plugin be packaged as a JAR/WAR file similar to the way in which an entire Rails app can be packaged for deployment on JRuby?

+1  A: 

either you want warbler or you want to make a jar.

If you need an empty rails app with that plugin, create an empty project, install the plugin and, edit config/warble.rb to copy the gems you need

If you need a jar with class files from that plugin; you need jrubyc to compile the rb files to class files that you can then turn into a jar with the java jar command. Put that jar into WEB-INF/lib of any Java app that needs those ruby classes.

sal
I looked at warbler prior to asking the question but it only seemed to support packaging of entire Rails apps, not just singular plugins.
Kris
A plugin packed in a war file is not likely to be accessible by other apps running on that server. Most Java app servers use private class loaders for each application running. Most app servers have a shared lib directory for
sal