Skip to content

Instantly share code, notes, and snippets.

@jarib
Created December 8, 2010 16:29
Show Gist options
  • Save jarib/733501 to your computer and use it in GitHub Desktop.
Save jarib/733501 to your computer and use it in GitHub Desktop.
Creating the bundled JRuby jar
==============================
Let's say we want to bundle these gems:
- Antwrap
- json_pure
- albacore
1. Check out JRuby HEAD
git clone git://github.com/jruby/jruby.git
2. Edit build.xml's jar-complete target like this, to make sure we get dependencies:
<arg line="--command maybe_install_gems ${complete.jar.gems}"/>
- <arg line="--no-ri --no-rdoc --ignore-dependencies --env-shebang"/>
+ <arg line="--no-ri --no-rdoc --env-shebang"/>
</java>
3. Edit default.build.properties' complete.jar.gems to only have the gems we want:
-complete.jar.gems=${rspec.gem} ${rake.gem} ${ruby.debug.gem} ${ruby.debug.base.gem} ${columnize.gem}
+complete.jar.gems=${rspec.gem} ${rake.gem} Antwrap json_pure albacore
4. Run `ant clean jar-complete`
5. Make sure you don't see any messages about gems being "already installed". If you do:
1. If you have rvm installed, switch to system (rvm use system), and make sure your system ruby doesn't have the gem in question installed..
2. Make sure you don't have a ~/.gem/jruby folders directory where the build process may find gems (rm -rf ~/.jruby).
(you can check with `java -jar lib/jruby-complete.jar -S gem which <file-you-would-require>`)
3. Run `ant clean jar-complete` again
6. Copy the finished jar from <jruby>/lib/jruby-complete.jar to <selenium>/third_party/jruby/jruby-complete.jar
7. Update third_party/jruby/VERSION.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment