Comments (2)
I've documented some of this issue after further investigation in this mailing list post
Duplicated here for posterity:
I'm working on bringing the Redstorm library
(https://github.com/jruby-gradle/redstorm) up to speed with some of the recent
updates made possible in JRuby core, primary of which is loading
resources/artifacts nested within a self-contained .jar file. What I'd like,
ideally, is some sort of pre-initialization hook on a supervisor that I can tie
into to properly set up my classpath.
JRuby supports adding jars to the classpath with a `require` statement in such
a manner that a number of Ruby gems will embed a jar file in the gem and then
use `require 'my-library'` just like they might require any other Ruby
dependency.
This presents problems when executing in the Storm runtime environment. I
cannot simply go the shaded/fat-jar route since there is Ruby code which
expects "my-library.jar" to be a file in the Ruby `$LOAD_PATH` instead of
purely relying on the presence of files in the classpath.
This has been discussed previously in threads like this:
<http://grokbase.com/t/gg/storm-user/12c7m3zzve/what-are-the-chances-of-supporting-a-jar-of-jars-in-the-future>
This isn't a problem on topology deployment where I can easily customize the
classpath and loading semantics but when a topology is sent out to supervisor
nodes and started in workers, the "entrypoint" is something I cannot modify or
hack to update the running load path for the JRuby runtime.
Is there a viable workaround or some means of overriding/extending the worker
initialization routines?
from jruby-gradle-storm-plugin.
The work-around that I've validated works is to include two separate configurations. One jrubyStorm
packs everything into the artifact verbatim (nested jars-in-jars) whereas jrubyStormClasspath
unzips all the dependencies and places the raw class files inside the resulting archive.
This will provide a short term resolution for users
Related jruby-gradle/redstorm#12
from jruby-gradle-storm-plugin.
Related Issues (20)
- JRubyStormLocal task doesn't inherit classpaths from the gems configuration properly
- Cannot use 0.1.6 with the newer releases of the base/jar plugin
- NPE when running a custom JRubyStormLocal task HOT 1
- JRubyStormLocal should use its own configuration, inherited from its parent
- JRubyStorm.into() should support destinations properly
- jrubyStorm task doesn't depend on its assemble task
- I should be able to disable default repositories
- Default tasks should have groups and descriptions set
- jruby-mains jar should be excluded from the packaging
- jrubyStorm task should use the jrubyStorm configuration by default HOT 1
- prepareAssembleJRubyStorm is not caching results HOT 3
- Setting jrubyVersion for embedding in the topology jar gets overwritten
- Files included in jrubyStorm don't have .jrubydir attached HOT 2
- Gradle 2.2 cannot call super.getJrubyVersion() properly HOT 5
- Upgrade to the latest 0.9.2 redstorm
- Document the new default tasks/etc on jruby-gradle.org
- jrubyStormLocal does not set classpath properly unless created by parent HOT 1
- JRUbyStormLocal tasks use the jrubyExec configuration by default HOT 1
- JRubyStorm.dependsOn should propogate task dependencies to its children
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jruby-gradle-storm-plugin.