Jruby development in Eclipse/PDE, targetting as RCP plugin?

Hi Community,
Anyone able to build/debug Jruby as an Eclipse plugin these days?

I’ve been wrapping jruby-complete.jar as an Eclipse plugin (basically an
OSGI bundle with some extra hacks - I know that jar is a bundle on its
own.),
and using it within an RCP app.

Nowadays I need debugging into Jruby core itself (eg to track down perf
issues I mentioned here http://bit.ly/1eU0UT9 ).
For this I was using Eclipse tricks to browse in the source of the
vanilla
jruby-complete.jar… however now I want a more dynamic workflow where i
can
actually debug my changes.

I was able to compile Jruby in Eclipse so far using the M2Eclipse plugin
(noticed 2 Eclipse .project files under the tree, I picked the one under
the core)… then I was trying to convert it to a bundle/plugin project…
but this failed miserably - last one being a parse error
@version.ruby.patchlevel@, I guess this has to be replaced – but now
i’d
like to take a step back and figure things out.

So although I’ve been a happy jruby user for some time, am a newbie on
internals and building stuff, especially lost with the Maven stuff…
…any pointers, hints would be gratefully received!
many thanks.
Gergo

the src/main/java/org/jruby/runtime/Constants.java file is generated by
maven ($mvn process-resources) from the
src/main/resources/org/jruby/runtime/Constants.java

my eclipse reacts kind of strange, I generate the file $mvn
process-resources and open the eclipse editor and see the file from the
resources. I do not know why that happens.

I guess a first hack to get you running is to create a working
Constants.java with something like this:
$ mvn process-resources
$ cp src/main/java/org/jruby/runtime/Constants.java
src/main/resources/org/jruby/runtime/Constants.java

next is the lib directory from jruby/lib - an environment variable
jruby.lib= and or jruby.home will help.

if I find a better way I will let you know.

  • christian