How to build a gem
By dochez on Nov 16, 2007
It's been quite public for some time that we have a special distribution of GlassFish V3 as a Ruby Gem file. Ruby gems are the packaging technology for ruby extensions, and having a gem distribution of GlassFish is interesting to the JRuby users community.
Arun has blogged there about how to use the gem so I will just describe here how to build it.
To build the gem, you will need to following software :
- subversion to checkout the code
- maven to build
- jruby 1.0.1
The gem building is not part of the mainstream GlassFish build because it requires JRuby... The first thing to decide is whether you want to checkout the entire GlassFish V3 workspace or just checkout the gem distribution module.
Case 1 : Entire V3 workspace
First you should look into this document if you plan to change/add code to V3.
svn checkout https://svn.dev.java.net/svn/glassfish-svn/trunk/v3
Once you have done that you have a glassfish build, you can just build the gem distribution by :
Case 2 : Just the Gem
To checkout the gem module
svn checkout https://svn.dev.java.net/svn/glassfish-svn/trunk/v3/distributions/gem
Now in either case, you will find the gem file in target/dependency/glassfish/pkg directory, and you can install it in your jruby installation by doing
gem install target/dependency/glassfish/pkg/GlassFish-10.0.0-java.gem
Once this is done, you just need to refer back to Arun's blog on how to use the Gem !