jruby-maven-plugins icon indicating copy to clipboard operation
jruby-maven-plugins copied to clipboard

How can I pass -Xcext.enabled=true

Open alex-dow opened this issue 12 years ago • 3 comments
trafficstars

I need to add this parameter in order to "support" native C extensions. I understand that JRuby doesn't really play well with C extensions, but there are hard dependencies there that I can not work around even if the project doesn't even use them.

<supportNative>true</supportNative> does nothing it seems. -Xcext.enabled=true does nothing as well.

<jrubySwitches>-Xcext.enabled=true</jrubySwitches> doesn't work either. It gives me the error: [INFO] jruby: invalid extended option cext.enabled=true

<jrubyJvmArgs>-Djruby.cext.enabled=true</jrubyJvmArgs> doesn't work either.

I could keep going but I'm sure we all get the idea ;) It doesn't seem possible with:

            <groupId>de.saumya.mojo</groupId>
            <artifactId>gem-maven-plugin</artifactId>
            <version>1.0.0-beta</version>

To pass this parameter to jruby within maven.

alex-dow avatar May 01 '13 18:05 alex-dow

Note that if I set JRUBY_OPTS='-Xcext.enabled=true' or if I create a file called .jrubyrc with cext.enabled=true inside, then this works as expected.

alex-dow avatar May 01 '13 18:05 alex-dow

sorry for the late reply- kind of offline. what jruby version do you use ? the default from the jruby-maven-plugins ? jruby kind of dropped this extension support for jruby 1.7.x and for the plugin it needs to download the full jruby distribution since jruby-complete does not have any native support (which the plugin usually uses).

that the JRUBY_OPTS works surprises me - maybe there is a JRUBY_HOME set as well ? what is the exact content of .jrubyrc (just try to understand) ?

which gem is the "offending" one you need to install ? so I can make sure it works at least on my side.

mkristian avatar May 06 '13 10:05 mkristian

Next line solved problem for me: export JRUBY_OPTS="-Xcext.enabled=true"

mlushpenko avatar Jun 25 '13 16:06 mlushpenko