Forum: JRuby Create custom jruby-complete.jar

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F3e81d3066d0ce582adac6f57e0834cc?d=identicon&s=25 Roy Tinker (Guest)
on 2009-04-22 00:55
(Received via mailing list)
Hello all,

I've read rumors that this is possible, but I haven't been able to find
instructions: how do I build a custom jruby-complete.jar (i.e. including
gems that are not part of the standard jruby-complete.jar).

Thanks,
Roy
E2bbe31fb94e92f5f404c5cb550c371f?d=identicon&s=25 David Koontz (Guest)
on 2009-04-22 01:31
(Received via mailing list)
A jar file is just a zip with some extra data.  You can unzip the
jruby-complete.jar file, add/remove items at your leisure (gem unpack)
and then zip it all back up again.

David Koontz

On Apr 21, 2009, at 3:55 PM, Roy Tinker wrote:

> Hello all,
>
> I've read rumors that this is possible, but I haven't been able to
> find instructions: how do I build a custom jruby-complete.jar (i.e.
> including gems that are not part of the standard jruby-complete.jar).
>
> Thanks,
> Roy
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
42b570f6f4312a872c2fc671e3ddc82b?d=identicon&s=25 Trejkaz Xx (trejkaz)
on 2009-04-22 05:20
Roy Tinker wrote:
> Hello all,
>
> I've read rumors that this is possible, but I haven't been able to find
> instructions: how do I build a custom jruby-complete.jar (i.e. including
> gems that are not part of the standard jruby-complete.jar).

Look at the jar-complete target in build.xml.

In there, there is a maybe_install_gems command where you should be able
to add more gems for it to install into the staging directory before it
jars it up.

This has not been tried as such, but I have tinkered with the same spot
in the build to make it *not* install the gems to there (I manually copy
them from elsewhere to avoid using the network during the build.)

TX
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-04-22 08:36
(Received via mailing list)
Roy Tinker wrote:
> Hello all,
>
> I've read rumors that this is possible, but I haven't been able to find
> instructions: how do I build a custom jruby-complete.jar (i.e. including
> gems that are not part of the standard jruby-complete.jar).

As David pointed out, it's just a zip file of a particular structure, so
you can modify it yourself. I believe some folks have done exactly what
you hope to do, e.g. including gem-based libraries directly in the jar
file.

I would, however, like to automate this process. It would not be
difficult to build a "complete jar builder" that also sucked in
installed gems (perhaps based on a list or based on checking loaded gems
in a bootstrapped application?) and included them in the complete jar.
This would make shipping applications much easier.

Since it's just a zip file, maybe you or someone else can come up with a
script to install gems? We could then improve it and probably include it
in JRuby.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.