By pramodg on Mar 14, 2008
This blog details the steps to be followed if you plan to build the GlassFish V3 gem 0.1.2 gem.
Build Steps :
cd "SomeDirForGem" svn checkout --revision=18807 https://svn.dev.java.net/svn/glassfish-svn/trunk/v3 --username guest cd v3 mvn -U install cd distributions/gem mvn installTechnically one should be able to just get the v3 gem and build it and jruby stuff should work. But just to be on the safe side I am providing the revision number so that svn would checkout and build the same bits that I have used when publishing the gem.
At the end of the steps, mentioned above you would have the gem created and available at :
SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gemTo use this gem with your JRuby installation :
jruby -S gem install SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gem(to install the gem for the first time)
jruby -S gem update SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gem(to update an existing glassfish gem)
Code layout Information :In V3 land the code related to the JRuby interaction can be found under v3/extras/rails directory. This code layer is a wrapper and eventually delegates to the JRuby module, obtained from the Grizzly project. There have been questions asked on why the code is not in one place. The best way that I can answer this question is is by stating that the initial support for JRuby was provided as part of the Grizzly - JRuby module. This code predates the V3 activity. With the modular design of V3 it is easy to drop in a module and have V3 server support the new module. Hence to support JRuby in V3 the decision was made to use the JRuby module from Grizzly.
One task that was carried out before releasing the gem v0.1.2, was to move the jruby code from the module's area to the contribs area of Grizzly. The main reason to do this was to ensure that releases of the grizzly-jruby module could be done independent of grizzly releases. Also each release of the gem version would have a corresponding grizzly-jruby module released to the maven repository. This would make it easier to regenerate the code that was used to create and publish the gem at RubyForge.
For the gem v0.1.2 the V3 code gets the corresponding grizzly-jruby module as part of the build cycle and packages it into the gem.
For those of you who would like to checkout and build the grizzly-jruby module :
svn checkout https://grizzly.dev.java.net/svn/grizzly/trunk/contribs/jruby --username guest cd jruby mvn installAt this point of time after the successful execution of this steps you would have grizzly-jruby-0.1.2.jar, published to your local maven repository (~/.m2/repository). If you now build the v3 gem, it would use your newly created module.