1

I'm currently working on a Java class whose dependencies are resolved by maven. I now try to integrate the class into a JRuby script. Is it possible to manage the java dependencies such that the corresponding .jar files and the Java class file are handed over to JRuby automatically?

I have tried to call JRuby from maven, but wasn't able to fix the dependencies. Is there a possibility of handing over the correct maven class path inside the pom.xml file?

Thanks a lot, Philipp

Philipp Pahl
  • 211
  • 1
  • 2
  • 6

2 Answers2

0
<dependency>
    <groupId>org.jruby</groupId>
    <artifactId>jruby</artifactId>
    <version>1.7.10</version>
</dependency>

Add this to pom.xml and try. This should automatically pull the Jruby jar for your project.

Volker E.
  • 5,911
  • 11
  • 47
  • 64
0

It's not quite what you're after, but you might take a look at this question and answer and compile your Java 'with dependencies', using the assembly:single plugin/goal. Then your JRuby scripts only need to reference a single jar to work.

Whether it's a useful idea or not is dependent on your needs, and how you want to distribute your scripts.

Community
  • 1
  • 1
Paul Grime
  • 14,970
  • 4
  • 36
  • 58