|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Questions about JRuby in Maven repositoriesI've got a Maven-managed project that uses JRuby to invoke Ruby scripts from Java using BSF.
I'm trying to sort out what is available in public Maven repositories and what version I should be using. The JRuby FAQ at http://jruby.codehaus.org/FAQ says to use the 0.9.1-SNAPSHOT snapshot. I assume that is out of date. If so, it should be updated, perhaps to point to MvnRepository for the available versions. MvnRepository shows a couple packagings available at http://www.mvnrepository.com/artifact/org.jruby including a 1.1b1 release. This is the version of JRuby I downloaded and installed locally so is the version I am trying to use. First question - what's up with ruby v. jruby-complete? Which is the recommended dependency to use? The size of the jruby.jar in the 1.1b1 release (not via Maven) is 3,728kb but neither the jruby or jruby-complete jars for 1.1b1 in Maven are this size. What's the difference? Shouldn't at least one of them be the same? Next question - which version of BSF should I be using? I see the POM for the 1.1b1 release is using 2.3.0 but there is a 2.4.0 release available. The BSF 2.3.0 dependency is listed as 'provided' in http://repo1.maven.org/maven2/org/jruby/shared/1.1b1/shared-1.1b1.pom. I assume this is because all users of JRuby will not necessarily be using it via BSF. Next question - when using BSF 2.4.0 and JRuby 1.1b1 from Maven Central repo I get the exception: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) ... at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:693) at org.apache.bsf.BSFManager.eval(BSFManager.java:435) ... With 2.3.0 I do not get this error but get the following error with no additional details: org.apache.bsf.BSFException: unable to load language: ruby at org.apache.bsf.BSFManager.loadScriptingEngine(Unknown Source) at org.apache.bsf.BSFManager.eval(Unknown Source) ... Using BSF 2.3.0 or 2.4.0 and JRuby 1.0.2 from Maven Central repo JRuby appears to be working fine. Has 1.1b1 been built for a Java 6 target JVM or something like that? Anyone else seeing this issue? Thanks, Alon |
|
|
Re: Questions about JRuby in Maven repositoriesTo answer my last question, the answer is yes. jruby.properties in the jar shows: target.jruby=java1.6 For 1.0.2 from Maven Central repo: target.jruby=java1.4 In jruby.jar in the 1.1b1 binary download from http://jruby.codehaus.org/: target.jruby=java1.5 So it looks like the Maven distribution for 1.1b1 is incorrectly built for 1.6. It should be 1.5 to match the binary distribution. Alon |
|
|
Re: Questions about JRuby in Maven repositoriesAlon Salant wrote:
> > Alon Salant wrote: >> Has 1.1b1 been built for a Java 6 target JVM or something like that? >> Anyone else seeing this issue? >> > > To answer my last question, the answer is yes. jruby.properties in the jar > shows: > > target.jruby=java1.6 > > For 1.0.2 from Maven Central repo: > > target.jruby=java1.4 > > In jruby.jar in the 1.1b1 binary download from http://jruby.codehaus.org/: > > target.jruby=java1.5 > > So it looks like the Maven distribution for 1.1b1 is incorrectly build for > 1.6. It should be 1.5 to match the binary distribution. Thanks for the report...surprising nobody else noticed that, but we'll try to get a new binary pushed (or just correct it in the 1.1b2 release). - Charlie --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Questions about JRuby in Maven repositoriesAlon Salant wrote:
> > Alon Salant wrote: >> Has 1.1b1 been built for a Java 6 target JVM or something like that? >> Anyone else seeing this issue? >> > > To answer my last question, the answer is yes. jruby.properties in the jar > shows: > > target.jruby=java1.6 > > For 1.0.2 from Maven Central repo: > > target.jruby=java1.4 > > In jruby.jar in the 1.1b1 binary download from http://jruby.codehaus.org/: > > target.jruby=java1.5 > > So it looks like the Maven distribution for 1.1b1 is incorrectly built for > 1.6. It should be 1.5 to match the binary distribution. Could you file a bug against 1.1b1 for this please? We'll probably forget otherwise...busy week. - Charlie --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Questions about JRuby in Maven repositoriesDone: http://jira.codehaus.org/browse/JRUBY-1644 |
| Free embeddable forum powered by Nabble | Forum Help |